Skip to content

Commit

Permalink
fix base case.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeizang committed Nov 7, 2024
1 parent 6774b20 commit 6275f1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ export function ContractGUI(props: ContractGUIProps) {
await handleDeploy()
} else {
const status = await props.getCompilerDetails()
if (status === 'Failed') {
props.plugin.call('terminal', 'log', { type: 'log', value: 'Consider opening an issue to update our internal store with your desired chainId.' })
if (status === 'Not Found') {
await handleDeploy()
return
}
const tabState = props.runTabState
Expand Down
5 changes: 2 additions & 3 deletions libs/remix-ui/run-tab/src/lib/run-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import { ScenarioPrompt } from './components/scenario'
import { setIpfsCheckedState, setRemixDActivated } from './actions/payload'
import { ChainCompatibleInfo, getCompatibleChain, getCompatibleChains, HardFork, isChainCompatible, isChainCompatibleWithAnyFork } from './actions/evmmap'

export type CheckStatus = 'Passed' | 'Failed'
export type CheckStatus = 'Passed' | 'Failed' | 'Not Found'

export function RunTabUI(props: RunTabProps) {
const { plugin } = props
Expand Down Expand Up @@ -138,8 +138,7 @@ export function RunTabUI(props: RunTabProps) {
const IsCompatible = isChainCompatible(ideDefault, targetChainId)
const chain = await returnCompatibleChain(ideDefault, targetChainId)
if (chain === undefined) {
plugin.call('terminal', 'log', { type: 'log', value: 'No compatible chain found for the selected EVM version.' })
return 'Failed'
return 'Not Found'
} else {
if (!IsCompatible) {
//show modal
Expand Down

0 comments on commit 6275f1b

Please sign in to comment.