rollback change on vyper

pull/5370/head
yann300 2 years ago committed by Aniket
parent 36ac410bdc
commit c344cb7b4e
  1. 5
      apps/vyper/src/app/utils/compiler.tsx

@ -43,11 +43,10 @@ export async function compile(url: string, contract: Contract): Promise<VyperCom
if (extension !== 'vy') { if (extension !== 'vy') {
throw new Error('Use extension .vy for Vyper.') throw new Error('Use extension .vy for Vyper.')
} }
const data = JSON.stringify({ code: contract.content })
const response = await fetch(url, { const response = await fetch(url, {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json', 'Content-Length': data.length.toString() }, headers: { 'Content-Type': 'application/json' },
body: data body: JSON.stringify({ code: contract.content })
}) })
if (response.status === 404) { if (response.status === 404) {

Loading…
Cancel
Save