electrum

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

commit fe405c50d0ea1670410ab8e9269055d21e81a653
parent 4ab44019fd9253663dec30829aacda05565c87c3
Author: ecdsa <ecdsa@github>
Date:   Thu,  2 May 2013 09:54:43 +0200

delete_imported_key method

Diffstat:
Mgui/gui_classic.py | 3+--
Mlib/wallet.py | 7++++++-
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/gui/gui_classic.py b/gui/gui_classic.py @@ -971,10 +971,9 @@ class ElectrumWindow(QMainWindow): def delete_imported_key(self, addr): if self.question(_("Do you want to remove")+" %s "%addr +_("from your wallet?")): - self.wallet.imported_keys.pop(addr) + self.wallet.delete_imported_key(addr) self.update_receive_tab() self.update_history_tab() - self.wallet.save() def create_receive_menu(self, position): diff --git a/lib/wallet.py b/lib/wallet.py @@ -147,6 +147,11 @@ class Wallet: self.config.set_key('imported_keys', self.imported_keys, True) return address + def delete_imported_key(self, addr): + if addr in self.imported_keys: + self.imported_keys.pop(addr) + self.config.set_key('imported_keys', self.imported_keys, True) + def init_seed(self, seed): if self.seed: raise BaseException("a seed exists") @@ -318,7 +323,7 @@ class Wallet: def change_gap_limit(self, value): if value >= self.gap_limit: self.gap_limit = value - self.save() + self.config.set_key('gap_limit', self.gap_limit, True) self.interface.poke('synchronizer') return True