Skip to content

Commit 7c6d2fe

Browse files
committed
ask for PIN in GetAddress and GetPublicKey messages
1 parent f5fb0c3 commit 7c6d2fe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

firmware/fsm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ void fsm_msgGetPublicKey(GetPublicKey *msg)
268268
{
269269
RESP_INIT(PublicKey);
270270

271+
if (!protectPin(true)) {
272+
layoutHome();
273+
return;
274+
}
275+
271276
const HDNode *node = fsm_getDerivedNode(msg->address_n, msg->address_n_count);
272277
if (!node) return;
273278

@@ -500,6 +505,11 @@ void fsm_msgGetAddress(GetAddress *msg)
500505
{
501506
RESP_INIT(Address);
502507

508+
if (!protectPin(true)) {
509+
layoutHome();
510+
return;
511+
}
512+
503513
const CoinType *coin = fsm_getCoin(msg->coin_name);
504514
if (!coin) return;
505515
const HDNode *node = fsm_getDerivedNode(msg->address_n, msg->address_n_count);

0 commit comments

Comments
 (0)