Merge pull request #4351 from ethereum/fix_reloading_after_config_changed

fix reloading after config changed
pull/4365/head
bunsenstraat 11 months ago committed by GitHub
commit 7bf3c0958f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      apps/remix-ide/src/app/plugins/parser/code-parser.tsx
  2. 2
      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) => {
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) => {
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 {
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