EOSIO / eosjs-ecc

Elliptic curve cryptography functions: Private Key, Public Key, Signature, AES, Encryption, Decryption
288 stars 119 forks source link

Improve asset precision handling and validation #21

Closed jcalfee closed 6 years ago

jcalfee commented 6 years ago

Mimic the cleos wallet: assets that are not on the blockchain can derive precision from the amount.

eos.create('eosio', '100000000.00 A')

However, any asset on the blockchain will have the current behavior in eosjs and always get and validate with a precision derived from the contract's stats.max_supply value.

jcalfee commented 6 years ago

moved: https://github.com/EOSIO/eosjs/issues/136