1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00

nem: xem amount and mosaic levy fix

This commit is contained in:
Tomas Susanka 2018-05-03 14:04:19 +02:00 committed by Jan Pochyla
parent 3422474811
commit e0014a76d5

View File

@ -37,7 +37,7 @@ async def ask_transfer_mosaic(ctx, common: NEMTransactionCommon, transfer: NEMTr
await require_confirm(ctx, msg, ButtonRequestType.ConfirmOutput)
if "levy" in definition and "fee" in definition:
levy_msg = _get_levy_msg(definition, mosaic.quantity, common.network)
levy_msg = _get_levy_msg(definition, mosaic_quantity, common.network)
msg = Text('Confirm mosaic', ui.ICON_SEND,
ui.NORMAL, 'Confirm mosaic',
ui.NORMAL, 'levy fee of',
@ -63,7 +63,7 @@ async def ask_transfer_mosaic(ctx, common: NEMTransactionCommon, transfer: NEMTr
def _get_xem_amount(transfer: NEMTransfer):
# mosaics are empty the transfer.amount denotes the xem amount
if not len(mosaics):
if not len(transfer.mosaics):
return transfer.amount
# otherwise xem amount is taken from the nem xem mosaic if present
for mosaic in transfer.mosaics: