mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
add missing wallet.save_db()
after adding or rm'ing payment requests (#6435)
This commit is contained in:
parent
c9bf1d4c80
commit
2c7da6afde
1 changed files with 5 additions and 1 deletions
|
@ -846,12 +846,14 @@ class Commands:
|
||||||
expiration = int(expiration) if expiration else None
|
expiration = int(expiration) if expiration else None
|
||||||
req = wallet.make_payment_request(addr, amount, memo, expiration)
|
req = wallet.make_payment_request(addr, amount, memo, expiration)
|
||||||
wallet.add_payment_request(req)
|
wallet.add_payment_request(req)
|
||||||
|
wallet.save_db()
|
||||||
return wallet.export_request(req)
|
return wallet.export_request(req)
|
||||||
|
|
||||||
@command('wn')
|
@command('wn')
|
||||||
async def add_lightning_request(self, amount, memo='', expiration=3600, wallet: Abstract_Wallet = None):
|
async def add_lightning_request(self, amount, memo='', expiration=3600, wallet: Abstract_Wallet = None):
|
||||||
amount_sat = int(satoshis(amount))
|
amount_sat = int(satoshis(amount))
|
||||||
key = await wallet.lnworker._add_request_coro(amount_sat, memo, expiration)
|
key = await wallet.lnworker._add_request_coro(amount_sat, memo, expiration)
|
||||||
|
wallet.save_db()
|
||||||
return wallet.get_formatted_request(key)
|
return wallet.get_formatted_request(key)
|
||||||
|
|
||||||
@command('w')
|
@command('w')
|
||||||
|
@ -875,7 +877,9 @@ class Commands:
|
||||||
@command('w')
|
@command('w')
|
||||||
async def rmrequest(self, address, wallet: Abstract_Wallet = None):
|
async def rmrequest(self, address, wallet: Abstract_Wallet = None):
|
||||||
"""Remove a payment request"""
|
"""Remove a payment request"""
|
||||||
return wallet.remove_payment_request(address)
|
result = wallet.remove_payment_request(address)
|
||||||
|
wallet.save_db()
|
||||||
|
return result
|
||||||
|
|
||||||
@command('w')
|
@command('w')
|
||||||
async def clear_requests(self, wallet: Abstract_Wallet = None):
|
async def clear_requests(self, wallet: Abstract_Wallet = None):
|
||||||
|
|
Loading…
Add table
Reference in a new issue