-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v4 fix: dynex issues OK-27498 OK-27511 (#4522)
* chore: add biginerger to handle dynex varint * fix: dynex varint error * fix: max send value display error
- Loading branch information
1 parent
8fc6e96
commit 9e1accb
Showing
7 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
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,15 @@ | ||
declare module 'biginteger' { | ||
export class BigInteger { | ||
constructor(n: number | string | BigInteger, base?: number): BigInteger; | ||
|
||
compare(n: number | string | BigInteger): number; | ||
|
||
divide(n: number | string | BigInteger): BigInteger; | ||
|
||
pow(n: number | string | BigInteger): BigInteger; | ||
|
||
toJSValue(): number; | ||
|
||
lowVal(): number; | ||
} | ||
} |
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
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
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,15 @@ | ||
diff --git a/node_modules/biginteger/biginteger.js b/node_modules/biginteger/biginteger.js | ||
index b881105..41967f5 100644 | ||
--- a/node_modules/biginteger/biginteger.js | ||
+++ b/node_modules/biginteger/biginteger.js | ||
@@ -1564,6 +1564,10 @@ BigInteger.prototype.toJSValue = function() { | ||
return parseInt(this.toString(), 10); | ||
}; | ||
|
||
+BigInteger.prototype.lowVal = function () { | ||
+ return this._d[0] || 0; | ||
+}; | ||
+ | ||
var MAX_EXP = BigInteger(0x7FFFFFFF); | ||
// Constant: MAX_EXP | ||
// The largest exponent allowed in <pow> and <exp10> (0x7FFFFFFF or 2147483647). |
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