show toaster when compiler version is updated

pull/5370/head
Aniket-Engg 2 years ago committed by Aniket
parent ac7676cd40
commit 41b2cbe5d5
  1. 2
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx

@ -375,6 +375,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const compilerToLoad = semver.maxSatisfying(releasedVersions, pragma) const compilerToLoad = semver.maxSatisfying(releasedVersions, pragma)
const compilerPath = state.allversions.filter(obj => !obj.prerelease && obj.version === compilerToLoad)[0].path const compilerPath = state.allversions.filter(obj => !obj.prerelease && obj.version === compilerToLoad)[0].path
if (state.selectedVersion !== compilerPath) { if (state.selectedVersion !== compilerPath) {
// @ts-ignore
api.call('notification', 'toast', `updating compiler to best suited version according to pragma i.e ${_retrieveVersion(compilerPath)}`)
setState((prevState) => { setState((prevState) => {
return { ...prevState, selectedVersion: compilerPath } return { ...prevState, selectedVersion: compilerPath }
}) })

Loading…
Cancel
Save