diff --git a/src/app/layout.tsx b/src/app/layout.tsx index df54857..2ae1d01 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -8,12 +8,12 @@ import { ToastContainer } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; import { FAUCET_CONTRACT_ADDRESS } from "@/config"; +import { REST_URL, RPC_URL } from "@/constants"; import BaseWrapper from "@/features/core/components/base-wrapper"; import { CoreProvider } from "@/features/core/context/provider"; import { StakingProvider } from "@/features/staking/context/provider"; import "./globals.css"; -import { REST_URL, RPC_URL } from "@/constants"; const abstraxionConfig = { contracts: [FAUCET_CONTRACT_ADDRESS], diff --git a/src/constants.ts b/src/constants.ts index db7845d..1a5f20c 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,10 +1,9 @@ import { IS_TESTNET } from "./config"; - -const MAINNET_RPC_URL="https://rpc.xion-mainnet-1.burnt.com:443"; -const MAINNET_REST_URL="https://api.xion-mainnet-1.burnt.com:443"; -const TESTNET_RPC_URL="https://testnet-rpc.xion-api.com:443"; -const TESTNET_REST_URL="https://testnet-api.xion-api.com:443"; +const MAINNET_RPC_URL = "https://rpc.xion-mainnet-1.burnt.com:443"; +const MAINNET_REST_URL = "https://api.xion-mainnet-1.burnt.com:443"; +const TESTNET_RPC_URL = "https://testnet-rpc.xion-api.com:443"; +const TESTNET_REST_URL = "https://testnet-api.xion-api.com:443"; export const RPC_URL = IS_TESTNET ? TESTNET_RPC_URL : MAINNET_RPC_URL; export const REST_URL = IS_TESTNET ? TESTNET_REST_URL : MAINNET_REST_URL; diff --git a/src/features/staking/components/main-page.tsx b/src/features/staking/components/main-page.tsx index f8501d1..aa2e51d 100644 --- a/src/features/staking/components/main-page.tsx +++ b/src/features/staking/components/main-page.tsx @@ -2,6 +2,7 @@ import { memo, useState } from "react"; +import { IS_TESTNET } from "@/config"; import { Title } from "@/features/core/components/base"; import { useStaking } from "../context/hooks"; @@ -13,7 +14,6 @@ import Faucet from "./faucet"; import StakingModals from "./staking-modals"; import StakingOverview from "./staking-overview"; import ValidatorsTable from "./validators-table"; -import { IS_TESTNET } from "@/config"; function StakingPage() { const { staking } = useStaking(); diff --git a/src/features/staking/lib/core/client.ts b/src/features/staking/lib/core/client.ts index a7f25fc..c4741a4 100644 --- a/src/features/staking/lib/core/client.ts +++ b/src/features/staking/lib/core/client.ts @@ -1,4 +1,3 @@ -import { RPC_URL } from "@/constants"; import type { useAbstraxionSigningClient } from "@burnt-labs/abstraxion"; import type { Registry } from "@cosmjs/proto-signing"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; @@ -19,7 +18,7 @@ import { } from "@cosmjs/stargate"; import { Tendermint34Client } from "@cosmjs/tendermint-rpc"; - +import { RPC_URL } from "@/constants"; export type AbstraxionSigningClient = NonNullable< ReturnType["client"]