fix types on compile function

pull/5370/head
Joseph Izang 1 year ago
parent 82d86124e4
commit 515b3f22bb
  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