mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
add wallet categories
This commit is contained in:
parent
34cb1f6620
commit
622fb6c08b
4 changed files with 14 additions and 11 deletions
|
@ -78,14 +78,16 @@ class InstallWizard(QDialog):
|
||||||
|
|
||||||
self.wallet_types = [
|
self.wallet_types = [
|
||||||
('standard', _("Standard wallet")),
|
('standard', _("Standard wallet")),
|
||||||
#('2fa', _("Wallet with two-factor authentication")),
|
('twofactor', _("Wallet with two-factor authentication")),
|
||||||
('multisig', _("Multi-signatures wallet")),
|
('multisig', _("Multi-signatures wallet")),
|
||||||
('hardware', _("Hardware 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 = QRadioButton(gb2)
|
||||||
button.setText(l)
|
button.setText(name)
|
||||||
vbox.addWidget(button)
|
vbox.addWidget(button)
|
||||||
group2.addButton(button)
|
group2.addButton(button)
|
||||||
group2.setId(button, i)
|
group2.setId(button, i)
|
||||||
|
|
|
@ -1578,12 +1578,13 @@ class OldWallet(Deterministic_Wallet):
|
||||||
|
|
||||||
|
|
||||||
wallet_types = [
|
wallet_types = [
|
||||||
('old', ("Old wallet"), OldWallet),
|
# category type description constructor
|
||||||
('xpub', ("BIP32 Import"), BIP32_Simple_Wallet),
|
('standard', 'old', ("Old wallet"), OldWallet),
|
||||||
('standard', ("Standard wallet"), NewWallet),
|
('standard', 'xpub', ("BIP32 Import"), BIP32_Simple_Wallet),
|
||||||
('imported', ("Imported wallet"), Imported_Wallet),
|
('standard', 'standard', ("Standard wallet"), NewWallet),
|
||||||
('2of2', ("Multisig wallet (2 of 2)"), Wallet_2of2),
|
('standard', 'imported', ("Imported wallet"), Imported_Wallet),
|
||||||
('2of3', ("Multisig wallet (2 of 3)"), Wallet_2of3)
|
('multisig', '2of2', ("Multisig wallet (2 of 2)"), Wallet_2of2),
|
||||||
|
('multisig', '2of3', ("Multisig wallet (2 of 3)"), Wallet_2of3)
|
||||||
]
|
]
|
||||||
|
|
||||||
# former WalletFactory
|
# former WalletFactory
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Plugin(BasePlugin):
|
||||||
BasePlugin.__init__(self, gui, name)
|
BasePlugin.__init__(self, gui, name)
|
||||||
self._is_available = self._init()
|
self._is_available = self._init()
|
||||||
self.wallet = None
|
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):
|
def _init(self):
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Plugin(BasePlugin):
|
||||||
self._is_available = self._init()
|
self._is_available = self._init()
|
||||||
self._requires_settings = True
|
self._requires_settings = True
|
||||||
self.wallet = None
|
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):
|
def _init(self):
|
||||||
return TREZOR
|
return TREZOR
|
||||||
|
|
Loading…
Add table
Reference in a new issue