mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-19 04:48:12 +00:00
stellar: account check
This commit is contained in:
parent
17a4ccd268
commit
1d3490a278
@ -44,6 +44,8 @@ async def sign_tx(ctx, msg):
|
|||||||
node = await seed.derive_node(ctx, msg.address_n, STELLAR_CURVE)
|
node = await seed.derive_node(ctx, msg.address_n, STELLAR_CURVE)
|
||||||
pubkey = seed.remove_ed25519_public_key_prefix(node.public_key())
|
pubkey = seed.remove_ed25519_public_key_prefix(node.public_key())
|
||||||
write_pubkey(w, pubkey)
|
write_pubkey(w, pubkey)
|
||||||
|
if msg.source_account != pubkey:
|
||||||
|
raise ValueError('Stellar: source account does not match address_n')
|
||||||
|
|
||||||
write_uint32(w, msg.fee)
|
write_uint32(w, msg.fee)
|
||||||
write_uint64(w, msg.sequence_number)
|
write_uint64(w, msg.sequence_number)
|
||||||
|
Loading…
Reference in New Issue
Block a user