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

Udapp disconnect fix #5639

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Udapp disconnect fix #5639

merged 3 commits into from
Jan 20, 2025

Conversation

joeizang
Copy link
Collaborator

fixes #5483

@joeizang joeizang self-assigned this Jan 10, 2025
Copy link

netlify bot commented Jan 10, 2025

Deploy Preview for remixproject ready!

Name Link
🔨 Latest commit 1170da2
🔍 Latest deploy log https://app.netlify.com/sites/remixproject/deploys/678e140e582927000875d67a
😎 Deploy Preview https://deploy-preview-5639--remixproject.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@joeizang joeizang force-pushed the udapp-disconnect-fix branch from 554e3f3 to 89971a1 Compare January 10, 2025 12:37
@joeizang joeizang requested a review from LianaHus January 10, 2025 12:40
@joeizang joeizang added WIP ready-to-review PR ready to review and removed WIP labels Jan 10, 2025
@@ -235,6 +235,16 @@ export function RunTabUI(props: RunTabProps) {
}
}, [runTab.popup])

useEffect(() => {
if (runTab.selectExEnv.includes('injected') &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

what about wallets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure I understand what you mean by wallets.

Object.entries(runTab.accounts.loadedAccounts).length === 0 &&
runTab.accounts.selectedAccount.length > 0) {
// switch to vm-cancum because no account is loaded from injected provider
const context = plugin.blockchain.defaultPinnedProviders[0] // vm-cancun
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we load load the previously selected or it will be difficult to do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It would just require some more code to track any account that is selected and persist it outside the reach of a useEffect.

@joeizang joeizang requested a review from LianaHus January 15, 2025 13:50
@joeizang
Copy link
Collaborator Author

The other issues with walletconnect will be addressed in a separate pr. See this issue #5666 @LianaHus

@Aniket-Engg Aniket-Engg merged commit 6b7131b into master Jan 20, 2025
33 of 34 checks passed
@Aniket-Engg Aniket-Engg deleted the udapp-disconnect-fix branch January 20, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-review PR ready to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to VM if Remix is disconnected from injected provider
3 participants