Skip to content
Permalink
Browse files

Reallow amount in Decimal format

  • Loading branch information...
clementperon committed Jan 29, 2019
1 parent 331fc3f commit 2cbed26dc2193d3574e1c9f6148434d27ca7bd99
Showing with 3 additions and 2 deletions.
  1. +3 −2 examples/signTx.py
@@ -21,6 +21,7 @@

from ledgerblue.comm import getDongle
from ledgerblue.commException import CommException
from decimal import Decimal
import argparse
import struct
import binascii
@@ -51,7 +52,7 @@ def parse_bip32_path(path):
parser.add_argument('--nonce', help="Nonce associated to the account", type=int, required=True)
parser.add_argument('--gasprice', help="Network gas price", type=int, required=True)
parser.add_argument('--startgas', help="startgas", default='21000', type=int)
parser.add_argument('--amount', help="Amount to send in ether", type=int, required=True)
parser.add_argument('--amount', help="Amount to send in ether", required=True)
parser.add_argument('--to', help="Destination address", type=str, required=True)
parser.add_argument('--path', help="BIP 32 path to sign with")
parser.add_argument('--data', help="Data to add, hex encoded")
@@ -65,7 +66,7 @@ def parse_bip32_path(path):
else:
args.data = decode_hex(args.data[2:])

amount = args.amount * 10**18
amount = Decimal(args.amount) * 10**18

tx = Transaction(
nonce=int(args.nonce),

0 comments on commit 2cbed26

Please sign in to comment.
You can’t perform that action at this time.