Skip to content

Commit

Permalink
fix(legacy): recognize SignTXEIP1559 on legacy build
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
matejcik committed Aug 10, 2021
1 parent 38fa919 commit a398704
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions legacy/firmware/fsm.h
Expand Up @@ -103,6 +103,7 @@ void fsm_msgEthereumGetPublicKey(const EthereumGetPublicKey *msg);
void fsm_msgEthereumSignTx(
EthereumSignTx
*msg); // not const because we mutate transaction during validation
void fsm_msgEthereumSignTxEIP1559(const EthereumSignTxEIP1559 *msg);
void fsm_msgEthereumTxAck(const EthereumTxAck *msg);
void fsm_msgEthereumSignMessage(const EthereumSignMessage *msg);
void fsm_msgEthereumVerifyMessage(const EthereumVerifyMessage *msg);
Expand Down
5 changes: 5 additions & 0 deletions legacy/firmware/fsm_msg_ethereum.h
Expand Up @@ -76,6 +76,11 @@ void fsm_msgEthereumTxAck(const EthereumTxAck *msg) {
ethereum_signing_txack(msg);
}

void fsm_msgEthereumSignTxEIP1559(const EthereumSignTxEIP1559 *msg) {
(void)msg;
fsm_sendFailure(FailureType_Failure_UnexpectedMessage, _("Not implemented"));
}

void fsm_msgEthereumGetAddress(const EthereumGetAddress *msg) {
RESP_INIT(EthereumAddress);

Expand Down
13 changes: 13 additions & 0 deletions legacy/firmware/protob/messages-ethereum.options
Expand Up @@ -6,6 +6,19 @@ EthereumSignTx.to max_size:43
EthereumSignTx.value max_size:32
EthereumSignTx.data_initial_chunk max_size:1024

EthereumSignTxEIP1559.address_n max_count:8
EthereumSignTxEIP1559.nonce max_size:32
EthereumSignTxEIP1559.max_gas_fee max_size:32
EthereumSignTxEIP1559.max_priority_fee max_size:32
EthereumSignTxEIP1559.gas_limit max_size:32
EthereumSignTxEIP1559.to max_size:32
EthereumSignTxEIP1559.value max_size:32
EthereumSignTxEIP1559.data_initial_chunk max_size:1024
EthereumSignTxEIP1559.access_list max_count:8

EthereumAccessList.address max_size:32
EthereumAccessList.storage_keys max_count:8 max_size:32

EthereumTxRequest.signature_r max_size:32
EthereumTxRequest.signature_s max_size:32

Expand Down

0 comments on commit a398704

Please sign in to comment.