From 27a4e417079b0f023d0e1cf8e43438a2bac7c6e5 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 22 Nov 2016 20:00:22 +0100 Subject: [PATCH] refactor forgotten disabled coinByName usage --- firmware/fsm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/firmware/fsm.c b/firmware/fsm.c index ca3c997cd..67c1141cf 100644 --- a/firmware/fsm.c +++ b/firmware/fsm.c @@ -941,15 +941,11 @@ void fsm_msgEncryptMessage(EncryptMessage *msg) bool display_only = msg->has_display_only && msg->display_only; bool signing = msg->address_n_count > 0; RESP_INIT(EncryptedMessage); - const CoinType *coin = 0; const HDNode *node = 0; uint8_t address_raw[MAX_ADDR_RAW_SIZE]; if (signing) { - coin = coinByName(msg->coin_name); - if (!coin) { - fsm_sendFailure(FailureType_Failure_Other, "Invalid coin name"); - return; - } + const CoinType *coin = fsm_getCoin(msg->coin_name); + if (!coin) return; if (!protectPin(true)) { layoutHome(); return;