@@ -19,11 +19,10 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/api": "4.13.2-10",
|
||||
"@polkadot/types": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"@polkadot/x-rxjs": "^6.7.2-7",
|
||||
"bn.js": "^4.11.9"
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,17 +19,16 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/api": "4.13.2-10",
|
||||
"@polkadot/rpc-core": "4.13.2-10",
|
||||
"@polkadot/types": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"@polkadot/util-crypto": "^6.7.2-7",
|
||||
"@polkadot/x-rxjs": "^6.7.2-7",
|
||||
"bn.js": "^4.11.9"
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.2-7",
|
||||
"@polkadot/keyring": "^6.8.1",
|
||||
"@polkadot/rpc-provider": "4.13.2-10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,18 +19,17 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/api-derive": "4.13.2-10",
|
||||
"@polkadot/keyring": "^6.7.2-7",
|
||||
"@polkadot/keyring": "^6.8.1",
|
||||
"@polkadot/metadata": "4.13.2-10",
|
||||
"@polkadot/rpc-core": "4.13.2-10",
|
||||
"@polkadot/rpc-provider": "4.13.2-10",
|
||||
"@polkadot/types": "4.13.2-10",
|
||||
"@polkadot/types-known": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"@polkadot/util-crypto": "^6.7.2-7",
|
||||
"@polkadot/x-rxjs": "^6.7.2-7",
|
||||
"bn.js": "^4.11.9",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1",
|
||||
"eventemitter3": "^4.0.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,14 +19,13 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/types": "4.13.2-10",
|
||||
"@polkadot/types-known": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"@polkadot/util-crypto": "^6.7.2-7",
|
||||
"bn.js": "^4.11.9"
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.2-7"
|
||||
"@polkadot/keyring": "^6.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/metadata": "4.13.2-10",
|
||||
"@polkadot/rpc-provider": "4.13.2-10",
|
||||
"@polkadot/types": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"@polkadot/x-rxjs": "^6.7.2-7"
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.2-7"
|
||||
"@polkadot/keyring": "^6.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,18 +19,17 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/types": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"@polkadot/util-crypto": "^6.7.2-7",
|
||||
"@polkadot/x-fetch": "^6.7.2-7",
|
||||
"@polkadot/x-global": "^6.7.2-7",
|
||||
"@polkadot/x-ws": "^6.7.2-7",
|
||||
"bn.js": "^4.11.9",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1",
|
||||
"@polkadot/x-fetch": "^6.8.1",
|
||||
"@polkadot/x-global": "^6.8.1",
|
||||
"@polkadot/x-ws": "^6.8.1",
|
||||
"eventemitter3": "^4.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.2-7",
|
||||
"@polkadot/keyring": "^6.8.1",
|
||||
"@polkadot/metadata": "4.13.2-10",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^13.1.0"
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/register": "^7.13.16",
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@babel/core": "^7.14.5",
|
||||
"@babel/register": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/api": "4.13.2-10",
|
||||
"@polkadot/metadata": "4.13.2-10",
|
||||
"@polkadot/rpc-provider": "4.13.2-10",
|
||||
"@polkadot/types": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
"yargs": "^17.0.1"
|
||||
|
||||
@@ -19,13 +19,9 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/networks": "^6.7.2-7",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/networks": "^6.8.1",
|
||||
"@polkadot/types": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"bn.js": "^4.11.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bn.js": "^4.11.6"
|
||||
"@polkadot/util": "^6.8.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@polkadot/metadata": "4.13.2-10",
|
||||
"@polkadot/util": "^6.7.2-7",
|
||||
"@polkadot/util-crypto": "^6.7.2-7",
|
||||
"@polkadot/x-rxjs": "^6.7.2-7",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.11.9"
|
||||
"@polkadot/util": "^6.8.1",
|
||||
"@polkadot/util-crypto": "^6.8.1",
|
||||
"@polkadot/x-rxjs": "^6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^6.7.2-7"
|
||||
"@polkadot/keyring": "^6.8.1",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.11.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import BNOrig from 'bn.js';
|
||||
|
||||
import { BN, BN_TWO } from '@polkadot/util';
|
||||
import { BN, BN_TWO, isBn } from '@polkadot/util';
|
||||
|
||||
import { TypeRegistry } from '../create';
|
||||
import { UInt } from '.';
|
||||
@@ -19,9 +19,11 @@ describe('UInt', (): void => {
|
||||
});
|
||||
|
||||
it('is a BN instance', (): void => {
|
||||
expect(
|
||||
BNOrig.isBN(new UInt(registry, 16))
|
||||
).toBe(true);
|
||||
const test = new UInt(registry, 16);
|
||||
|
||||
expect(isBn(test)).toBe(true);
|
||||
expect(BNOrig.isBN(test)).toBe(true);
|
||||
expect(test instanceof BN).toBe(true);
|
||||
});
|
||||
|
||||
it('fails on a number that is too large for the bits specified', (): void => {
|
||||
|
||||
Reference in New Issue
Block a user