Skip to content

Commit 20d6520

Browse files
authored
[Fix] Overlay performance issues with MetaMask Extension (#1231)
* only render extension in overlay when overlay is shown * prettier * bump
1 parent e3536c7 commit 20d6520

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hyperplay",
3-
"version": "0.23.1",
3+
"version": "0.23.2",
44
"private": true,
55
"main": "build/main/main.js",
66
"homepage": "./",

src/frontend/ExtensionManager/index.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,16 @@ const ExtensionManager = function () {
4242
rootRef.current?.close()
4343
}
4444

45+
/**
46+
* @dev We remove the popup/notification windows from the overlay when it is hidden because
47+
* there were performance issues with them running in the background while playing some games like Kokodi.
48+
*/
4549
if (isOverlay) {
46-
return <ExtensionContents />
50+
if (OverlayState.showOverlay) {
51+
return <ExtensionContents />
52+
} else {
53+
return null
54+
}
4755
}
4856

4957
/* eslint-disable react/no-unknown-property */

0 commit comments

Comments
 (0)