electrum

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

commit ff9cc4d292867de400c77d481bdee01335615141
parent 0b87ce426f1bb2e4debf6810f7ec362d23a14af4
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon, 16 Sep 2019 16:01:52 +0200

kivy: fix "use change addresses" setting (previously ignored, always on)

this config setting is stored in the WalletStorage unlike most others

closes #5643

Diffstat:
Melectrum/gui/kivy/main_window.py | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py @@ -159,7 +159,10 @@ class ElectrumWindow(App): use_change = BooleanProperty(False) def on_use_change(self, instance, x): - self.electrum_config.set_key('use_change', self.use_change, True) + if self.wallet: + self.wallet.use_change = self.use_change + self.wallet.storage.put('use_change', self.use_change) + self.wallet.storage.write() use_unconfirmed = BooleanProperty(False) def on_use_unconfirmed(self, instance, x): @@ -339,7 +342,6 @@ class ElectrumWindow(App): self.fx = self.daemon.fx self.use_rbf = config.get('use_rbf', True) - self.use_change = config.get('use_change', True) self.use_unconfirmed = not config.get('confirmed_only', False) # create triggers so as to minimize updating a max of 2 times a sec @@ -783,7 +785,7 @@ class ElectrumWindow(App): self._trigger_update_wallet() @profiler - def load_wallet(self, wallet): + def load_wallet(self, wallet: 'Abstract_Wallet'): if self.wallet: self.stop_wallet() self.wallet = wallet @@ -800,6 +802,8 @@ class ElectrumWindow(App): except InternalAddressCorruption as e: self.show_error(str(e)) send_exception_to_crash_reporter(e) + return + self.use_change = self.wallet.use_change def update_status(self, *dt): if not self.wallet: