You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Web3 from 'web3';
var HDWalletProvider = require("truffle-hdwallet-provider");
const web3 = new Web3(new HDWalletProvider(mnemonic, "https://ropsten.infura.io/v3/key"));
web3.eth.getAccounts().then(console.log);
web3.eth.personal.getAccounts().then(console.log); // Same error in both
Error Logs
(node:3442) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined
at GetAccountsMethod.afterExecution (/Users/project/node_modules/web3-core-method/dist/web3-core-method.cjs.js:762:23)
at GetAccountsMethod._callee$ (/Users/project/node_modules/web3-core-method/dist/web3-core-method.cjs.js:457:39)
at tryCatch (/Users/project/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/Users/project/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:288:22)
at Generator.prototype.(anonymous function) [as next] (/Users/project/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:114:21)
at asyncGeneratorStep (/Users/project/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/Users/project/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at <anonymous>
Expected behavior
Return the list of accounts
Actual behavior
Error as below
Steps to reproduce the behavior
Error Logs
Versions
NPM : 6.7.0
Node.js: 11.10.0
web3 : 1.0.0-beta.46 & 1.0.0-beta.44
The text was updated successfully, but these errors were encountered: