Skip to content

Commit

Permalink
xmr: tsx confirmation raises exception on cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Sep 17, 2018
1 parent 00dd8f6 commit 447a862
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion src/apps/monero/controller/iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ async def confirm_transaction(self, tsx_data, creds=None, ctx=None):
loop.schedule(slide)

await loop.sleep(200 * 1000)
return True

async def transaction_error(self, *args, **kwargs):
from trezor import ui
Expand Down
8 changes: 1 addition & 7 deletions src/apps/monero/protocol/tsx_sign_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,7 @@ async def init_transaction(self, tsx_data):
self._mem_trace(1)

# Ask for confirmation
confirmation = await self.iface.confirm_transaction(tsx_data, self.creds)
if not confirmation:
from trezor.messages import FailureType
from trezor.messages.Failure import Failure

return Failure(code=FailureType.ActionCancelled, message="rejected")

await self.iface.confirm_transaction(tsx_data, self.creds)
gc.collect()
self._mem_trace(3)

Expand Down

0 comments on commit 447a862

Please sign in to comment.