From cbc69742b958aaacdad9612d7cf1564c32205efb Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 11 May 2022 19:50:57 +0200 Subject: [PATCH] wallet_db: clarify hww types in old upgrades There is no point in adding new hww types to these lists every time support for a new hww is added. These upgrades got released in 2.7.0 and any hw types added after are unrelated. reverted to just-after last relevant change: https://github.com/spesmilo/electrum/commit/c820423b00553913024ff8c2f54ac2fd5e3a9b89 --- electrum/wallet_db.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/electrum/wallet_db.py b/electrum/wallet_db.py index c9c25d04e..08b3caf7d 100644 --- a/electrum/wallet_db.py +++ b/electrum/wallet_db.py @@ -129,7 +129,8 @@ class WalletDB(JsonDB): data2['suffix'] = 'imported' result = [data1, data2] - elif wallet_type in ['bip44', 'trezor', 'keepkey', 'ledger', 'btchip', 'digitalbitbox', 'safe_t']: + # note: do not add new hardware types here, this code is for converting legacy wallets + elif wallet_type in ['bip44', 'trezor', 'keepkey', 'ledger', 'btchip']: mpk = self.get('master_public_keys') for k in d.keys(): i = int(k) @@ -258,7 +259,8 @@ class WalletDB(JsonDB): self.put('wallet_type', 'standard') self.put('keystore', d) - elif wallet_type in ['trezor', 'keepkey', 'ledger', 'digitalbitbox', 'safe_t']: + # note: do not add new hardware types here, this code is for converting legacy wallets + elif wallet_type in ['trezor', 'keepkey', 'ledger']: xpub = xpubs["x/0'"] derivation = self.get('derivation', bip44_derivation(0)) d = {