def prepare(ctrl): ctrl.dlg_config_fun(dlg_title="Confirm message signing.", show_progress_bar=False) ctrl.display_msg_fun( '<b>Click the confirmation button on your hardware wallet...</b>') if main_ui.config.hw_type == HWType.trezor: import hw_intf_trezor as trezor return trezor.prepare_transfer_tx(main_ui, utxos_to_spend, dest_address, tx_fee) elif main_ui.config.hw_type == HWType.keepkey: import hw_intf_keepkey as keepkey return keepkey.prepare_transfer_tx(main_ui, utxos_to_spend, dest_address, tx_fee) elif main_ui.config.hw_type == HWType.ledger_nano_s: import hw_intf_ledgernano as ledger return ledger.prepare_transfer_tx(main_ui, utxos_to_spend, dest_address, tx_fee, rawtransactions) else: logging.error('Unsupported HW type: ' + str(main_ui.config.hw_type))
def prepare(ctrl): ctrl.dlg_config_fun(dlg_title="Confirm transaction signing.", show_progress_bar=False) ctrl.display_msg_fun( '<b>Click the confirmation button on your hardware wallet<br>' 'and wait for the transaction to be signed...</b>') if hw_session.app_config.hw_type == HWType.trezor: import hw_intf_trezor as trezor return trezor.prepare_transfer_tx(hw_session, utxos_to_spend, dest_addresses, tx_fee) elif hw_session.app_config.hw_type == HWType.keepkey: import hw_intf_keepkey as keepkey return keepkey.prepare_transfer_tx(hw_session, utxos_to_spend, dest_addresses, tx_fee) elif hw_session.app_config.hw_type == HWType.ledger_nano_s: import hw_intf_ledgernano as ledger return ledger.prepare_transfer_tx(hw_session, utxos_to_spend, dest_addresses, tx_fee, rawtransactions) else: logging.error('Invalid HW type: ' + str(hw_session.app_config.hw_type))