You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
612 B
25 lines
612 B
from legder import LedgerPlugin |
|
from electrum.util import print_msg |
|
from electrum.plugins import hook |
|
|
|
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 |
|
|
|
class Plugin(LedgerPlugin): |
|
@hook |
|
def cmdline_load_wallet(self, wallet): |
|
wallet.plugin = self |
|
if self.handler is None: |
|
self.handler = BTChipCmdLineHandler()
|
|
|