diff --git a/index.ts b/index.ts index b0e9028..d904e5b 100644 --- a/index.ts +++ b/index.ts @@ -63,13 +63,9 @@ function isWithinCurveOrder(num: bigint): boolean { const crypto: { node?: any; web?: Crypto } = (() => { const webCrypto = typeof self === 'object' && 'crypto' in self ? self.crypto : undefined; - // Silence webpack warnings - const nodeRequire = - typeof module !== 'undefined' && - typeof module.require === 'function' && - module.require.bind(module); + const nodeRequire = typeof module !== 'undefined' && typeof require === 'function'; return { - node: nodeRequire && !webCrypto ? nodeRequire('crypto') : undefined, + node: nodeRequire && !webCrypto ? require('crypto') : undefined, web: webCrypto, }; })();