eosjs-ecc icon indicating copy to clipboard operation
eosjs-ecc copied to clipboard

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined

Open rahul1083 opened this issue 5 years ago • 1 comments

Getting error on account creation :- const defaultPrivateKey = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"; // bob const signatureProvider = new JsSignatureProvider(['5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3']); const api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });

const result = await api.transact( { account: 'eosio', name: 'newaccount', authorization: [{ actor: 'eosio', permission: 'active', }], data: { creator: 'eosio', name: 'mynewaccount', owner: { threshold: 1, keys: [{ key: '6FPFZqw5ahYrR9jD96yDbbDNTdKtNqRbze6oTDLntrsANgQKZu', weight: 1 }], accounts: [], waits: [] }, active: { threshold: 1, keys: [{ key: '6FPFZqw5ahYrR9jD96yDbbDNTdKtNqRbze6oTDLntrsANgQKZu', weight: 1 }], accounts: [], waits: [] }, }, }, { blocksBehind: 3, expireSeconds: 30, } );

rahul1083 avatar Feb 10 '20 11:02 rahul1083

Clarified on https://github.com/EOSIO/eosjs/issues/688

jlamarr22 avatar Feb 24 '20 21:02 jlamarr22