EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 463 forks source link

Type asset when send to server incorrect ! #45

Closed navcsdev closed 6 years ago

navcsdev commented 6 years ago

const config = {
  keyProvider: ['5KidmFeAxac6F2LMrkf43LjqhhVGDnPXkq33ZvJ3uRugbbLQiU4', '5JC9emfULeVp3H5RMWoo4Qe8tiajcnHhwG4pVbbjR8exHBC1vWm'], // WIF string or array of keys..
  httpEndpoint: 'http://127.0.0.1:8888',
  expireInSeconds: 60
};

const eos = Eos.Localnet(config);

console.log(eos.getBlock());

eos.contract('currency').then(currency => {  
  currency.transfer('navcs', 'currency', '1.00000000 LCCC', 'Eosjs test').then(result => {
    console.log(result);
    console.log('transfer success');
  }).catch(error => {
    console.log(error);
    console.log('transfer error');
  });
});

Param quantity in above request is 1.00000000 LCCC. It will have symbol is S(8, LCCC) but on the server EOS I receive S(4, LCCC) !

So I can not query correct balance of account 🙇

jcalfee commented 6 years ago

Duplicate: https://github.com/EOSIO/eosjs/issues/34

The c++ devs know about this .. I'll followup today. Please follow ticket #34 ..