diff --git a/packages/keyring/src/index.spec.ts b/packages/keyring/src/index.spec.ts index b3cf0ed12..3eda78cb2 100644 --- a/packages/keyring/src/index.spec.ts +++ b/packages/keyring/src/index.spec.ts @@ -2,6 +2,8 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. +import '@polkadot/util-crypto/schnorrkel/test-polyfill'; + import { hexToU8a, stringToU8a } from '@polkadot/util/index'; import { cryptoWaitReady } from '@polkadot/util-crypto/index'; diff --git a/packages/util-crypto/src/schnorrkel/keypair/fromSeed.spec.ts b/packages/util-crypto/src/schnorrkel/keypair/fromSeed.spec.ts index 335ca99fb..8d33507fe 100644 --- a/packages/util-crypto/src/schnorrkel/keypair/fromSeed.spec.ts +++ b/packages/util-crypto/src/schnorrkel/keypair/fromSeed.spec.ts @@ -2,6 +2,8 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. +import '../test-polyfill'; + import { stringToU8a } from '@polkadot/util/index'; import { schnorrkelKeypairFromSeed, schnorrkelWaitReady } from '../index'; diff --git a/packages/util-crypto/src/schnorrkel/ready.spec.ts b/packages/util-crypto/src/schnorrkel/ready.spec.ts index 05761db7d..c1035c514 100644 --- a/packages/util-crypto/src/schnorrkel/ready.spec.ts +++ b/packages/util-crypto/src/schnorrkel/ready.spec.ts @@ -2,6 +2,8 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. +import './test-polyfill'; + describe('ready', () => { let globalWA: typeof WebAssembly; diff --git a/packages/util-crypto/src/schnorrkel/schnorrkel-js/index.ts b/packages/util-crypto/src/schnorrkel/schnorrkel-js.ts similarity index 93% rename from packages/util-crypto/src/schnorrkel/schnorrkel-js/index.ts rename to packages/util-crypto/src/schnorrkel/schnorrkel-js.ts index 0130e7026..ad3bc6ecf 100644 --- a/packages/util-crypto/src/schnorrkel/schnorrkel-js/index.ts +++ b/packages/util-crypto/src/schnorrkel/schnorrkel-js.ts @@ -3,7 +3,6 @@ // of the Apache-2.0 license. See the LICENSE file for details. import '@polkadot/util/polyfill'; -import './polyfill'; // export * from '@parity/schnorrkel-js'; export * from '@polkadot/schnorrkel-js'; diff --git a/packages/util-crypto/src/schnorrkel/signVerify.spec.ts b/packages/util-crypto/src/schnorrkel/signVerify.spec.ts index 2ed3d39f1..37a0855c7 100644 --- a/packages/util-crypto/src/schnorrkel/signVerify.spec.ts +++ b/packages/util-crypto/src/schnorrkel/signVerify.spec.ts @@ -2,6 +2,8 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. +import './test-polyfill'; + import { stringToU8a } from '@polkadot/util/index'; import randomAsU8a from '../random/asU8a'; diff --git a/packages/util-crypto/src/schnorrkel/schnorrkel-js/polyfill.ts b/packages/util-crypto/src/schnorrkel/test-polyfill.ts similarity index 100% rename from packages/util-crypto/src/schnorrkel/schnorrkel-js/polyfill.ts rename to packages/util-crypto/src/schnorrkel/test-polyfill.ts