GetScatter / ScatterWebExtension

Extension that allows you to sign transactions with your private keys securely from within the browser without ever exposing them.
MIT License
366 stars 127 forks source link

Error when not passing in 'chainId' to scatter.eos #144

Closed yagottahavehart closed 5 years ago

yagottahavehart commented 5 years ago

Scatter 6.1.5 Eosjs 16.0.0

 const network = {
          blockchain:'eos',
          host: 'localhost',
          port:8888
}

// scatter.getIdentity({accounts:[ network ]}).then(identity => {
const eos = scatter.eos( network, Eos, {});

// eos.contract('foo').then(contract => { ... 
contract.bar(account.name, 'baz', { authorization: [`${account.name}@${account.authority}`] });

results in error: options is not defined which appears to refer to https://github.com/GetScatter/ScatterWebExtension/blob/master/src/plugins/defaults/eos.js#L153

Before the extension update, the above code resulted in a correct eos connection. Now, I get that error. If I throw a chainId in there (only seems to support default cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f) it goes through but I get an 'Missing required accounts, repull the identity, 402' error when calling contracts that previously succeeded.

Any thoughts?

nsjames commented 5 years ago

Hmm should have been backwards compatible but indeed there was a change there. You'll need to update that code to put the chainId inside of the network ( it should always be there anyway )

nsjames commented 5 years ago

Oh actually yeah there's a typo there. Should have been _options

nsjames commented 5 years ago

e2015d8cd610394d5289c6eb551fc7ccb82f56f0 not yet pushed to chrome store