Skip to content

Commit

Permalink
fix: metamask connect in popup close MF-6422 (#11842)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works authored and guanbinrui committed Oct 10, 2024
1 parent 6e1ef1f commit aa7b2b4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/mask/.webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export async function createConfiguration(_inputFlags: BuildFlags): Promise<webp
// Widely used Node.js global variable
Buffer: [require.resolve('buffer'), 'Buffer'],
// same as https://github.com/MetaMask/extension-provider/issues/48
'process.nextTick': require.resolve('next-tick'),
'process.nextTick': [require.resolve('./package-overrides/process.nextTick.mjs'), 'default'],
}),
new EnvironmentPlugin({
NODE_ENV: productionLike ? 'production' : flags.mode,
Expand Down
4 changes: 4 additions & 0 deletions packages/mask/.webpack/package-overrides/process.nextTick.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default (callback, ...rest) => {
if (typeof callback !== 'function') throw new TypeError('callback is not a function')
queueMicrotask(() => callback(...rest))
}
1 change: 0 additions & 1 deletion packages/mask/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
"idb": "^8.0.0",
"immer": "^10.1.1",
"json-stable-stringify": "^1.1.1",
"next-tick": "^1.1.0",
"react-avatar-editor": "^13.0.2",
"react-draggable": "^4.4.6",
"react-highlight-words": "^0.20.0",
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aa7b2b4

Please sign in to comment.