From ba44a21a40f590113d9b01dda0419423dde3c18d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 21 Nov 2017 15:57:30 +0100 Subject: [PATCH] apps/wallet: confirm OP_RETURN on display --- src/apps/wallet/sign_tx/layout.py | 1 + src/apps/wallet/sign_tx/signing.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/wallet/sign_tx/layout.py b/src/apps/wallet/sign_tx/layout.py index 991b7144..b85a7ca9 100644 --- a/src/apps/wallet/sign_tx/layout.py +++ b/src/apps/wallet/sign_tx/layout.py @@ -15,6 +15,7 @@ def split_address(address): async def confirm_output(ctx, output, coin): + # TODO: handle OP_RETURN correctly content = Text('Confirm output', ui.ICON_RESET, ui.BOLD, format_amount(output.amount, coin), ui.NORMAL, 'to', diff --git a/src/apps/wallet/sign_tx/signing.py b/src/apps/wallet/sign_tx/signing.py index 3634fd15..dfd05a24 100644 --- a/src/apps/wallet/sign_tx/signing.py +++ b/src/apps/wallet/sign_tx/signing.py @@ -176,7 +176,7 @@ async def sign_tx(tx: SignTx, root): raise SigningError(FailureType.ProcessError, 'Only one change output is valid') change_out = txo.amount - elif txo.script_type != OutputScriptType.PAYTOOPRETURN: + else: if not await confirm_output(txo, coin): raise SigningError(FailureType.ActionCancelled, 'Output cancelled')