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