diff --git a/src/components/WasmVerification.vue b/src/components/WasmVerification.vue index 10eed6ac..d9335067 100644 --- a/src/components/WasmVerification.vue +++ b/src/components/WasmVerification.vue @@ -23,9 +23,9 @@ console.log("contract:", props.contract) onMounted(() => { - console.log("mounted", `${baseurl}/deploy-histories/neutron-1?contract=${props.contract}`, chainId.value) - get(`${baseurl}/deploy-histories/${chainId.value}?contract=${props.contract}`).then((x) => { - console.log("x:", x) + // console.log("mounted", `${baseurl}/deploy-histories/neutron?contract=${props.contract}`, chainId.value) + get(`${baseurl}/deploy-histories/neutron?contract=${props.contract}`).then((x) => { + console.log("verification:", x) verification.value = x }).catch(e => { console.error(e) @@ -36,17 +36,22 @@ function verify() { const base = useBaseStore() const id = base.latest?.block?.header?.chain_id || "unknown" - const data = {"contractAddress": props.contract, "chainId": "neutron"} - console.log(data) + const data = {"contractAddress": props.contract, "chainId": id} + post(`${baseurl}/verification/neutron`, data).then((x)=> { - console.log("x", x) + verification.value = x.result }) } \ No newline at end of file diff --git a/src/libs/http.ts b/src/libs/http.ts index 5eb43a10..f2b2b17a 100644 --- a/src/libs/http.ts +++ b/src/libs/http.ts @@ -40,7 +40,7 @@ export async function post(url: string, data: any) { // credentials: 'same-origin', // redirect: 'follow', // manual, *follow, error // referrerPolicy: 'origin', // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url headers: { - 'Content-Type': 'text/plain', + 'Content-Type': 'application/json', Accept: '*/*', 'Accept-Encoding': 'gzip, deflate, br', }, diff --git a/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue b/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue index 76f4aaa2..3428a1ac 100644 --- a/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue +++ b/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue @@ -202,7 +202,7 @@ const result = ref({}); - +