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

[FIX] Reload app due to extension only on app update #1261

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

flavioislima
Copy link
Contributor

@flavioislima flavioislima commented Mar 20, 2025

This is a new approach from #1249.
It now checks everything only on the main process and has no issues with MM profile import.

AI Summary

This pull request includes several changes to the src/backend/main.ts and src/common/types/electron_store.ts files to handle app version updates and wallet connection state management. The most important changes include adding version checks, updating wallet connection state, and modifying the store structure to include new properties.

Version checks and updates:

  • src/backend/main.ts: Added code to check and log app version changes, and update the stored app version in configStore.
  • src/backend/main.ts: Modified the logic to reload the app if the wallet is not connected or if the app version has changed.

Wallet connection state management:

  • src/backend/main.ts: Added event handlers for wallet connection, disconnection, chain changes, and account changes. These handlers update the configStore with the wallet state and notify the renderer process.

Store structure updates:


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@flavioislima flavioislima added the PR: Ready-For-Review PR is ready to be reviewed by peers label Mar 20, 2025
// Only reload the app if a wallet is not connected
// or the app version has changed
if (
!walletStateIsConnected ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which edge case does this address?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Ready-For-Review PR is ready to be reviewed by peers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants