Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] Debug MM build #1209

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperplay",
"version": "0.22.5",
"version": "0.22.6",
"private": true,
"main": "build/main/main.js",
"homepage": "./",
Expand Down
2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/background-0.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/background-3.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/background-7.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/common-0.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/common-3.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/common-5.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/content-script-0.js

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

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
}
],
"default_locale": "en",
"description": "other build from git id: 0f96e8e3",
"description": "other build from git id: f6213e4c",
"host_permissions": [
"http://localhost:8545/",
"file://*/*",
Expand Down
2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/offscreen-0.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/extensions/MetaMask_v10.22.2/scripts/contentscript.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/ui-10.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/extensions/MetaMask_v10.22.2/ui-12.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ port.onMessage.addListener(message => {
window.postMessage(message, window.location.origin);
});
port.onDisconnect.addListener(d => {
console.log('trezor-connect disconnect called');
port = null;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ export const ExtensionContents = observer(() => {
})

export const FloatingExtensionContents = observer(() => {
const shouldShow =
extensionState.isPopupOpen || extensionState.isNotificationOpen
const shouldShow = extensionState.renderPopupWindow
console.log(
'FloatingExtensionContents ',
shouldShow,
' extensionState.extensionId ',
extensionState.extensionId
)
return (
<AnimatePresence>
{shouldShow ? (
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/ExtensionManager/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ const ExtensionManager = function () {
} else if (isOffline) {
mmContainerStyle.top = 115
}
if (extensionState.isPopupOpen || extensionState.isNotificationOpen) {
if (extensionState.renderPopupWindow) {
rootRef.current?.showModal()
} else {
rootRef.current?.close()
}
if (extensionState.isPopupOpen || extensionState.isNotificationOpen) {
if (extensionState.renderPopupWindow) {
rootRef.current?.showModal()
} else {
rootRef.current?.close()
Expand Down
8 changes: 6 additions & 2 deletions src/frontend/state/ExtensionState.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { ExtensionStateInterface } from 'common/state/interfaces'
import { makeAutoObservable } from 'mobx'
import { makeAutoObservable, runInAction } from 'mobx'

class ExtensionState implements ExtensionStateInterface {
extensionId = ''

isPopupOpen = false
isNotificationOpen = false
renderPopupWindow = false

constructor() {
makeAutoObservable(this)
Expand Down Expand Up @@ -61,7 +62,10 @@ class ExtensionState implements ExtensionStateInterface {
}

toggleIsPopupOpen() {
window.api.toggleIsPopupOpen()
runInAction(() => {
console.log('setting render popup window to ', this.renderPopupWindow)
this.renderPopupWindow = !this.renderPopupWindow
})
}

showPopup() {
Expand Down
Loading