From 5c3948f5edb56c1799cf4d853d359e914332ac86 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sun, 2 Jan 2022 21:38:22 -0800 Subject: [PATCH] ensure user switches to avax network --- suchwowx/templates/includes/web3.html | 2 ++ suchwowx/templates/profile.html | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/suchwowx/templates/includes/web3.html b/suchwowx/templates/includes/web3.html index 5d86631..15fdc22 100644 --- a/suchwowx/templates/includes/web3.html +++ b/suchwowx/templates/includes/web3.html @@ -83,6 +83,7 @@ } async function getTokenID(ipfsHash) { + await addAvalancheNetwork(); if (ipfsHash != '') { const tokenId = await contract.methods.metadataTokenId(ipfsHash).call(); return tokenId; @@ -90,6 +91,7 @@ } async function isMinted(ipfsHash) { + await addAvalancheNetwork(); if (ipfsHash != '') { const tokenId = await getTokenID(ipfsHash) if (tokenId == 0) { diff --git a/suchwowx/templates/profile.html b/suchwowx/templates/profile.html index a436f63..904df83 100644 --- a/suchwowx/templates/profile.html +++ b/suchwowx/templates/profile.html @@ -70,7 +70,7 @@ {% include 'includes/footer.html' %} - +