Skip to content

Commit

Permalink
Merge pull request #92 from onflow/cf/pick-name-change
Browse files Browse the repository at this point in the history
Cherry pick name change
  • Loading branch information
chasefleming committed Feb 27, 2024
2 parents 2233b29 + 0c6624f commit 366a02c
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -28,7 +28,7 @@ jobs:
NEXT_PUBLIC_SIGNER_ADDRESS: "0xf8d6e0586b0a20c7"
SIGNER_PRIVATE_KEY: "91a22fbd87392b019fbe332c32695c14cf2ba5b6521476a8540228bdf1987068"
NEXT_PUBLIC_TEST_NET_URL: "http://localhost:3000"
NEXT_PUBLIC_CRESCENDO_URL: "http://localhost:3000"
NEXT_PUBLIC_PREVIEWNET_URL: "http://localhost:3000"
NEXT_PUBLIC_TOKEN_AMOUNT_FLOW: "1000.0"
NEXT_PUBLIC_CONTRACT_FUNGIBLE_TOKEN: "0xee82856bf20e2aa6"
NEXT_PUBLIC_CONTRACT_FLOW_TOKEN: "0x0ae53cb6e3f42a79"
Expand Down
14 changes: 7 additions & 7 deletions components/NetworkLinks.tsx
@@ -1,7 +1,7 @@
/** @jsxImportSource theme-ui */

import TabNav, {TabNavLink} from "components/TabNav"
import {TEST_NET, CRESCENDO_NET} from "lib/constants"
import {TEST_NET, PREVIEW_NET} from "lib/constants"
import {NETWORK_DISPLAY_NAME} from "lib/network"
import publicConfig from "lib/publicConfig"

Expand Down Expand Up @@ -41,19 +41,19 @@ export default function NetworkLinks() {
Testnet
</TabNavLink>
<TabNavLink
href={publicConfig.crescendoNetUrl}
active={publicConfig.network === CRESCENDO_NET}
href={publicConfig.previewnetUrl}
active={publicConfig.network === PREVIEW_NET}
>
<img
src={
publicConfig.network === CRESCENDO_NET
? "crescendo-faucet-icon.svg"
publicConfig.network === PREVIEW_NET
? "previewnet-faucet-icon.svg"
: "gray-faucet-icon.svg"
}
alt="Crescendo Faucet"
alt={`${NETWORK_DISPLAY_NAME} Faucet`}
sx={{mr: 2}}
/>
Crescendo
Previewnet
</TabNavLink>
</TabNav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/PageTitle.tsx
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" : "Crescendo"
publicConfig.network === TEST_NET ? "Testnet" : "Previewnet"
} Faucet`

export default function PageTitle({children}: {children?: string}) {
Expand Down
2 changes: 1 addition & 1 deletion env.example
@@ -1,6 +1,6 @@
NEXT_PUBLIC_NETWORK=testnet
NEXT_PUBLIC_TEST_NET_URL=http://localhost:3000
NEXT_PUBLIC_CRESCENDO_URL=http://localhost:3000
NEXT_PUBLIC_PREVIEWNET_URL=http://localhost:3000
NEXT_PUBLIC_MIXPANEL_TOKEN="dev"
NEXT_PUBLIC_TOKEN_AMOUNT_FLOW=1000.0
NEXT_PUBLIC_SIGNER_ADDRESS=0xf8d6e0586b0a20c7
Expand Down
6 changes: 3 additions & 3 deletions lib/constants.ts
@@ -1,8 +1,8 @@
export type Networks = "testnet" | "crescendo"
export type Networks = "testnet" | "previewnet"
export type TokenTypes = typeof FLOW_TYPE

export const TEST_NET = "testnet"
export const CRESCENDO_NET = "crescendo"
export const PREVIEW_NET = "previewnet"
export const FLOW_TYPE = "FLOW"
export const NETWORK_STATUS_URL = "https://status.onflow.org/"
export const GENERATE_KEYS_DOCS_URL =
Expand Down Expand Up @@ -33,5 +33,5 @@ export const ADDRESS_REGEXP = /^(0x)?[0-9a-fA-F]{16}$/

export const NETWORK_CODEWORDS = {
testnet: "0x6834ba37b3980209",
crescendo: "0x6834ba37b3980209",
previewnet: "0x5211829E88528817",
}
8 changes: 4 additions & 4 deletions lib/publicConfig.ts
Expand Up @@ -6,8 +6,8 @@ if (!network) throw "Missing NEXT_PUBLIC_NETWORK"
const testNetUrl = process.env.NEXT_PUBLIC_TEST_NET_URL
if (!testNetUrl) throw "Missing NEXT_PUBLIC_TEST_NET_URL"

const crescendoNetUrl = process.env.NEXT_PUBLIC_CRESCENDO_URL
if (!crescendoNetUrl) throw "Missing NEXT_PUBLIC_CRESCENDO_URL"
const previewnetUrl = process.env.NEXT_PUBLIC_PREVIEWNET_URL
if (!previewnetUrl) throw "Missing NEXT_PUBLIC_PREVIEWNET_URL"

const tokenAmountFlow = process.env.NEXT_PUBLIC_TOKEN_AMOUNT_FLOW
if (!tokenAmountFlow) throw "Missing NEXT_PUBLIC_TOKEN_AMOUNT_FLOW"
Expand All @@ -28,7 +28,7 @@ const walletDiscovery = process.env.NEXT_PUBLIC_WALLET_DISCOVERY
export type PublicConfig = {
network: Networks
testNetUrl: string
crescendoNetUrl: string
previewnetUrl: string
tokenAmountFlow: string
hcaptchaSiteKey: string
signerAddress: string
Expand All @@ -42,7 +42,7 @@ export type PublicConfig = {
const publicConfig: PublicConfig = {
network,
testNetUrl,
crescendoNetUrl,
previewnetUrl: previewnetUrl,
tokenAmountFlow,
hcaptchaSiteKey:
process.env.NEXT_PUBLIC_HCAPTCHA_SITE_KEY ||
Expand Down
File renamed without changes
File renamed without changes

0 comments on commit 366a02c

Please sign in to comment.