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

firmware: set bitcoin's has_node

The field has been changed to optional in
84f5a0e393
.
This commit is contained in:
Tomas Susanka 2019-03-12 15:10:45 +01:00
parent a4668bedb4
commit 57423c9f54

View File

@ -48,6 +48,7 @@ void fsm_msgGetPublicKey(const GetPublicKey *msg)
} }
} }
resp->has_node = true;
resp->node.depth = node->depth; resp->node.depth = node->depth;
resp->node.fingerprint = fingerprint; resp->node.fingerprint = fingerprint;
resp->node.child_num = node->child_num; resp->node.child_num = node->child_num;
@ -61,8 +62,8 @@ void fsm_msgGetPublicKey(const GetPublicKey *msg)
/* ed25519 public key */ /* ed25519 public key */
resp->node.public_key.bytes[0] = 0; resp->node.public_key.bytes[0] = 0;
} }
resp->has_xpub = true;
resp->has_xpub = true;
if (coin->xpub_magic && (script_type == InputScriptType_SPENDADDRESS || script_type == InputScriptType_SPENDMULTISIG)) { if (coin->xpub_magic && (script_type == InputScriptType_SPENDADDRESS || script_type == InputScriptType_SPENDMULTISIG)) {
hdnode_serialize_public(node, fingerprint, coin->xpub_magic, resp->xpub, sizeof(resp->xpub)); hdnode_serialize_public(node, fingerprint, coin->xpub_magic, resp->xpub, sizeof(resp->xpub));
} else } else