electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 2c7da6afde82cb690955b1599cc69dd5f034c14f
parent c9bf1d4c800d8a07ae04de97f27cee51707f10de
Author: Johannes Zweng <johnzweng@users.noreply.github.com>
Date:   Tue,  1 Sep 2020 19:24:51 +0200

add missing `wallet.save_db()` after adding or rm'ing payment requests (#6435)


Diffstat:
Melectrum/commands.py | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/electrum/commands.py b/electrum/commands.py @@ -846,12 +846,14 @@ class Commands: expiration = int(expiration) if expiration else None req = wallet.make_payment_request(addr, amount, memo, expiration) wallet.add_payment_request(req) + wallet.save_db() return wallet.export_request(req) @command('wn') async def add_lightning_request(self, amount, memo='', expiration=3600, wallet: Abstract_Wallet = None): amount_sat = int(satoshis(amount)) key = await wallet.lnworker._add_request_coro(amount_sat, memo, expiration) + wallet.save_db() return wallet.get_formatted_request(key) @command('w') @@ -875,7 +877,9 @@ class Commands: @command('w') async def rmrequest(self, address, wallet: Abstract_Wallet = None): """Remove a payment request""" - return wallet.remove_payment_request(address) + result = wallet.remove_payment_request(address) + wallet.save_db() + return result @command('w') async def clear_requests(self, wallet: Abstract_Wallet = None):