The constructor() concept doesn't exist
Did it ever?
This commit is contained in:
@@ -1916,10 +1916,7 @@ class Wallet(object):
|
|||||||
if wallet_type:
|
if wallet_type:
|
||||||
for cat, t, name, loader in wallet_types:
|
for cat, t, name, loader in wallet_types:
|
||||||
if t == wallet_type:
|
if t == wallet_type:
|
||||||
if cat in ['hardware', 'twofactor']:
|
WalletClass = loader
|
||||||
WalletClass = lambda storage: apply(loader().constructor, (storage,))
|
|
||||||
else:
|
|
||||||
WalletClass = loader
|
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
if re.match('(\d+)of(\d+)', wallet_type):
|
if re.match('(\d+)of(\d+)', wallet_type):
|
||||||
|
|||||||
@@ -424,9 +424,6 @@ class LedgerPlugin(BasePlugin):
|
|||||||
self.wallet = None
|
self.wallet = None
|
||||||
self.handler = None
|
self.handler = None
|
||||||
|
|
||||||
def constructor(self, s):
|
|
||||||
return BTChipWallet(s)
|
|
||||||
|
|
||||||
def is_enabled(self):
|
def is_enabled(self):
|
||||||
if not BTCHIP:
|
if not BTCHIP:
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -158,9 +158,6 @@ class TrezorCompatiblePlugin(BasePlugin):
|
|||||||
self.handler = None
|
self.handler = None
|
||||||
self.client = None
|
self.client = None
|
||||||
|
|
||||||
def constructor(self, s):
|
|
||||||
return self.wallet_class(s)
|
|
||||||
|
|
||||||
def give_error(self, message):
|
def give_error(self, message):
|
||||||
self.print_error(message)
|
self.print_error(message)
|
||||||
raise Exception(message)
|
raise Exception(message)
|
||||||
|
|||||||
@@ -276,9 +276,6 @@ class TrustedCoinPlugin(BasePlugin):
|
|||||||
BasePlugin.__init__(self, parent, config, name)
|
BasePlugin.__init__(self, parent, config, name)
|
||||||
self.seed_func = lambda x: bitcoin.is_new_seed(x, SEED_PREFIX)
|
self.seed_func = lambda x: bitcoin.is_new_seed(x, SEED_PREFIX)
|
||||||
|
|
||||||
def constructor(self, s):
|
|
||||||
return Wallet_2fa(s)
|
|
||||||
|
|
||||||
def is_available(self):
|
def is_available(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user