From 049d10af0ecab1a1b5ba02c8cb24adeebf0192f8 Mon Sep 17 00:00:00 2001 From: Alex Ni <12097569+nialexsan@users.noreply.github.com> Date: Wed, 6 Sep 2023 09:26:26 -0400 Subject: [PATCH] remove sandbox --- .github/workflows/ci.yml | 1 - components/NetworkLinks.tsx | 17 +---------------- components/PageTitle.tsx | 2 +- env.example | 1 - flow.json | 3 +-- lib/constants.ts | 3 +-- lib/publicConfig.ts | 10 ++-------- 7 files changed, 6 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25f9d0d..4bb623e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,6 @@ jobs: NEXT_PUBLIC_SIGNER_ADDRESS: "0xf8d6e0586b0a20c7" SIGNER_PRIVATE_KEY: "91a22fbd87392b019fbe332c32695c14cf2ba5b6521476a8540228bdf1987068" NEXT_PUBLIC_TEST_NET_URL: "http://localhost:3000" - NEXT_PUBLIC_SANDBOX_NET_URL: "http://localhost:3000" NEXT_PUBLIC_TOKEN_AMOUNT_FLOW: "1000.0" NEXT_PUBLIC_TOKEN_AMOUNT_FUSD: "10.0" NEXT_PUBLIC_CONTRACT_FUNGIBLE_TOKEN: "0xee82856bf20e2aa6" diff --git a/components/NetworkLinks.tsx b/components/NetworkLinks.tsx index 057ab7c..1f3b010 100644 --- a/components/NetworkLinks.tsx +++ b/components/NetworkLinks.tsx @@ -1,7 +1,7 @@ /** @jsxImportSource theme-ui */ import TabNav, {TabNavLink} from "components/TabNav" -import {TEST_NET, SANDBOX_NET} from "lib/constants" +import {TEST_NET} from "lib/constants" import {NETWORK_DISPLAY_NAME} from "lib/network" import publicConfig from "lib/publicConfig" @@ -40,21 +40,6 @@ export default function NetworkLinks() { /> Testnet - - Sandboxnet Faucet - Sandboxnet - ) diff --git a/components/PageTitle.tsx b/components/PageTitle.tsx index 552d07d..c21c8b1 100644 --- a/components/PageTitle.tsx +++ b/components/PageTitle.tsx @@ -3,7 +3,7 @@ import publicConfig from "lib/publicConfig" import Head from "next/head" export const BASE_HTML_TITLE = `Flow ${ - publicConfig.network === TEST_NET ? "Testnet" : "Sandboxnet" + publicConfig.network === TEST_NET ? "Testnet" : "" } Faucet` export default function PageTitle({children}: {children?: string}) { diff --git a/env.example b/env.example index e0ea827..cec64df 100644 --- a/env.example +++ b/env.example @@ -1,6 +1,5 @@ NEXT_PUBLIC_NETWORK=testnet NEXT_PUBLIC_TEST_NET_URL=http://localhost:3000 -NEXT_PUBLIC_SANDBOX_NET_URL=http://localhost:3000 NEXT_PUBLIC_MIXPANEL_TOKEN="dev" NEXT_PUBLIC_TOKEN_AMOUNT_FLOW=1000.0 NEXT_PUBLIC_TOKEN_AMOUNT_FUSD=10.0 diff --git a/flow.json b/flow.json index 1477b2d..8eb42e9 100644 --- a/flow.json +++ b/flow.json @@ -22,8 +22,7 @@ }, "networks": { "emulator": "127.0.0.1:3569", - "testnet": "access.devnet.nodes.onflow.org:9000", - "sandbox": "access-001.sandboxnet1.nodes.onflow.org:9000" + "testnet": "access.devnet.nodes.onflow.org:9000" }, "accounts": { "emulator-account": { diff --git a/lib/constants.ts b/lib/constants.ts index 1cd8eb4..ebb8fbe 100644 --- a/lib/constants.ts +++ b/lib/constants.ts @@ -1,8 +1,7 @@ -export type Networks = "testnet" | "sandboxnet" +export type Networks = "testnet" export type TokenTypes = typeof FLOW_TYPE | typeof FUSD_TYPE export const TEST_NET = "testnet" -export const SANDBOX_NET = "sandboxnet" export const FLOW_TYPE = "FLOW" export const FUSD_TYPE = "FUSD" export const NETWORK_STATUS_URL = "https://status.onflow.org/" diff --git a/lib/publicConfig.ts b/lib/publicConfig.ts index f48ac33..982755c 100644 --- a/lib/publicConfig.ts +++ b/lib/publicConfig.ts @@ -1,13 +1,9 @@ -import {SANDBOX_NET, Networks, TEST_NET, TokenTypes} from "./constants" +import {Networks, TEST_NET, TokenTypes} from "./constants" -const network = - process.env.NEXT_PUBLIC_NETWORK === SANDBOX_NET ? SANDBOX_NET : TEST_NET +const network = TEST_NET const testNetUrl = process.env.NEXT_PUBLIC_TEST_NET_URL if (!testNetUrl) throw "Missing NEXT_PUBLIC_TEST_NET_URL" -const sandboxNetUrl = process.env.NEXT_PUBLIC_SANDBOX_NET_URL -if (!sandboxNetUrl) throw "Missing NEXT_PUBLIC_SANDBOX_NET_URL" - const tokenAmountFlow = process.env.NEXT_PUBLIC_TOKEN_AMOUNT_FLOW if (!tokenAmountFlow) throw "Missing NEXT_PUBLIC_TOKEN_AMOUNT_FLOW" @@ -33,7 +29,6 @@ const walletDiscovery = process.env.NEXT_PUBLIC_WALLET_DISCOVERY export type PublicConfig = { network: Networks testNetUrl: string - sandboxNetUrl: string tokenAmountFlow: string tokenAmountFusd: string hcaptchaSiteKey: string @@ -49,7 +44,6 @@ export type PublicConfig = { const publicConfig: PublicConfig = { network, testNetUrl, - sandboxNetUrl, tokenAmountFlow, tokenAmountFusd, hcaptchaSiteKey: