Import WalletFactory instead of Wallet
WalletFactory and WalletBitkey classes --usb parameter enables experimental support for bitkey protocol
This commit is contained in:
11
lib/wallet_factory.py
Normal file
11
lib/wallet_factory.py
Normal file
@@ -0,0 +1,11 @@
|
||||
class WalletFactory(object):
|
||||
def __new__(cls, config):
|
||||
if config.get('bitkey', False):
|
||||
# if user requested support for Bitkey device,
|
||||
# import Bitkey driver
|
||||
from wallet_bitkey import WalletBitkey
|
||||
return WalletBitkey(config)
|
||||
|
||||
# Load standard wallet
|
||||
from wallet import Wallet
|
||||
return Wallet(config)
|
||||
Reference in New Issue
Block a user