diff --git a/src/apps/nem/layout.py b/src/apps/nem/layout.py index 83f525b752..d64a1612fe 100644 --- a/src/apps/nem/layout.py +++ b/src/apps/nem/layout.py @@ -34,3 +34,9 @@ async def require_confirm_final(ctx, fee: int): def split_address(data): return chunks(data, 17) + + +def trim(payload: str, length: int) -> str: + if len(payload) > length: + return payload[:length] + '..' + return payload diff --git a/src/apps/nem/mosaic/layout.py b/src/apps/nem/mosaic/layout.py index 1e35069762..a385c18868 100644 --- a/src/apps/nem/mosaic/layout.py +++ b/src/apps/nem/mosaic/layout.py @@ -63,7 +63,7 @@ def _get_mosaic_properties(definition: NEMMosaicDefinition): if definition.description: t = Text('Confirm properties', ui.ICON_SEND, ui.BOLD, 'Description:', - ui.NORMAL, definition.description) + ui.NORMAL, *split_words(trim(definition.description, 70), 22)) properties.append(t) if definition.transferable: transferable = 'Yes' @@ -92,6 +92,12 @@ def _get_mosaic_properties(definition: NEMMosaicDefinition): ui.BOLD, 'Levy recipient:', ui.MONO, *split_address(definition.levy_address)) properties.append(t) + t = Text('Confirm properties', ui.ICON_SEND, + ui.BOLD, 'Levy fee:', + ui.NORMAL, str(definition.fee), + ui.BOLD, 'Levy divisibility:', + ui.NORMAL, str(definition.divisibility)) + properties.append(t) t = Text('Confirm properties', ui.ICON_SEND, ui.BOLD, 'Levy namespace:', ui.NORMAL, definition.levy_namespace,