mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-26 23:13:25 +00:00
Merge pull request #2123 from gdiepen/master
Implemented getunusedaddress command
This commit is contained in:
commit
cc852ef6a5
1 changed files with 13 additions and 0 deletions
|
@ -568,6 +568,19 @@ class Commands:
|
|||
out = filter(lambda x: x.get('status')==f, out)
|
||||
return map(self._format_request, out)
|
||||
|
||||
@command('w')
|
||||
def getunusedaddress(self,force=False):
|
||||
"""Returns the first unused address."""
|
||||
addr = self.wallet.get_unused_address()
|
||||
if addr is None and force:
|
||||
addr = self.wallet.create_new_address(False)
|
||||
|
||||
if addr:
|
||||
return addr
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
@command('w')
|
||||
def addrequest(self, amount, memo='', expiration=None, force=False):
|
||||
"""Create a payment request."""
|
||||
|
|
Loading…
Add table
Reference in a new issue