Closed bachvtuan closed 6 years ago
I tried to integrate scatter with eosjs to make a tweet on decentwitter Here is my code
document.addEventListener('scatterLoaded', scatterExtension => { const scatter = window.scatter; window.scatter = null; scatter.getIdentity( ).then(identity => { var network = { blockchain: 'eos', host: 'nodes.get-scatter.com', port: 443, chainId: 'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906' }; const eosOptions = {} const eos = scatter.eos( network, Eos, { chainId: network.chainId },"https"); eos.contract('decentwitter').then(contract => { contract.tweet("hello"); }); }).catch(error => { //... }); })
And I get an error:
{type: "account_missing", message: "Missing required accounts, repull the identity", code: 402, isError: true}
Can you help how to solve it ?
You aren't requesting an EOS account from getIdentity. You'll need to do that, and you might need to manually pass it in as an authorization:[] option for the contract action.
getIdentity
authorization:[]
I tried to integrate scatter with eosjs to make a tweet on decentwitter Here is my code
And I get an error:
Can you help how to solve it ?