commit 2727df962ed13036eb482e4afd94c651d2c70662
parent b9e4825422b8b247b633c81b3b939051b81376b4
Author: ThomasV <thomasv@gitorious>
Date: Tue, 2 Jun 2015 09:56:10 +0200
requests: store path not url
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/commands.py b/lib/commands.py
@@ -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
diff --git a/lib/wallet.py b/lib/wallet.py
@@ -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)