diff --git a/src/apps/wallet/get_address.py b/src/apps/wallet/get_address.py index 63adac96fd..ee136ab23d 100644 --- a/src/apps/wallet/get_address.py +++ b/src/apps/wallet/get_address.py @@ -8,17 +8,19 @@ async def layout_get_address(ctx, msg): from trezor.messages.FailureType import ProcessError from ..common import coins from ..common import seed + from ..wallet.sign_tx import addresses if msg.multisig: raise wire.FailureError(ProcessError, 'GetAddress.multisig is unsupported') address_n = msg.address_n or () coin_name = msg.coin_name or 'Bitcoin' + coin = coins.by_name(coin_name) node = await seed.get_root(ctx) node.derive_path(address_n) - coin = coins.by_name(coin_name) - address = node.address(coin.address_type) + + address = addresses.get_address(msg.script_type, coin, node) if msg.show_display: await _show_address(ctx, address) diff --git a/src/apps/wallet/sign_tx/addresses.py b/src/apps/wallet/sign_tx/addresses.py index 81051c0d22..afa8963c1c 100644 --- a/src/apps/wallet/sign_tx/addresses.py +++ b/src/apps/wallet/sign_tx/addresses.py @@ -16,7 +16,7 @@ class AddressError(Exception): pass -def get_address(script_type: InputScriptType, coin: CoinType, node) -> bytes: +def get_address(script_type: InputScriptType, coin: CoinType, node) -> str: if script_type == InputScriptType.SPENDADDRESS: # p2pkh return node.address(coin.address_type) diff --git a/tests/run_tests_device.sh b/tests/run_tests_device.sh index 5289f94151..506805bf8d 100755 --- a/tests/run_tests_device.sh +++ b/tests/run_tests_device.sh @@ -17,8 +17,6 @@ pytest \ --ignore test_msg_ethereum_signmessage.py \ --ignore test_msg_ethereum_signtx.py \ --ignore test_msg_ethereum_verifymessage.py \ - --ignore test_msg_getaddress_segwit_native.py \ - --ignore test_msg_getaddress_segwit.py \ --ignore test_msg_getaddress_show.py \ --ignore test_msg_loaddevice_xprv.py \ --ignore test_msg_nem_getaddress.py \