Skip to content

Commit

Permalink
add disconnection for wallet connect
Browse files Browse the repository at this point in the history
  • Loading branch information
joeizang committed Jan 23, 2025
1 parent d0746d0 commit beb15bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/remix-ui/run-tab/src/lib/run-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export function RunTabUI(props: RunTabProps) {
}
}

console.log({ plugin, runTab })

const getCompilerDetails = async () => await checkEvmChainCompatibility()

const returnCompatibleChain = async (evmVersion: HardFork, targetChainId: number) => {
Expand Down Expand Up @@ -236,7 +238,7 @@ export function RunTabUI(props: RunTabProps) {
}, [runTab.popup])

useEffect(() => {
if (runTab.selectExEnv.includes('injected') &&
if ((runTab.selectExEnv.includes('injected') || runTab.selectExEnv.includes('walletconnect')) &&
Object.entries(runTab.accounts.loadedAccounts).length === 0 &&
runTab.accounts.selectedAccount.length > 0) {
// switch to vm-cancum because no account is loaded from injected provider
Expand Down

0 comments on commit beb15bc

Please sign in to comment.