From 6a2efd45402c9dcd1c1615552e91e79cce4a28bd Mon Sep 17 00:00:00 2001 From: morizon Date: Sat, 7 Oct 2023 18:48:48 +0800 Subject: [PATCH] fix: lint --- development/webpackTools.js | 2 +- packages/ext/development/nextWebpack.js | 2 +- packages/shared/src/modules3rdParty/cross-crypto/verify.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/development/webpackTools.js b/development/webpackTools.js index 8d4b8cd86c3..c801f47abc1 100644 --- a/development/webpackTools.js +++ b/development/webpackTools.js @@ -336,7 +336,7 @@ function normalizeConfig({ config.resolve.fallback = { ...config.resolve.fallback, 'crypto': require.resolve( - '../packages/shared/src/modules3rdParty/cross-crypto', + '@onekeyhq/shared/src/modules3rdParty/cross-crypto/index.js', ), 'stream': require.resolve('stream-browserify'), 'path': false, diff --git a/packages/ext/development/nextWebpack.js b/packages/ext/development/nextWebpack.js index 86cdb027698..60371859681 100644 --- a/packages/ext/development/nextWebpack.js +++ b/packages/ext/development/nextWebpack.js @@ -25,7 +25,7 @@ function nextWebpack( config.resolve.fallback = { ...config.resolve.fallback, 'crypto': require.resolve( - '../../../packages/shared/src/modules3rdParty/cross-crypto', + '@onekeyhq/shared/src/modules3rdParty/cross-crypto/index.js', ), 'stream': require.resolve('stream-browserify'), 'path': false, diff --git a/packages/shared/src/modules3rdParty/cross-crypto/verify.ts b/packages/shared/src/modules3rdParty/cross-crypto/verify.ts index 281154ebcdc..9500c10b183 100644 --- a/packages/shared/src/modules3rdParty/cross-crypto/verify.ts +++ b/packages/shared/src/modules3rdParty/cross-crypto/verify.ts @@ -4,7 +4,7 @@ import * as crypto from 'crypto'; const globalCrypto = global.crypto; // @ts-ignore -assert.ok(globalCrypto?.$$isOneKeyShim, 'nativeCrypto is not polyfilled'); +assert.ok(globalCrypto?.$$isOneKeyShim, 'global crypto is not polyfilled'); // @ts-ignore assert.ok(crypto?.$$isOneKeyShim, 'crypto is not polyfilled');