From 647bb17735a54d14df9fcccb6167aab01f2c1a3d Mon Sep 17 00:00:00 2001 From: delivan Date: Mon, 19 Dec 2022 22:53:13 +0900 Subject: [PATCH] Update env variables --- constants/icns.ts | 4 ++-- pages/verification/index.tsx | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/constants/icns.ts b/constants/icns.ts index 618aa9b..b4db594 100644 --- a/constants/icns.ts +++ b/constants/icns.ts @@ -1,5 +1,5 @@ -export const OSMOSIS_CHAIN_ID = - process.env.NEXT_PUBLIC_OSMOSIS_CHAIND_ID ?? "osmosis-test-4"; +export const MAIN_CHAIN_ID = + process.env.NEXT_PUBLIC_MAIN_CHAIN_ID ?? "osmo-test-4"; export const REFERRAL_KEY = process.env.NEXT_PUBLIC_REFERRAL_KEY ?? "icns-referral"; diff --git a/pages/verification/index.tsx b/pages/verification/index.tsx index 09a529c..3636fed 100644 --- a/pages/verification/index.tsx +++ b/pages/verification/index.tsx @@ -37,7 +37,7 @@ import { Bech32Address, ChainIdHelper } from "@keplr-wallet/cosmos"; import { AllChainsItem } from "../../components/chain-list/all-chains-item"; import { SearchInput } from "../../components/search-input"; import { - OSMOSIS_CHAIN_ID, + MAIN_CHAIN_ID, REFERRAL_KEY, RESOLVER_ADDRESS, REST_URL, @@ -195,7 +195,7 @@ export default function VerificationPage(props: { blockList: string[] }) { ); if (keplrWallet) { - const key = await keplrWallet.getKey(OSMOSIS_CHAIN_ID); + const key = await keplrWallet.getKey(MAIN_CHAIN_ID); setIsOwner(ownerOfQueryResponse.data.owner === key.bech32Address); setNFTOwnerAddress(ownerOfQueryResponse.data.owner); } @@ -226,7 +226,7 @@ export default function VerificationPage(props: { blockList: string[] }) { if (keplr) { const keplrWallet = new KeplrWallet(keplr); - const key = await keplrWallet.getKey(OSMOSIS_CHAIN_ID); + const key = await keplrWallet.getKey(MAIN_CHAIN_ID); await fetchChainList(keplrWallet); setWallet(keplrWallet); @@ -301,14 +301,14 @@ export default function VerificationPage(props: { blockList: string[] }) { const checkAdr36 = async () => { if (twitterAuthInfo && wallet) { - const key = await wallet.getKey(OSMOSIS_CHAIN_ID); + const key = await wallet.getKey(MAIN_CHAIN_ID); const chainIds = Array.from(checkedItems).map((chain) => { return (chain as ChainItemType).chainId; }); return wallet.signICNSAdr36( - OSMOSIS_CHAIN_ID, + MAIN_CHAIN_ID, RESOLVER_ADDRESS, key.bech32Address, twitterAuthInfo.username, @@ -372,7 +372,7 @@ export default function VerificationPage(props: { blockList: string[] }) { } const chainInfo = { - chainId: OSMOSIS_CHAIN_ID, + chainId: MAIN_CHAIN_ID, rest: REST_URL, };