Update env variables

This commit is contained in:
delivan 2022-12-19 22:15:49 +09:00
parent d06fbfc4c7
commit 3fc3b040a4
2 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,8 @@
export const MainChainId = "osmo-test-4"; export const OSMOSIS_CHAIN_ID =
process.env.NEXT_PUBLIC_OSMOSIS_CHAIND_ID ?? "osmosis-test-4";
export const REFERRAL_KEY = "icns-referral"; export const REFERRAL_KEY =
process.env.NEXT_PUBLIC_REFERRAL_KEY ?? "icns-referral";
export const RPC_URL = export const RPC_URL =
process.env.NEXT_PUBLIC_OSMOSIS_RPC_URL ?? "https://rpc.testnet.osmosis.zone"; process.env.NEXT_PUBLIC_OSMOSIS_RPC_URL ?? "https://rpc.testnet.osmosis.zone";

View File

@ -37,7 +37,7 @@ import { Bech32Address, ChainIdHelper } from "@keplr-wallet/cosmos";
import { AllChainsItem } from "../../components/chain-list/all-chains-item"; import { AllChainsItem } from "../../components/chain-list/all-chains-item";
import { SearchInput } from "../../components/search-input"; import { SearchInput } from "../../components/search-input";
import { import {
MainChainId, OSMOSIS_CHAIN_ID,
REFERRAL_KEY, REFERRAL_KEY,
RESOLVER_ADDRESS, RESOLVER_ADDRESS,
REST_URL, REST_URL,
@ -195,7 +195,7 @@ export default function VerificationPage(props: { blockList: string[] }) {
); );
if (keplrWallet) { if (keplrWallet) {
const key = await keplrWallet.getKey(MainChainId); const key = await keplrWallet.getKey(OSMOSIS_CHAIN_ID);
setIsOwner(ownerOfQueryResponse.data.owner === key.bech32Address); setIsOwner(ownerOfQueryResponse.data.owner === key.bech32Address);
setNFTOwnerAddress(ownerOfQueryResponse.data.owner); setNFTOwnerAddress(ownerOfQueryResponse.data.owner);
} }
@ -226,7 +226,7 @@ export default function VerificationPage(props: { blockList: string[] }) {
if (keplr) { if (keplr) {
const keplrWallet = new KeplrWallet(keplr); const keplrWallet = new KeplrWallet(keplr);
const key = await keplrWallet.getKey(MainChainId); const key = await keplrWallet.getKey(OSMOSIS_CHAIN_ID);
await fetchChainList(keplrWallet); await fetchChainList(keplrWallet);
setWallet(keplrWallet); setWallet(keplrWallet);
@ -301,14 +301,14 @@ export default function VerificationPage(props: { blockList: string[] }) {
const checkAdr36 = async () => { const checkAdr36 = async () => {
if (twitterAuthInfo && wallet) { if (twitterAuthInfo && wallet) {
const key = await wallet.getKey(MainChainId); const key = await wallet.getKey(OSMOSIS_CHAIN_ID);
const chainIds = Array.from(checkedItems).map((chain) => { const chainIds = Array.from(checkedItems).map((chain) => {
return (chain as ChainItemType).chainId; return (chain as ChainItemType).chainId;
}); });
return wallet.signICNSAdr36( return wallet.signICNSAdr36(
MainChainId, OSMOSIS_CHAIN_ID,
RESOLVER_ADDRESS, RESOLVER_ADDRESS,
key.bech32Address, key.bech32Address,
twitterAuthInfo.username, twitterAuthInfo.username,
@ -372,7 +372,7 @@ export default function VerificationPage(props: { blockList: string[] }) {
} }
const chainInfo = { const chainInfo = {
chainId: MainChainId, chainId: OSMOSIS_CHAIN_ID,
rest: REST_URL, rest: REST_URL,
}; };