Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into nialexsan/remove-fusd
Browse files Browse the repository at this point in the history
  • Loading branch information
nialexsan committed Feb 22, 2024
2 parents 4751b47 + 4ba3116 commit f4566c4
Show file tree
Hide file tree
Showing 28 changed files with 1,429 additions and 3,740 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [15.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -28,14 +28,15 @@ 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_CRESCENDO_URL: "http://localhost:3000"
NEXT_PUBLIC_TOKEN_AMOUNT_FLOW: "1000.0"
NEXT_PUBLIC_CONTRACT_FUNGIBLE_TOKEN: "0xee82856bf20e2aa6"
NEXT_PUBLIC_CONTRACT_FLOW_TOKEN: "0x0ae53cb6e3f42a79"
NEXT_PUBLIC_NETWORK: "testnet"

strategy:
matrix:
node-version: [15.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Sumbit an issue to be added as a codeowner
* @10thfloor @MrDSGC @alse @srinjoyc
* @jribbink @ianthpun @bthaile
5 changes: 3 additions & 2 deletions components/FundAccountForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {ClientFundAccountResult} from "./FundAccountPanel"
import FundAccountSubmitted from "./FundAccountSubmitted"
import publicConfig from "../lib/publicConfig"

export default function FundAccountForm() {
export default function FundAccountForm({address}: {address: string}) {
const [errors, setErrors] = useState<string[]>([])
const [captchaToken, setCaptchaToken] = useState("")
const {mixpanel} = useMixpanel()
Expand All @@ -25,9 +25,10 @@ export default function FundAccountForm() {
<FormContainer>
<Formik
initialValues={{
address: "",
address: address,
token: FLOW_TYPE,
}}
enableReinitialize
validationSchema={fundAccountSchemaClient}
onSubmit={async ({address, token}, {setSubmitting}) => {
setErrors([])
Expand Down
4 changes: 2 additions & 2 deletions components/FundAccountPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export type ClientFundAccountResult = {
amount: string
}

export default function FundAccountPanel() {
export default function FundAccountPanel({address}: {address: string}) {
return (
<div>
<Grid gap={[0, 0, 40, 100]} columns={["auto", "auto", "1.6fr 1fr"]}>
<Box>
<FundAccountForm />
<FundAccountForm address={address} />
</Box>
<Box>
<Sidebar />
Expand Down
6 changes: 3 additions & 3 deletions components/FundAccountSubmitted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Label from "components/Label"
import LoadingFeedback from "components/LoadingFeedback"
import {Box, Flex, Link, Themed, ThemeUICSSObject} from "theme-ui"
import {ClientFundAccountResult} from "./FundAccountPanel"
import publicConfig from "lib/publicConfig"

const styles: Record<string, ThemeUICSSObject> = {
resultsContainer: {
Expand Down Expand Up @@ -46,8 +47,7 @@ export default function FundAccountSubmitted({
<Box mb={4}>
<Themed.h3 sx={{my: 0}}>Account Funded!</Themed.h3>
<Themed.p>
The requested amount has been transfered to your Testnet
account!
{`The requested amount has been transferred to your ${publicConfig.network} account!`}
</Themed.p>
</Box>
<Box>
Expand All @@ -61,7 +61,7 @@ export default function FundAccountSubmitted({
} tokens`}
</div>
<Link
href={`https://flow-view-source.com/testnet/account/${result.address}`}
href={`https://${publicConfig.network}.flowdiver.io/account/${result.address}`}
target="_blank"
variant="secondary"
sx={{fontSize: 1}}
Expand Down
14 changes: 7 additions & 7 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, CRESCENDO_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.sandboxNetUrl}
active={publicConfig.network === SANDBOX_NET}
href={publicConfig.crescendoNetUrl}
active={publicConfig.network === CRESCENDO_NET}
>
<img
src={
publicConfig.network === SANDBOX_NET
? "sandboxnet-faucet-icon.svg"
publicConfig.network === CRESCENDO_NET
? "crescendo-faucet-icon.svg"
: "gray-faucet-icon.svg"
}
alt="Sandboxnet Faucet"
alt="Crescendo Faucet"
sx={{mr: 2}}
/>
Sandboxnet
Crescendo
</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" : "Crescendo"
} Faucet`

export default function PageTitle({children}: {children?: string}) {
Expand Down
12 changes: 0 additions & 12 deletions cypress.json

This file was deleted.

94 changes: 0 additions & 94 deletions cypress/integration/create_account.spec.js

This file was deleted.

90 changes: 0 additions & 90 deletions cypress/integration/fund_account.spec.js

This file was deleted.

21 changes: 0 additions & 21 deletions cypress/integration/header.spec.js

This file was deleted.

22 changes: 0 additions & 22 deletions cypress/plugins/index.js

This file was deleted.

Loading

0 comments on commit f4566c4

Please sign in to comment.