clearrequests command; minor type fix
This commit is contained in:
parent
508b5373ac
commit
6d54512627
@ -574,6 +574,7 @@ class Commands:
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
amount = int(Decimal(requested_amount)*COIN)
|
amount = int(Decimal(requested_amount)*COIN)
|
||||||
|
expiration = int(expiration)
|
||||||
req = self.wallet.make_payment_request(addr, amount, memo, expiration)
|
req = self.wallet.make_payment_request(addr, amount, memo, expiration)
|
||||||
self.wallet.add_payment_request(req, self.config)
|
self.wallet.add_payment_request(req, self.config)
|
||||||
return self._format_request(req)
|
return self._format_request(req)
|
||||||
@ -590,6 +591,13 @@ class Commands:
|
|||||||
"""Remove a payment request"""
|
"""Remove a payment request"""
|
||||||
return self.wallet.remove_payment_request(address, self.config)
|
return self.wallet.remove_payment_request(address, self.config)
|
||||||
|
|
||||||
|
@command('w')
|
||||||
|
def clearrequests(self):
|
||||||
|
"""Remove all payment requests"""
|
||||||
|
for k in self.wallet.receive_requests.keys():
|
||||||
|
self.wallet.remove_payment_request(k, self.config)
|
||||||
|
|
||||||
|
|
||||||
param_descriptions = {
|
param_descriptions = {
|
||||||
'privkey': 'Private key. Type \'?\' to get a prompt.',
|
'privkey': 'Private key. Type \'?\' to get a prompt.',
|
||||||
'destination': 'Bitcoin address, contact or alias',
|
'destination': 'Bitcoin address, contact or alias',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user