1
0

Import WalletFactory instead of Wallet

WalletFactory and WalletBitkey classes
--usb parameter enables experimental support for bitkey protocol
This commit is contained in:
slush
2013-01-07 16:03:03 +00:00
parent d0723775f3
commit cf5661046b
4 changed files with 42 additions and 1 deletions

11
lib/wallet_factory.py Normal file
View 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)