trequests: store path not url - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 2727df962ed13036eb482e4afd94c651d2c70662 DIR parent b9e4825422b8b247b633c81b3b939051b81376b4 HTML Author: ThomasV <thomasv@gitorious> Date: Tue, 2 Jun 2015 09:56:10 +0200 requests: store path not url Diffstat: M lib/commands.py | 5 +++-- M lib/wallet.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -510,13 +510,14 @@ class Commands: def listrequests(self): """List the payment requests you made""" out = [] - for addr, v in self.wallet.receive_requests.items(): + for k, v in self.wallet.receive_requests.items(): out.append({ - 'address': addr, + 'address': v.get('address'), 'amount': format_satoshis(v.get('amount')), 'time': v.get('time'), 'reason': self.wallet.get_label(addr)[0], 'expiration': v.get('expiration'), + 'url': 'bitcoin:?r=file://' + v.get('path'), }) return out DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -1260,7 +1260,7 @@ class Abstract_Wallet(object): path = os.path.join(rdir, addr + '.bip70') with open(path, 'w') as f: f.write(pr) - r['url'] = 'bitcoin:?r=file://' + path + r['path'] = path self.receive_requests[addr] = r self.storage.put('receive_requests2', self.receive_requests)