pull/5370/head
Joseph Izang 1 year ago
parent 956daccf29
commit ca719bc8d8
  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>({ const [state, setState] = useState<AppState>({
status: 'idle', status: 'idle',
environment: 'local', environment: 'local',
localUrl: 'http://localhost:8000' localUrl: 'http://localhost:8000/'
}) })
const [compilerResponse, setCompilerResponse] = useState<any>({}) const [compilerResponse, setCompilerResponse] = useState<any>({})
@ -101,8 +101,7 @@ const App: React.FC = () => {
/> />
</div> </div>
<article id="result" className="px-2"> <article id="result" className="px-2">
{/* <VyperResult output={contract ? output[contract] : undefined} contractName={contract} /> */} <VyperResult output={contract ? output[contract] : undefined} />
<VyperResult output={contract ? output : undefined} />
</article> </article>
</section> </section>
</main> </main>

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

Loading…
Cancel
Save