clearrequests command; minor type fix

This commit is contained in:
ThomasV 2015-07-22 15:46:53 +02:00
parent 508b5373ac
commit 6d54512627
1 changed files with 8 additions and 0 deletions

View File

@ -574,6 +574,7 @@ class Commands:
else:
return False
amount = int(Decimal(requested_amount)*COIN)
expiration = int(expiration)
req = self.wallet.make_payment_request(addr, amount, memo, expiration)
self.wallet.add_payment_request(req, self.config)
return self._format_request(req)
@ -590,6 +591,13 @@ class Commands:
"""Remove a payment request"""
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 = {
'privkey': 'Private key. Type \'?\' to get a prompt.',
'destination': 'Bitcoin address, contact or alias',