Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Fix toString Padding for Address types #1594

Closed
MicaiahReid opened this issue Nov 17, 2021 · 0 comments · Fixed by #2716
Closed

Fix toString Padding for Address types #1594

MicaiahReid opened this issue Nov 17, 2021 · 0 comments · Fixed by #2716
Assignees
Milestone

Comments

@MicaiahReid
Copy link
Contributor

The original intent for Address was to have the following functionality:

const address = new Address("0x1");
console.log(address.toString()) // 0x0000000000000000000000000000000000000001

where the original value, "0x1" is stored, but the toString() representation pads the values with zeros to be a proper address. This isn't actually working, and likely points to overall issues in json-rpc-data and json-rpc-base-types that could have side affects to consider.

As an additional note, this also leads to evm_addAccount adding invalid account addresses to the personal namespace.

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

Successfully merging a pull request may close this issue.

3 participants