diff --git a/packages/util-crypto/package.json b/packages/util-crypto/package.json index 463a3fe54..793e34260 100644 --- a/packages/util-crypto/package.json +++ b/packages/util-crypto/package.json @@ -16,8 +16,8 @@ "url": "https://github.com/polkadot-js/common.git" }, "sideEffects": [ - "./cryptoInit.js", - "./cryptoInit.cjs", + "./bundleInit.js", + "./bundleInit.cjs", "./detectPackage.js", "./detectPackage.cjs" ], diff --git a/packages/util-crypto/src/bundle.ts b/packages/util-crypto/src/bundle.ts index bf2cd879e..610986ac3 100644 --- a/packages/util-crypto/src/bundle.ts +++ b/packages/util-crypto/src/bundle.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 -import './cryptoInit'; +import './bundleInit'; export { packageInfo } from './packageInfo'; diff --git a/packages/util-crypto/src/cryptoInit.ts b/packages/util-crypto/src/bundleInit.ts similarity index 75% rename from packages/util-crypto/src/cryptoInit.ts rename to packages/util-crypto/src/bundleInit.ts index ec2996cdd..ab12673e0 100644 --- a/packages/util-crypto/src/cryptoInit.ts +++ b/packages/util-crypto/src/bundleInit.ts @@ -7,7 +7,7 @@ import { utils as utilsNobleSecp256k1 } from '@noble/secp256k1'; import { u8aConcat } from '@polkadot/util'; -import { cryptoWaitReady } from './crypto'; +// import { cryptoWaitReady } from './crypto'; import { hmacSha256AsU8a } from './hmac'; // Set overrides on the secp256k1 utils @@ -15,7 +15,7 @@ import { hmacSha256AsU8a } from './hmac'; utilsNobleSecp256k1.hmacSha256Sync = (key: Uint8Array, ...messages: Uint8Array[]) => hmacSha256AsU8a(key, u8aConcat(...messages)); -// start init process immediately -cryptoWaitReady().catch((): void => { - // shouldn't happen, logged above -}); +// // start init process immediately +// cryptoWaitReady().catch((): void => { +// // shouldn't happen, logged above +// }); diff --git a/packages/util-crypto/src/secp256k1/signVerify.spec.ts b/packages/util-crypto/src/secp256k1/signVerify.spec.ts index c601019fa..98f8290fa 100644 --- a/packages/util-crypto/src/secp256k1/signVerify.spec.ts +++ b/packages/util-crypto/src/secp256k1/signVerify.spec.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 -import '../cryptoInit'; +import '../bundleInit'; import { stringToU8a } from '@polkadot/util'; diff --git a/packages/util-crypto/src/secp256k1/verify.spec.ts b/packages/util-crypto/src/secp256k1/verify.spec.ts index 97d3df116..fbcb7c272 100644 --- a/packages/util-crypto/src/secp256k1/verify.spec.ts +++ b/packages/util-crypto/src/secp256k1/verify.spec.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/util-crypto authors & contributors // SPDX-License-Identifier: Apache-2.0 -import '../cryptoInit'; +import '../bundleInit'; import { hexToU8a } from '@polkadot/util'; import { waitReady } from '@polkadot/wasm-crypto';