mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-21 12:02:19 +00:00
Prevent floating point issues when pushing output amount
This commit is contained in:
parent
e4429242aa
commit
f3b7629a4f
@ -84,7 +84,7 @@ def insight_tx(url, rawdata=False):
|
|||||||
|
|
||||||
for vout in data['vout']:
|
for vout in data['vout']:
|
||||||
o = t.bin_outputs.add()
|
o = t.bin_outputs.add()
|
||||||
o.amount = int(Decimal(vout['value']) * 100000000)
|
o.amount = int(Decimal(str(vout['value'])) * 100000000)
|
||||||
asm = vout['scriptPubKey']['asm'].split(' ')
|
asm = vout['scriptPubKey']['asm'].split(' ')
|
||||||
asm = [ opcode_serialize(x) for x in asm ]
|
asm = [ opcode_serialize(x) for x in asm ]
|
||||||
o.script_pubkey = ''.join(asm)
|
o.script_pubkey = ''.join(asm)
|
||||||
|
Loading…
Reference in New Issue
Block a user