|
|
@ -57,7 +57,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
_updateVersionSelector(selectedVersion) |
|
|
|
_updateVersionSelector(selectedVersion) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
const currentFileName = api.getAppParameter('currentFile') as string |
|
|
|
const currentFileName = api.currentFile |
|
|
|
|
|
|
|
|
|
|
|
currentFile(currentFileName) |
|
|
|
currentFile(currentFileName) |
|
|
|
listenToEvents(compileTabLogic, api)(dispatch) |
|
|
|
listenToEvents(compileTabLogic, api)(dispatch) |
|
|
@ -229,7 +229,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const isSolFileSelected = (currentFile: string = '') => { |
|
|
|
const isSolFileSelected = (currentFile: string = '') => { |
|
|
|
if (!currentFile) currentFile = api.getAppParameter('currentFile') as string |
|
|
|
if (!currentFile) currentFile = api.currentFile |
|
|
|
if (!currentFile) return false |
|
|
|
if (!currentFile) return false |
|
|
|
const extention = currentFile.substr(currentFile.length - 3, currentFile.length) |
|
|
|
const extention = currentFile.substr(currentFile.length - 3, currentFile.length) |
|
|
|
return extention.toLowerCase() === 'sol' || extention.toLowerCase() === 'yul' |
|
|
|
return extention.toLowerCase() === 'sol' || extention.toLowerCase() === 'yul' |
|
|
@ -298,7 +298,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const compile = () => { |
|
|
|
const compile = () => { |
|
|
|
const currentFile = api.getAppParameter('currentFile') as string |
|
|
|
const currentFile = api.currentFile |
|
|
|
|
|
|
|
|
|
|
|
if (!isSolFileSelected()) return |
|
|
|
if (!isSolFileSelected()) return |
|
|
|
|
|
|
|
|
|
|
|