Browse Source

add wallet categories

283
ThomasV 11 years ago
parent
commit
622fb6c08b
  1. 8
      gui/qt/installwizard.py
  2. 13
      lib/wallet.py
  3. 2
      plugins/btchipwallet.py
  4. 2
      plugins/trezor.py

8
gui/qt/installwizard.py

@ -78,14 +78,16 @@ class InstallWizard(QDialog):
self.wallet_types = [
('standard', _("Standard wallet")),
#('2fa', _("Wallet with two-factor authentication")),
('twofactor', _("Wallet with two-factor authentication")),
('multisig', _("Multi-signatures wallet")),
('hardware', _("Hardware wallet")),
]
for i, (t,l) in enumerate(self.wallet_types):
for i, (wtype,name) in enumerate(self.wallet_types):
if not filter(lambda x:x[0]==wtype, electrum.wallet.wallet_types):
continue
button = QRadioButton(gb2)
button.setText(l)
button.setText(name)
vbox.addWidget(button)
group2.addButton(button)
group2.setId(button, i)

13
lib/wallet.py

@ -1578,12 +1578,13 @@ class OldWallet(Deterministic_Wallet):
wallet_types = [
('old', ("Old wallet"), OldWallet),
('xpub', ("BIP32 Import"), BIP32_Simple_Wallet),
('standard', ("Standard wallet"), NewWallet),
('imported', ("Imported wallet"), Imported_Wallet),
('2of2', ("Multisig wallet (2 of 2)"), Wallet_2of2),
('2of3', ("Multisig wallet (2 of 3)"), Wallet_2of3)
# category type description constructor
('standard', 'old', ("Old wallet"), OldWallet),
('standard', 'xpub', ("BIP32 Import"), BIP32_Simple_Wallet),
('standard', 'standard', ("Standard wallet"), NewWallet),
('standard', 'imported', ("Imported wallet"), Imported_Wallet),
('multisig', '2of2', ("Multisig wallet (2 of 2)"), Wallet_2of2),
('multisig', '2of3', ("Multisig wallet (2 of 3)"), Wallet_2of3)
]
# former WalletFactory

2
plugins/btchipwallet.py

@ -53,7 +53,7 @@ class Plugin(BasePlugin):
BasePlugin.__init__(self, gui, name)
self._is_available = self._init()
self.wallet = None
electrum.wallet.wallet_types.append(('btchip', _("BTChip wallet"), BTChipWallet))
electrum.wallet.wallet_types.append(('hardware', 'btchip', _("BTChip wallet"), BTChipWallet))
def _init(self):

2
plugins/trezor.py

@ -48,7 +48,7 @@ class Plugin(BasePlugin):
self._is_available = self._init()
self._requires_settings = True
self.wallet = None
electrum.wallet.wallet_types.append(('trezor', _("Trezor wallet"), TrezorWallet))
electrum.wallet.wallet_types.append(('hardware', 'trezor', _("Trezor wallet"), TrezorWallet))
def _init(self):
return TREZOR

Loading…
Cancel
Save