Add BigInt shim (#1280)

This commit is contained in:
Jaco
2021-12-04 09:11:16 +02:00
committed by GitHub
parent 986dfe5006
commit bd3f51844c
4 changed files with 17 additions and 2 deletions
+2
View File
@@ -1,6 +1,8 @@
// Copyright 2017-2021 @polkadot/util-crypto authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/x-bigint/shim';
import { u8aConcat } from '@polkadot/util';
import { utils as utilsNobleSecp256k1 } from '@polkadot/x-noble-secp256k1';
+4 -1
View File
@@ -15,7 +15,10 @@
"type": "git",
"url": "https://github.com/polkadot-js/common.git"
},
"sideEffects": false,
"sideEffects": [
"./shim.js",
"./shim.cjs"
],
"type": "module",
"version": "8.0.6-15",
"dependencies": {
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/x-ws authors & contributors
// Copyright 2017-2021 @polkadot/x-bigint authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { xglobal } from '@polkadot/x-global';
+10
View File
@@ -0,0 +1,10 @@
// Copyright 2017-2021 @polkadot/x-bigint authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { xglobal } from '@polkadot/x-global';
import { BigInt } from '.';
if (typeof xglobal.BigInt !== 'function') {
(xglobal as Record<string, unknown>).BigInt = BigInt;
}