Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

web3.eth.accounts.wallet errors when using #2647

@winter38

Description

@winter38

web3.eth.accounts.wallet errors when using

I'm trying update lib to new version and got errors with wallet. I am not sure if errors was described before, but i got those, when i work with wallet (works fine with beta-33 web3.js version).

Actual behavior

web3.eth.accounts.wallet.add(privateKey);
web3.eth.accounts.wallet.save('password', 'key');
->Error: TypeError: this.accounts[i] is undefined

When i try to load (this wallet was stored with old version of web3.js)

web3.eth.accounts.wallet.load('password', 'key');
SyntaxError: "JSON.parse: unexpected character at line 1 column 1 of the JSON data"
    fromV3Keystore web3-eth-accounts.umd.js:151
    decrypt web3-eth-accounts.umd.js:266
    decrypt web3-eth-accounts.umd.js:265
    load web3-eth-accounts.umd.js:314

Versions

  • web3.js 1.0.0-beta.51
  • browser - firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAddressing a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions