Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rahul1083 opened this issue Feb 10, 2020 · 1 comment

Comments

@rahul1083
Copy link

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,
}
);

@jlamarr22
Copy link
Contributor

jlamarr22 commented Feb 24, 2020

Clarified on EOSIO/eosjs#688

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants