-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1223 from LimeChain/remove-bnjs
Replace bn.js with BigInt
- Loading branch information
Showing
52 changed files
with
410 additions
and
347 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,14 @@ | ||
--- | ||
"near-api-js": major | ||
"@near-js/accounts": minor | ||
"@near-js/transactions": minor | ||
"@near-js/types": minor | ||
"@near-js/utils": minor | ||
"@near-js/biometric-ed25519": patch | ||
"@near-js/cookbook": patch | ||
"@near-js/crypto": patch | ||
"@near-js/providers": patch | ||
"@near-js/wallet-account": patch | ||
--- | ||
|
||
Replace bn.js by BigInt. |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ globals: | |
jasmine: true | ||
window: false | ||
fail: true | ||
BigInt: true |
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 |
---|---|---|
@@ -1,45 +1,44 @@ | ||
{ | ||
"name": "@near-js/accounts", | ||
"version": "1.0.4", | ||
"description": "Classes encapsulating account-specific functionality", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "pnpm compile", | ||
"compile": "tsc -p tsconfig.json", | ||
"lint:js": "eslint -c ../../.eslintrc.js.yml test/**/*.js --no-eslintrc", | ||
"lint:js:fix": "eslint -c ../../.eslintrc.js.yml test/**/*.js --no-eslintrc --fix", | ||
"lint:ts": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts --no-eslintrc", | ||
"lint:ts:fix": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts --no-eslintrc --fix", | ||
"test": "jest test" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@near-js/crypto": "workspace:*", | ||
"@near-js/providers": "workspace:*", | ||
"@near-js/signers": "workspace:*", | ||
"@near-js/transactions": "workspace:*", | ||
"@near-js/types": "workspace:*", | ||
"@near-js/utils": "workspace:*", | ||
"bn.js": "5.2.1", | ||
"borsh": "1.0.0", | ||
"depd": "2.0.0", | ||
"is-my-json-valid": "^2.20.6", | ||
"lru_map": "0.4.1", | ||
"near-abi": "0.1.1" | ||
}, | ||
"devDependencies": { | ||
"@near-js/keystores": "workspace:*", | ||
"@types/node": "18.11.18", | ||
"bs58": "4.0.0", | ||
"jest": "26.0.1", | ||
"near-hello": "0.5.1", | ||
"near-workspaces": "3.4.0", | ||
"ts-jest": "26.5.6", | ||
"typescript": "4.9.4" | ||
}, | ||
"files": [ | ||
"lib" | ||
] | ||
"name": "@near-js/accounts", | ||
"version": "1.0.4", | ||
"description": "Classes encapsulating account-specific functionality", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "pnpm compile", | ||
"compile": "tsc -p tsconfig.json", | ||
"lint:js": "eslint -c ../../.eslintrc.js.yml test/**/*.js --no-eslintrc", | ||
"lint:js:fix": "eslint -c ../../.eslintrc.js.yml test/**/*.js --no-eslintrc --fix", | ||
"lint:ts": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts --no-eslintrc", | ||
"lint:ts:fix": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts --no-eslintrc --fix", | ||
"test": "jest test" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@near-js/crypto": "workspace:*", | ||
"@near-js/providers": "workspace:*", | ||
"@near-js/signers": "workspace:*", | ||
"@near-js/transactions": "workspace:*", | ||
"@near-js/types": "workspace:*", | ||
"@near-js/utils": "workspace:*", | ||
"borsh": "1.0.0", | ||
"depd": "2.0.0", | ||
"is-my-json-valid": "^2.20.6", | ||
"lru_map": "0.4.1", | ||
"near-abi": "0.1.1" | ||
}, | ||
"devDependencies": { | ||
"@near-js/keystores": "workspace:*", | ||
"@types/node": "18.11.18", | ||
"bs58": "4.0.0", | ||
"jest": "26.0.1", | ||
"near-hello": "0.5.1", | ||
"near-workspaces": "3.4.0", | ||
"ts-jest": "26.5.6", | ||
"typescript": "4.9.4" | ||
}, | ||
"files": [ | ||
"lib" | ||
] | ||
} |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { parseNearAmount } from '@near-js/utils'; | ||
import BN from 'bn.js'; | ||
|
||
export const MULTISIG_STORAGE_KEY = '__multisigRequest'; | ||
export const MULTISIG_ALLOWANCE = new BN(parseNearAmount('1')); | ||
export const MULTISIG_ALLOWANCE = BigInt(parseNearAmount('1')); | ||
// TODO: Different gas value for different requests (can reduce gas usage dramatically) | ||
export const MULTISIG_GAS = new BN('100000000000000'); | ||
export const MULTISIG_DEPOSIT = new BN('0'); | ||
export const MULTISIG_GAS = BigInt('100000000000000'); | ||
export const MULTISIG_DEPOSIT = BigInt('0'); | ||
export const MULTISIG_CHANGE_METHODS = ['add_request', 'add_request_and_confirm', 'delete_request', 'confirm']; | ||
export const MULTISIG_CONFIRM_METHODS = ['confirm']; |
Oops, something went wrong.