Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joeizang committed Sep 19, 2024
1 parent 66393ac commit fc19b90
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions apps/vyper/src/app/utils/compiler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,17 @@ export function normalizeContractPath(contractPath: string): string[] {

function parseErrorString(errorStructure: string[]) {
// Split the string into lines
console.log(errorStructure)
let errorType = ''
let message = ''
let tline = ''
errorStructure.forEach(errorMsg => {
const choppedup = errorMsg.split(': ')
errorType = choppedup[0].trim().split('\n')[1]
message = choppedup[1]
if (errorStructure.length > 2) {
console.log(choppedup[2].split(',')[1])
}
console.log(choppedup)
// if (errorStructure.length > 2) {
// console.log(choppedup[2].split(',')[1])
// }
// console.log(choppedup)
})
let lines = errorStructure[0].trim().split('\n')

Expand Down Expand Up @@ -198,7 +197,6 @@ export async function compile(url: string, contract: Contract): Promise<any> {
[contractName] : { content : cleanedUpContent }
}
}
console.log(compilePackage)

let response = await axios.post(`${url}compile`, compilePackage )

Expand Down Expand Up @@ -228,7 +226,7 @@ export async function compile(url: string, contract: Contract): Promise<any> {
const intermediate = await(await axios.get(url + 'exceptions/' + compileCode , {
method: 'Get'
})).data
console.log('Errors found', intermediate)
// console.log('Errors found', intermediate)
result = parseErrorString(intermediate)
intermediateError = intermediate
return result
Expand Down

0 comments on commit fc19b90

Please sign in to comment.