Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove sandbox #56

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 1 addition & 16 deletions components/NetworkLinks.tsx
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -40,21 +40,6 @@ export default function NetworkLinks() {
/>
Testnet
</TabNavLink>
<TabNavLink
href={publicConfig.sandboxNetUrl}
active={publicConfig.network === SANDBOX_NET}
>
<img
src={
publicConfig.network === SANDBOX_NET
? "sandboxnet-faucet-icon.svg"
: "gray-faucet-icon.svg"
}
alt="Sandboxnet Faucet"
sx={{mr: 2}}
/>
Sandboxnet
</TabNavLink>
</TabNav>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion components/PageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}) {
Expand Down
1 change: 0 additions & 1 deletion env.example
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 1 addition & 2 deletions lib/constants.ts
Original file line number Diff line number Diff line change
@@ -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/"
Expand Down
10 changes: 2 additions & 8 deletions lib/publicConfig.ts
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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
Expand All @@ -49,7 +44,6 @@ export type PublicConfig = {
const publicConfig: PublicConfig = {
network,
testNetUrl,
sandboxNetUrl,
tokenAmountFlow,
tokenAmountFusd,
hcaptchaSiteKey:
Expand Down