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

feat: bitcoinjs-lib remove MAX_SAFE_INTEGER limitations #8130

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .yarn/patches/bitcoinjs-lib-npm-5.2.0-f462e8de5e.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/src/bufferutils.js b/src/bufferutils.js
index a68fd31ceae3e9c465b09efd7b486fe60f88a965..e7bcf783ac92a4fcdf7ff32e31707bb2c10bfaed 100644
--- a/src/bufferutils.js
+++ b/src/bufferutils.js
@@ -4,12 +4,12 @@ const types = require('./types');
const typeforce = require('typeforce');
const varuint = require('varuint-bitcoin');
// https://github.com/feross/buffer/blob/master/index.js#L1127
-function verifuint(value, max) {
+function verifuint(value, _max) {
if (typeof value !== 'number')
throw new Error('cannot write a non-number as a number');
if (value < 0)
throw new Error('specified a negative value for writing an unsigned value');
- if (value > max) throw new Error('RangeError: value out of range');
+ // if (value > max) throw new Error('RangeError: value out of range');
if (Math.floor(value) !== value)
throw new Error('value has a fractional component');
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@
"react-scripts/workbox-webpack-plugin": "^7.1.0",
"p-queue": "^6.6.2",
"web3": "4.2.1-dev.a0d6730.0",
"react-scripts@^5.0.1": "patch:react-scripts@npm%3A5.0.1#./.yarn/patches/react-scripts-npm-5.0.1-d06bd2d5ad.patch"
"react-scripts@^5.0.1": "patch:react-scripts@npm%3A5.0.1#./.yarn/patches/react-scripts-npm-5.0.1-d06bd2d5ad.patch",
"bitcoinjs-lib@^5.2.0": "patch:bitcoinjs-lib@npm%3A5.2.0#./.yarn/patches/bitcoinjs-lib-npm-5.2.0-f462e8de5e.patch",
"bitcoinjs-lib@^5.0.3": "patch:bitcoinjs-lib@npm%3A5.2.0#./.yarn/patches/bitcoinjs-lib-npm-5.2.0-f462e8de5e.patch"
}
}
25 changes: 24 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18025,7 +18025,7 @@ __metadata:
languageName: node
linkType: hard

"bitcoinjs-lib@npm:^5.0.3, bitcoinjs-lib@npm:^5.2.0":
"bitcoinjs-lib@npm:5.2.0":
version: 5.2.0
resolution: "bitcoinjs-lib@npm:5.2.0"
dependencies:
Expand All @@ -18048,6 +18048,29 @@ __metadata:
languageName: node
linkType: hard

"bitcoinjs-lib@patch:bitcoinjs-lib@npm%3A5.2.0#./.yarn/patches/bitcoinjs-lib-npm-5.2.0-f462e8de5e.patch::locator=%40shapeshiftoss%2Fweb%40workspace%3A.":
version: 5.2.0
resolution: "bitcoinjs-lib@patch:bitcoinjs-lib@npm%3A5.2.0#./.yarn/patches/bitcoinjs-lib-npm-5.2.0-f462e8de5e.patch::version=5.2.0&hash=bf3b30&locator=%40shapeshiftoss%2Fweb%40workspace%3A."
dependencies:
bech32: ^1.1.2
bip174: ^2.0.1
bip32: ^2.0.4
bip66: ^1.1.0
bitcoin-ops: ^1.4.0
bs58check: ^2.0.0
create-hash: ^1.1.0
create-hmac: ^1.1.3
merkle-lib: ^2.0.10
pushdata-bitcoin: ^1.0.1
randombytes: ^2.0.1
tiny-secp256k1: ^1.1.1
typeforce: ^1.11.3
varuint-bitcoin: ^1.0.4
wif: ^2.0.1
checksum: 5d9416a46fb915e7fb3c5905dd44d285c64a815f8ee6131d0bee79603ab6459245927e706113bca20ad233f6e637423b3faad394d31caccba6c0d2216b00c2f2
languageName: node
linkType: hard

"bitcoinjs-message@npm:^2.0.0":
version: 2.2.0
resolution: "bitcoinjs-message@npm:2.2.0"
Expand Down
Loading