requests: store path not url
This commit is contained in:
parent
b9e4825422
commit
2727df962e
|
@ -510,13 +510,14 @@ class Commands:
|
||||||
def listrequests(self):
|
def listrequests(self):
|
||||||
"""List the payment requests you made"""
|
"""List the payment requests you made"""
|
||||||
out = []
|
out = []
|
||||||
for addr, v in self.wallet.receive_requests.items():
|
for k, v in self.wallet.receive_requests.items():
|
||||||
out.append({
|
out.append({
|
||||||
'address': addr,
|
'address': v.get('address'),
|
||||||
'amount': format_satoshis(v.get('amount')),
|
'amount': format_satoshis(v.get('amount')),
|
||||||
'time': v.get('time'),
|
'time': v.get('time'),
|
||||||
'reason': self.wallet.get_label(addr)[0],
|
'reason': self.wallet.get_label(addr)[0],
|
||||||
'expiration': v.get('expiration'),
|
'expiration': v.get('expiration'),
|
||||||
|
'url': 'bitcoin:?r=file://' + v.get('path'),
|
||||||
})
|
})
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
|
@ -1260,7 +1260,7 @@ class Abstract_Wallet(object):
|
||||||
path = os.path.join(rdir, addr + '.bip70')
|
path = os.path.join(rdir, addr + '.bip70')
|
||||||
with open(path, 'w') as f:
|
with open(path, 'w') as f:
|
||||||
f.write(pr)
|
f.write(pr)
|
||||||
r['url'] = 'bitcoin:?r=file://' + path
|
r['path'] = path
|
||||||
self.receive_requests[addr] = r
|
self.receive_requests[addr] = r
|
||||||
self.storage.put('receive_requests2', self.receive_requests)
|
self.storage.put('receive_requests2', self.receive_requests)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue