Closed robertkowalski closed 6 years ago
Was a bug .. just fixed it in eosjs@15 .. The side-effect is asset values need to be padded (1.0000 instead of 1 for example). I will encourage implementations to use UDecimalPad to improve UX:
https://github.com/EOSIO/eosjs/blob/master/docs/format.md#UDecimalPad
Eos.modules.format.UDecimalPad
please re-open if you have an issue..
Make sure you don't ignore any promise within your contract block.. Add "return" :
eos.contract('organiccandy').then((contract) => {
const args = order.serialize()
return contract.orderCandy(args, { authorization: 'testuser1234@active' })
})
The example in the README now uses async
so this should be easier to see..
When I deploy the
eosio.token
contract under a different account, the eosjs lib still tries to connect to eosio.token.I have a custom contract which uses a token which I create and issue from a different account than
eosio.token
. I usedcleos set contract testcontract build/contracts/eosio.token/
for it. (note the use of the accountnametestcontract
)My setup is a blank node, with just the custom contract and the eosio.token contract under a differently named account.
Now when using eosjs it seems to pick up
eosio.token
somewhere:When I upload eosio.token as
eosio.token
eosjs does not error.The problem just happens with the JS lib, CLI is working.
I found that the problem probably is here, eosio.token is used value for
account
, even though my token comes from another account (namelytestcontract
in my example)