From 4c206be585d47c932680d0ca56455e03b112a026 Mon Sep 17 00:00:00 2001 From: Peter Jensen Date: Wed, 22 Mar 2017 15:15:12 +0100 Subject: [PATCH] trezor.ui: fix of fix confirmation --- src/trezor/ui/confirm.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/trezor/ui/confirm.py b/src/trezor/ui/confirm.py index d7f7ffdfda..1332977488 100644 --- a/src/trezor/ui/confirm.py +++ b/src/trezor/ui/confirm.py @@ -32,9 +32,8 @@ class ConfirmDialog(Widget): if self.cancel.touch(event, pos) == BTN_CLICKED: return CANCELLED - def __iter__(self): - result = yield loop.Wait((super().__iter__(), self.content)) - return result + async def __iter__(self): + return await loop.Wait((super().__iter__(), self.content)) class HoldToConfirmDialog(Widget): @@ -68,9 +67,8 @@ class HoldToConfirmDialog(Widget): if self.content is not None: return self.content.send(event, pos) - def __iter__(self): - result = yield loop.Wait((self._render_loop(), self._event_loop())) - return result + async def __iter__(self): + return await loop.Wait((self._render_loop(), self._event_loop())) def _render_loop(self): RENDER_DELAY = const(1000000 // 60)