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

stellar: account check

This commit is contained in:
Tomas Susanka 2018-05-26 18:17:04 +02:00
parent 17a4ccd268
commit 1d3490a278

View File

@ -44,6 +44,8 @@ async def sign_tx(ctx, msg):
node = await seed.derive_node(ctx, msg.address_n, STELLAR_CURVE)
pubkey = seed.remove_ed25519_public_key_prefix(node.public_key())
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_uint64(w, msg.sequence_number)