1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 14:58:09 +00:00

refactor forgotten disabled coinByName usage

This commit is contained in:
Pavol Rusnak 2016-11-22 20:00:22 +01:00
parent 0ec32a6146
commit 27a4e41707
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -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;