1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 03:18:09 +00:00

fsm: correctly set node in EthereumPublicKey response

This commit is contained in:
Pavol Rusnak 2019-02-28 16:38:48 +01:00
parent c7af39bf8d
commit f40219dbb6
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -44,6 +44,7 @@ void fsm_msgEthereumGetPublicKey(const EthereumGetPublicKey *msg)
}
}
resp->has_node = true;
resp->node.depth = node->depth;
resp->node.fingerprint = fingerprint;
resp->node.child_num = node->child_num;
@ -53,8 +54,8 @@ void fsm_msgEthereumGetPublicKey(const EthereumGetPublicKey *msg)
resp->node.has_public_key = true;
resp->node.public_key.size = 33;
memcpy(resp->node.public_key.bytes, node->public_key, 33);
resp->has_xpub = true;
resp->has_xpub = true;
hdnode_serialize_public(node, fingerprint, coin->xpub_magic, resp->xpub, sizeof(resp->xpub));
msg_write(MessageType_MessageType_EthereumPublicKey, resp);