mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 05:28:40 +00:00
refactor forgotten disabled coinByName usage
This commit is contained in:
parent
0ec32a6146
commit
27a4e41707
@ -941,15 +941,11 @@ void fsm_msgEncryptMessage(EncryptMessage *msg)
|
|||||||
bool display_only = msg->has_display_only && msg->display_only;
|
bool display_only = msg->has_display_only && msg->display_only;
|
||||||
bool signing = msg->address_n_count > 0;
|
bool signing = msg->address_n_count > 0;
|
||||||
RESP_INIT(EncryptedMessage);
|
RESP_INIT(EncryptedMessage);
|
||||||
const CoinType *coin = 0;
|
|
||||||
const HDNode *node = 0;
|
const HDNode *node = 0;
|
||||||
uint8_t address_raw[MAX_ADDR_RAW_SIZE];
|
uint8_t address_raw[MAX_ADDR_RAW_SIZE];
|
||||||
if (signing) {
|
if (signing) {
|
||||||
coin = coinByName(msg->coin_name);
|
const CoinType *coin = fsm_getCoin(msg->coin_name);
|
||||||
if (!coin) {
|
if (!coin) return;
|
||||||
fsm_sendFailure(FailureType_Failure_Other, "Invalid coin name");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!protectPin(true)) {
|
if (!protectPin(true)) {
|
||||||
layoutHome();
|
layoutHome();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user