diff --git a/src/apps/nem/mosaic/layout.py b/src/apps/nem/mosaic/layout.py index 1e1c9bb6bb..f42bc4cff3 100644 --- a/src/apps/nem/mosaic/layout.py +++ b/src/apps/nem/mosaic/layout.py @@ -1,6 +1,6 @@ from micropython import const -from trezor import ui +from trezor import ui, wire from trezor.messages import ( NEMMosaicCreation, NEMMosaicDefinition, @@ -9,7 +9,7 @@ from trezor.messages import ( NEMSupplyChangeType, NEMTransactionCommon, ) -from trezor.ui.confirm import ConfirmDialog +from trezor.ui.confirm import ConfirmDialog, CONFIRMED from trezor.ui.scroll import Scrollpage, animate_swipe, paginate from trezor.ui.text import Text @@ -75,6 +75,7 @@ def _supply_message(supply_change): async def _require_confirm_properties(ctx, definition: NEMMosaicDefinition): + # TODO: we should send a button request here properties = _get_mosaic_properties(definition) first_page = const(0) paginator = paginate(_show_page, len(properties), first_page, properties) @@ -85,7 +86,8 @@ async def _require_confirm_properties(ctx, definition: NEMMosaicDefinition): async def _show_page(page: int, page_count: int, content): content = Scrollpage(content[page], page, page_count) if page + 1 == page_count: - await ConfirmDialog(content) + if await ConfirmDialog(content) != CONFIRMED: + raise wire.ActionCancelled("Action cancelled") else: content.render() await animate_swipe() diff --git a/vendor/trezor-storage b/vendor/trezor-storage new file mode 160000 index 0000000000..8970e2bdeb --- /dev/null +++ b/vendor/trezor-storage @@ -0,0 +1 @@ +Subproject commit 8970e2bdebb3334ddd0bacf41c66be79e78880f8