fix reloading after config changed

pull/4351/head
yann300 11 months ago
parent f5486070aa
commit 8d4d3d46b2
  1. 12
      apps/remix-ide/src/app/plugins/parser/code-parser.tsx
  2. 4
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx

@ -193,11 +193,19 @@ export class CodeParser extends Plugin {
})
this.on('config', 'configChanged', async (config) => {
await this.reload()
if (config.key === 'settings/auto-completion' ||
config.key === 'settings/display-errors' ||
config.key === 'settings/show-gas') {
await this.reload()
}
})
this.on('settings', 'configChanged', async (config) => {
await this.reload()
if (config.key === 'settings/auto-completion' ||
config.key === 'settings/display-errors' ||
config.key === 'settings/show-gas') {
await this.reload()
}
})
await this.compilerService.init()

@ -370,7 +370,9 @@ export function ContractDropdownUI(props: ContractDropdownProps) {
let evmVersion = null
try {
evmVersion = JSON.parse(loadedContractData.metadata).settings.evmVersion
if (loadedContractData && loadedContractData.metadata) {
evmVersion = JSON.parse(loadedContractData.metadata).settings.evmVersion
}
} catch (err) {}
return (
<div className="udapp_container mb-2" data-id="contractDropdownContainer">

Loading…
Cancel
Save