src.apps.wallet: optimize QR code for segwit address

as they are case-insensitive and QR code has special mode
for uppercase letters
pull/25/head
Pavol Rusnak 6 years ago
parent d9324f3e57
commit d8ac07e455
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -4,6 +4,7 @@ from trezor import wire, ui
async def layout_get_address(ctx, msg):
from trezor.messages.Address import Address
from trezor.messages.InputScriptType import SPENDWITNESS
from trezor.messages.FailureType import ProcessError
from ..common import coins
from ..common import seed
@ -23,7 +24,7 @@ async def layout_get_address(ctx, msg):
while True:
if await _show_address(ctx, address):
break
if await _show_qr(ctx, address):
if await _show_qr(ctx, address if msg.script_type != SPENDWITNESS else address.upper()):
break
return Address(address=address)

Loading…
Cancel
Save