mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-16 04:29:08 +00:00
src/apps/wallet: fix ed25519 pubkey prefix
This commit is contained in:
parent
ffe151459b
commit
3971f4bf13
@ -20,15 +20,18 @@ async def get_public_key(ctx, msg):
|
|||||||
coin = coins.by_name(coin_name)
|
coin = coins.by_name(coin_name)
|
||||||
|
|
||||||
node_xpub = node.serialize_public(coin.xpub_magic)
|
node_xpub = node.serialize_public(coin.xpub_magic)
|
||||||
|
pubkey = node.public_key()
|
||||||
|
if pubkey[0] == 1:
|
||||||
|
pubkey = b'\x00' + pubkey[1:]
|
||||||
node_type = HDNodeType(
|
node_type = HDNodeType(
|
||||||
depth=node.depth(),
|
depth=node.depth(),
|
||||||
child_num=node.child_num(),
|
child_num=node.child_num(),
|
||||||
fingerprint=node.fingerprint(),
|
fingerprint=node.fingerprint(),
|
||||||
chain_code=node.chain_code(),
|
chain_code=node.chain_code(),
|
||||||
public_key=node.public_key())
|
public_key=pubkey)
|
||||||
|
|
||||||
if msg.show_display:
|
if msg.show_display:
|
||||||
await _show_pubkey(ctx, node.public_key())
|
await _show_pubkey(ctx, pubkey)
|
||||||
|
|
||||||
return PublicKey(node=node_type, xpub=node_xpub)
|
return PublicKey(node=node_type, xpub=node_xpub)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user