fix types on compile function

pull/4182/head
Joseph Izang 1 year ago
parent 5f85c2ba95
commit 18214c79b1
  1. 4
      apps/vyper/src/app/utils/compiler.tsx

@ -49,7 +49,7 @@ export function normalizeContractPath(contractPath: string): string[] {
* @param url The url of the compiler
* @param contract The name and content of the contract
*/
export async function compile(url: string, contract: Contract): Promise<any> {
export async function compile(url: string, contract: Contract): Promise<any | VyperCompilationOutput> {
if (!contract.name) {
throw new Error('Set your Vyper contract file.')
}
@ -75,8 +75,6 @@ export async function compile(url: string, contract: Contract): Promise<any> {
throw new Error(`Vyper compilation failed: ${response.statusText}`)
}
// let apiCallFinished = false
const statusResponse = await axios.get(`${url}/status/${response.data}`)
let responsePayload = {}
if (statusResponse.data !== 'SUCCESS' && statusResponse.data !== 'FAILED') {

Loading…
Cancel
Save