From 3020b5d4a94296cd95b05342fd22b7da1ca5d1f3 Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Fri, 2 Nov 2018 14:41:19 +0100 Subject: [PATCH] xmr: key image sync progress --- src/apps/monero/key_image_sync.py | 2 ++ src/apps/monero/layout/confirms.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/src/apps/monero/key_image_sync.py b/src/apps/monero/key_image_sync.py index a72001d073..fb3455d827 100644 --- a/src/apps/monero/key_image_sync.py +++ b/src/apps/monero/key_image_sync.py @@ -70,6 +70,8 @@ async def _sync_step(s, ctx, tds): buff = bytearray(32 * 3) buff_mv = memoryview(buff) + await confirms.keyimage_sync_step(ctx, s.current_output, s.num_outputs) + for td in tds.tdis: s.current_output += 1 if s.current_output >= s.num_outputs: diff --git a/src/apps/monero/layout/confirms.py b/src/apps/monero/layout/confirms.py index 1d2b3c4a2a..6a02845146 100644 --- a/src/apps/monero/layout/confirms.py +++ b/src/apps/monero/layout/confirms.py @@ -123,3 +123,12 @@ async def transaction_step(ctx, step, sub_step=None, sub_step_total=None): text = Text("Signing transaction", ui.ICON_SEND, icon_color=ui.BLUE) text.normal(*info) text.render() + + +@ui.layout +async def keyimage_sync_step(ctx, current, total_num): + if current is None: + return + text = Text("Syncing", ui.ICON_SEND, icon_color=ui.BLUE) + text.normal("%d/%d" % (current + 1, total_num)) + text.render()