-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bitcoinjs-lib remove MAX_SAFE_INTEGER limitations (#8130)
- Loading branch information
1 parent
de246ca
commit aaf6695
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
.yarn/patches/@shapeshiftoss-bitcoinjs-lib-npm-5.2.0-shapeshift.2-e59ff81828.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/src/bufferutils.js b/src/bufferutils.js | ||
index a68fd31ceae3e9c465b09efd7b486fe60f88a965..14ac893566b9a87a3a2d3bd98aa5faacc4306850 100644 | ||
--- a/src/bufferutils.js | ||
+++ b/src/bufferutils.js | ||
@@ -4,12 +4,11 @@ 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 (Math.floor(value) !== value) | ||
throw new Error('value has a fractional component'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters