pull/4182/head
Joseph Izang 1 year ago
parent bf81cf3dbc
commit ae91d82a78
  1. 5
      apps/vyper/src/app/app.tsx
  2. 6
      apps/vyper/src/app/utils/compiler.tsx

@ -32,7 +32,7 @@ const App: React.FC = () => {
const [state, setState] = useState<AppState>({
status: 'idle',
environment: 'local',
localUrl: 'http://localhost:8000'
localUrl: 'http://localhost:8000/'
})
const [compilerResponse, setCompilerResponse] = useState<any>({})
@ -101,8 +101,7 @@ const App: React.FC = () => {
/>
</div>
<article id="result" className="px-2">
{/* <VyperResult output={contract ? output[contract] : undefined} contractName={contract} /> */}
<VyperResult output={contract ? output : undefined} />
<VyperResult output={contract ? output[contract] : undefined} />
</article>
</section>
</main>

@ -78,17 +78,17 @@ export async function compile(url: string, contract: Contract): Promise<VyperCom
const compileCode = response.data
let result: any
const status = await (await axios.get(url + '/status/' + compileCode , {
const status = await (await axios.get(url + 'status/' + compileCode , {
method: 'Get'
})).data
if (status === 'SUCCESS') {
result = await(await axios.get(url + '/compiled_artifact/' + compileCode , {
result = await(await axios.get(url + 'compiled_artifact/' + compileCode , {
method: 'Get'
})).data
return result
} else if (status === 'PENDING' || status === 'FAILED') {
result = await(await axios.get(url + '/exceptions/' + compileCode , {
result = await(await axios.get(url + 'exceptions/' + compileCode , {
method: 'Get'
})).data
return result.data

Loading…
Cancel
Save