Browse Source

Merge pull request #2123 from gdiepen/master

Implemented getunusedaddress command
283
ThomasV 8 years ago
committed by GitHub
parent
commit
cc852ef6a5
  1. 13
      lib/commands.py

13
lib/commands.py

@ -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…
Cancel
Save