mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
parent
0b03794fee
commit
961499fdcf
@ -20,7 +20,7 @@ async def get_address(ctx, msg: RippleGetAddress, keychain):
|
||||
while True:
|
||||
if await show_address(ctx, address, desc=desc):
|
||||
break
|
||||
if await show_qr(ctx, address.upper(), desc=desc):
|
||||
if await show_qr(ctx, address, desc=desc):
|
||||
break
|
||||
|
||||
return RippleAddress(address=address)
|
||||
|
@ -24,22 +24,21 @@ async def get_address(ctx, msg, keychain):
|
||||
node = keychain.derive(msg.address_n, coin.curve_name)
|
||||
address = addresses.get_address(msg.script_type, coin, node, msg.multisig)
|
||||
address_short = addresses.address_short(coin, address)
|
||||
if msg.script_type == InputScriptType.SPENDWITNESS:
|
||||
address_qr = address.upper() # bech32 address
|
||||
else:
|
||||
address_qr = address # base58 address
|
||||
|
||||
if msg.show_display:
|
||||
if msg.multisig:
|
||||
desc = "Multisig %d of %d" % (msg.multisig.m, len(msg.multisig.pubkeys))
|
||||
else:
|
||||
desc = address_n_to_str(msg.address_n)
|
||||
|
||||
while True:
|
||||
if await show_address(ctx, address_short, desc=desc):
|
||||
break
|
||||
if await show_qr(
|
||||
ctx,
|
||||
address.upper()
|
||||
if msg.script_type == InputScriptType.SPENDWITNESS
|
||||
else address,
|
||||
desc=desc,
|
||||
):
|
||||
if await show_qr(ctx, address_qr, desc=desc):
|
||||
break
|
||||
|
||||
return Address(address=address)
|
||||
|
Loading…
Reference in New Issue
Block a user