fix command line interface for hardware wallets. fixes #3056
This commit is contained in:
@@ -1,20 +1,11 @@
|
||||
from electrum.util import print_msg
|
||||
from .ledger import LedgerPlugin
|
||||
|
||||
class BTChipCmdLineHandler:
|
||||
def stop(self):
|
||||
pass
|
||||
|
||||
def show_message(self, msg):
|
||||
print_msg(msg)
|
||||
|
||||
def prompt_auth(self, msg):
|
||||
import getpass
|
||||
print_msg(msg)
|
||||
response = getpass.getpass('')
|
||||
if len(response) == 0:
|
||||
return None
|
||||
return response
|
||||
from ..hw_wallet import CmdLineHandler
|
||||
|
||||
class Plugin(LedgerPlugin):
|
||||
handler = BTChipCmdLineHandler()
|
||||
handler = CmdLineHandler()
|
||||
@hook
|
||||
def init_keystore(self, keystore):
|
||||
if not isinstance(keystore, self.keystore_class):
|
||||
return
|
||||
keystore.handler = self.handler
|
||||
|
||||
Reference in New Issue
Block a user