Browse Source

clearrequests command; minor type fix

283
ThomasV 10 years ago
parent
commit
6d54512627
  1. 8
      lib/commands.py

8
lib/commands.py

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