-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore: update web3 to v1.10.0 and prettier to v3 #301
Conversation
"web3-providers-http": "^1.8.0", | ||
"web3-utils": "^1.8.2" | ||
"web3-eth-abi": "^1.10.0", | ||
"web3-providers-http": "^1.10.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! There were some improvements in this release
@@ -430,7 +430,7 @@ export class ERC725 { | |||
static encodePermissions(permissions: Permissions): string { | |||
const result = Object.keys(permissions).reduce((previous, key) => { | |||
return permissions[key] | |||
? previous + hexToNumber(LSP6_DEFAULT_PERMISSIONS[key]) | |||
? previous + Number(hexToNumber(LSP6_DEFAULT_PERMISSIONS[key])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this casting necessary? Doesn't the function hexToNumber
convert to a Number
already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type has changed in v1.9.0 -> https://github.com/web3/web3.js/releases/tag/v1.9.0
utils.toNumber and utils.hexToNumber can now return the large unsafe numbers as BigInt, if true was passed to a new optional parameter called bigIntOnOverflow (web3/web3.js#5845)
We dont call it with true so it should not output a BigInt, but still the TS type thinks it is Number or string. This is to limit to Number only (which should be the truth)
No description provided.