|
@ -788,6 +788,7 @@ class Commands: |
|
|
async def list_requests(self, pending=False, expired=False, paid=False, wallet: Abstract_Wallet = None): |
|
|
async def list_requests(self, pending=False, expired=False, paid=False, wallet: Abstract_Wallet = None): |
|
|
"""List the payment requests you made.""" |
|
|
"""List the payment requests you made.""" |
|
|
out = wallet.get_sorted_requests() |
|
|
out = wallet.get_sorted_requests() |
|
|
|
|
|
out = list(map(self._format_request, out)) |
|
|
if pending: |
|
|
if pending: |
|
|
f = PR_UNPAID |
|
|
f = PR_UNPAID |
|
|
elif expired: |
|
|
elif expired: |
|
@ -798,7 +799,7 @@ class Commands: |
|
|
f = None |
|
|
f = None |
|
|
if f is not None: |
|
|
if f is not None: |
|
|
out = list(filter(lambda x: x.get('status')==f, out)) |
|
|
out = list(filter(lambda x: x.get('status')==f, out)) |
|
|
return list(map(self._format_request, out)) |
|
|
return out |
|
|
|
|
|
|
|
|
@command('w') |
|
|
@command('w') |
|
|
async def createnewaddress(self, wallet: Abstract_Wallet = None): |
|
|
async def createnewaddress(self, wallet: Abstract_Wallet = None): |
|
|