Eosjs with scatter - couldn't make use of signature from scatter while performing transactions
I am trying to use eosjs along with scatter in my web Application with ReactJS, but I couldn't figure out how to use scatter signature in place of eosjs permission while performing transactions.
1. I tried following code snippet, but its giving me error

But its giving me error,
Failed for eosScatter transfer TypeError: t(...)[u] is not a function
at Promise (inject.js:40)
at new Promise (<anonymous>)
at Proxy.n (inject.js:40)
at CreateAccount.js:139
- I also used following code to bring the get permission for window, but still not working

and giving following error

could anyone guide me how to use scatter signature in eosjs apis with proper syntax, OR how to pop this get signature window and then perform transaction
3. Also I am getting error(TypeError: Cannot read property 'find' of undefined) while getting identity.accounts
console.log("identity = ", scatter.identity); // it gives identity with {hash, key, name, publicKey} object
const account = scatter.identity.accounts.find(account => account.blockchain === 'eos');
Please guide for above
@nsjames may be able to help. I'm unfamiliar with scatter's signing but thought it handles sending the transaction for you as well.
It would be really nice if he would! As I simply need to know how exactly I can get the permission from scatter to perform actions which needs authorization(like transfer or set contract); I need exact syntax as documentation is not in depth for me.
Thanks in advance.
Hi, Actually I was able to find the solution with the help of scatter telegram group.
-
Basically answer to my 1st and 2nd query was, I should pass account name on which I have published a contract rather than contract name in method
eosScatter.contract()
-
And answer to the third query is Scatter identity was not picking properly with actual account info, so to do that we need to create scatter object using network object along with the chainId added explicitly. -- Also don't forget to add chain id in network field of scatter plugin.
anyway Thanks though :)
@amolmaid thx guy. similar issue stuck me many hours, that's really helps.