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

Some actions are working with key, but doesn't working with Scatter #170

Closed plazav closed 5 years ago

plazav commented 5 years ago

When I try to use next code

   await this.eos.transaction({
        actions: [
          {
            account: 'eosio.token',
            name: 'setram',
            authorization: [{ actor: this.accountName, permission: this.permission }],
            data: {
              max_ram_size: this.model.ramSize
            }
          }
        ]
      })

I am recieving exception:

TypeError: Cannot read property 'type' of undefined at A.Promise.all.e.transaction.actions.map (chrome-extension://ammjpmhgckkpcamddpolhchgomcojkle/inject.js:40:271301) at Array.map () at A (chrome-extension://ammjpmhgckkpcamddpolhchgomcojkle/inject.js:40:271209)

But everything is well when I use Key instead of Scatter.

Same error is for

   await this.eos.transaction({
        actions: [
          {
            account: 'eosio.token',
            name: 'setpriv',
            authorization: [{ actor: this.accountName, permission: this.permission }],
            data: {
              account: this.accountName,
              is_priv: Number(this.isPriv)
            }
          }
        ]
      })
nsjames commented 5 years ago

Please move to https://github.com/GetScatter/scatter-js

This extension is deprecated.

Also, Scatter doesn't support the { actions:[] } transaction. You will need to use the contract constructor method instead.

eos.transaction(['contract'], contracts => {});