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:
parent
bf2baf798f
commit
b5c9f573b2
1
legacy/firmware/.changelog.d/1880.added
Normal file
1
legacy/firmware/.changelog.d/1880.added
Normal file
@ -0,0 +1 @@
|
|||||||
|
Show "signature is valid" dialog when VerifyMessage succeeds.
|
@ -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"));
|
||||||
|
@ -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();
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user