tfix #1523: prevent side-effect of _format_request - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 53273b7d4020d68f070a68f35f1488daca6dbd34 DIR parent db0a5f9b31cdf5c09651465f32f9297e6d05ffe8 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 29 Oct 2015 00:09:50 +0100 fix #1523: prevent side-effect of _format_request Diffstat: M lib/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -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 t@@ -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):