commit 53273b7d4020d68f070a68f35f1488daca6dbd34
parent db0a5f9b31cdf5c09651465f32f9297e6d05ffe8
Author: ThomasV <thomasv@electrum.org>
Date: Thu, 29 Oct 2015 00:09:50 +0100
fix #1523: prevent side-effect of _format_request
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/commands.py b/lib/commands.py
@@ -531,7 +531,7 @@ class Commands:
PR_PAID: 'Paid',
PR_EXPIRED: 'Expired',
}
- out['amount (BTC)'] = format_satoshis(out.pop('amount'))
+ out['amount (BTC)'] = format_satoshis(out.get('amount'))
out['status'] = pr_str[out.get('status', PR_UNKNOWN)]
return out
@@ -577,7 +577,8 @@ class Commands:
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)
+ out = self.wallet.get_payment_request(addr, self.config)
+ return self._format_request(out)
@command('wp')
def signrequest(self, address):