-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove bn.js and resolutions from celo/utils (#105)
* Remove bn.js and resolutions. * docs --------- Co-authored-by: Aaron <[email protected]>
- Loading branch information
Showing
8 changed files
with
22 additions
and
57 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,19 @@ | ||
--- | ||
'@celo/utils': major | ||
--- | ||
|
||
Remove export compareBN | ||
|
||
This would have been used to sort BN.js numbers. Generic comparator functions are not really the scope of this library. Removing it allows the bn.js dependency to be removed too. If you were using this function it can be re-implemented as | ||
|
||
```typescript | ||
export function compareBN(a: BN, b: BN) { | ||
if (a.eq(b)) { | ||
return 0 | ||
} else if (a.lt(b)) { | ||
return -1 | ||
} else { | ||
return 1 | ||
} | ||
} | ||
``` |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -24,11 +24,9 @@ | |
"dependencies": { | ||
"@celo/base": "^6.0.0", | ||
"@ethereumjs/util": "8.0.5", | ||
"@types/bn.js": "^5.1.0", | ||
"@types/elliptic": "^6.4.9", | ||
"@types/node": "^18.7.16", | ||
"bignumber.js": "^9.0.0", | ||
"bn.js": "4.11.9", | ||
"elliptic": "^6.5.4", | ||
"ethereum-cryptography": "1.2.0", | ||
"fp-ts": "2.1.1", | ||
|
@@ -39,12 +37,5 @@ | |
}, | ||
"devDependencies": { | ||
"@celo/typescript": "0.0.1" | ||
}, | ||
"resolutions": { | ||
"@types/bn.js": "4.11.6", | ||
"bn.js": "4.11.9", | ||
"elliptic/bn.js": "[email protected]", | ||
"web3-utils/bn.js": "[email protected]", | ||
"@ethereumjs/bn.js": "[email protected]" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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