1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-25 07:48:10 +00:00

feat(legacy): Show "signature is valid" dialog when VerifyMessage succeeds.

This commit is contained in:
Andrew Kozlik 2022-02-04 18:35:21 +01:00 committed by Andrew Kozlik
parent bf2baf798f
commit b5c9f573b2
4 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1 @@
Show "signature is valid" dialog when VerifyMessage succeeds.

View File

@ -343,6 +343,14 @@ void fsm_msgVerifyMessage(const VerifyMessage *msg) {
return; return;
} }
layoutDialogSwipe(&bmp_icon_ok, NULL, _("Continue"), NULL, NULL,
_("The signature is valid."), NULL, NULL, NULL, NULL);
if (!protectButton(ButtonRequestType_ButtonRequest_Other, true)) {
fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL);
layoutHome();
return;
}
fsm_sendSuccess(_("Message verified")); fsm_sendSuccess(_("Message verified"));
} else { } else {
fsm_sendFailure(FailureType_Failure_DataError, _("Invalid signature")); fsm_sendFailure(FailureType_Failure_DataError, _("Invalid signature"));

View File

@ -204,6 +204,14 @@ void fsm_msgEthereumVerifyMessage(const EthereumVerifyMessage *msg) {
return; return;
} }
layoutDialogSwipe(&bmp_icon_ok, NULL, _("Continue"), NULL, NULL,
_("The signature is valid."), NULL, NULL, NULL, NULL);
if (!protectButton(ButtonRequestType_ButtonRequest_Other, true)) {
fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL);
layoutHome();
return;
}
fsm_sendSuccess(_("Message verified")); fsm_sendSuccess(_("Message verified"));
layoutHome(); layoutHome();

View File

@ -300,6 +300,7 @@ def test_verify_message_t1(client: Client):
with client: with client:
client.set_expected_responses( client.set_expected_responses(
[ [
messages.ButtonRequest,
messages.ButtonRequest, messages.ButtonRequest,
messages.ButtonRequest, messages.ButtonRequest,
messages.Success, messages.Success,