From 2c7da6afde82cb690955b1599cc69dd5f034c14f Mon Sep 17 00:00:00 2001 From: Johannes Zweng Date: Tue, 1 Sep 2020 19:24:51 +0200 Subject: [PATCH] add missing `wallet.save_db()` after adding or rm'ing payment requests (#6435) --- electrum/commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electrum/commands.py b/electrum/commands.py index b0a02eb31..452e72a0b 100644 --- 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):