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) => { 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() await this.reload()
}
}) })
this.on('settings', 'configChanged', async (config) => { 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.reload()
}
}) })
await this.compilerService.init() await this.compilerService.init()

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

Loading…
Cancel
Save