vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.28k stars 857 forks source link

mktx doesn't work with float values #40

Closed vp29 closed 9 years ago

vp29 commented 9 years ago

The code shown in the readme does not work with a float value.

h = history(fromWallet) jsonTrans = [{'value': 0.1, 'address': intoWallet}] trans = mktx(h, jsonTrans)

will result in an error on line 73 in main.py : TypeError: string indices must be integers, not float

result = code_string[val % base] + result

vbuterin commented 9 years ago

Yeah, you need to express values in satoshis.

vp29 commented 9 years ago

ok, that makes sense.