|
|
|
@ -25,7 +25,7 @@ function CompilerButton({contract, setOutput, compilerUrl, resetCompilerState}: |
|
|
|
|
resetCompilerState() |
|
|
|
|
setLoadingSpinnerState(true) |
|
|
|
|
try { |
|
|
|
|
await remixClient.discardHighlight() |
|
|
|
|
// await remixClient.discardHighlight()
|
|
|
|
|
let _contract: any |
|
|
|
|
try { |
|
|
|
|
_contract = await remixClient.getContract() |
|
|
|
@ -78,7 +78,7 @@ function CompilerButton({contract, setOutput, compilerUrl, resetCompilerState}: |
|
|
|
|
start: {line: line - 1, column: 10}, |
|
|
|
|
end: {line: line - 1, column: 10} |
|
|
|
|
} |
|
|
|
|
remixClient.highlight(lineColumnPos as any, _contract.name, output.message) |
|
|
|
|
// remixClient.highlight(lineColumnPos as any, _contract.name, '#e0b4b4')
|
|
|
|
|
} else { |
|
|
|
|
const regex = output?.message?.match(/line ((\d+):(\d+))+/g) |
|
|
|
|
const errors = output?.message?.split(/line ((\d+):(\d+))+/g) // extract error message
|
|
|
|
@ -98,7 +98,7 @@ function CompilerButton({contract, setOutput, compilerUrl, resetCompilerState}: |
|
|
|
|
start: {line: parseInt(location[0]) - 1, column: 10}, |
|
|
|
|
end: {line: parseInt(location[0]) - 1, column: 10} |
|
|
|
|
} |
|
|
|
|
remixClient.highlight(lineColumnPos as any, _contract.name, message) |
|
|
|
|
// remixClient.highlight(lineColumnPos as any, _contract.name, message)
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
@ -106,7 +106,7 @@ function CompilerButton({contract, setOutput, compilerUrl, resetCompilerState}: |
|
|
|
|
throw new Error(output.message) |
|
|
|
|
} |
|
|
|
|
// SUCCESS
|
|
|
|
|
remixClient.discardHighlight() |
|
|
|
|
// remixClient.discardHighlight()
|
|
|
|
|
remixClient.changeStatus({ |
|
|
|
|
key: 'succeed', |
|
|
|
|
type: 'success', |
|
|
|
|