diff --git a/lib/commands.py b/lib/commands.py index 46c7be3d6..24148ce1c 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -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',