Closed outdoteth closed 6 years ago
Eosjs is just pass-through for nodeos .. It is defainately your nodeos version. How are you connecting to the backend?
Hmmm, I seem to have gotten it fixed thanks to some help in the Eos Developer chat by using getTableRows()
. Apparently the data is no longer accessible with getAccount()
.
@Dylan-Phoon Could you tell which API can get those info for now?
@Dylan-Phoon, please share your solution
@ripley @plazav This will log the balance of the accounts for the eosio.token contract.
eos.getTableRows({ code: "eosio.token", scope: <name_of_your_account>, table: "accounts", json: true }).then(res => {
console.log(res);
}
When I run
eos.getAccount("dylan1").then(function(res){ console.log(res) });
It returns this:
{ account_name: 'dylan1', permissions: [ { perm_name: 'active', parent: 'owner', required_auth: [Object] }, { perm_name: 'owner', parent: '', required_auth: [Object] } ] }
Expected should be:
{ "account_name": "name", "eos_balance": "uint64", "staked_balance": "uint64", "unstaking_balance": "uint64", "last_unstaking_time": "time", "permissions": "vector<permission>", "producer": "optional<producer_info>" }
As you can see,
"eos_balance": "uint64", "staked_balance": "uint64", "unstaking_balance": "uint64", "last_unstaking_time": "time",
are all missing...