Skip to content

Commit

Permalink
remove fusd
Browse files Browse the repository at this point in the history
  • Loading branch information
nialexsan committed Sep 6, 2023
1 parent 045ad28 commit 1f151b1
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 485 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ jobs:
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"
NEXT_PUBLIC_CONTRACT_FLOW_TOKEN: "0x0ae53cb6e3f42a79"
NEXT_PUBLIC_CONTRACT_FUSD: "0xf8d6e0586b0a20c7"

strategy:
matrix:
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ npm run db-seed
npm run dev-deploy-contracts
```

### Run initial transactions to initialize the FUSD minter

```sh
npm run initial-transactions
```

### Run the Next.js app

```sh
Expand Down
207 changes: 0 additions & 207 deletions cadence/contracts/FUSD.cdc

This file was deleted.

54 changes: 0 additions & 54 deletions cadence/transactions/deposit_fusd_minter.cdc

This file was deleted.

25 changes: 0 additions & 25 deletions cadence/transactions/setup_fusd_minter.cdc

This file was deleted.

13 changes: 0 additions & 13 deletions components/FundAccountFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,14 @@ import FormErrors from "components/FormErrors"
import {Field, useFormikContext} from "formik"
import {
FLOW_TYPE,
FUSD_TYPE,
MISSING_FUSD_VAULT_ERROR,
paths,
} from "lib/constants"
import {NETWORK_DISPLAY_NAME} from "lib/network"
import {Box, Link, Themed} from "theme-ui"
import {CustomInputComponent, CustomSelectComponent} from "./inputs"

const FUSD_VAULT_DOCS_LINK = {
url: "https://docs.onflow.org/fusd/#how-do-i-get-an-fusd-enabled-wallet",
name: "How do I get an FUSD-enabled wallet?",
}

export const TOKEN_OPTIONS = [
{value: FLOW_TYPE, label: `${NETWORK_DISPLAY_NAME} FLOW`},
{value: FUSD_TYPE, label: `${NETWORK_DISPLAY_NAME} FUSD`},
]

export default function FundAccountFields({
Expand Down Expand Up @@ -80,11 +72,6 @@ export default function FundAccountFields({
{errors.length > 0 && (
<FormErrors
errors={errors}
link={
errors.some(e => e === MISSING_FUSD_VAULT_ERROR)
? FUSD_VAULT_DOCS_LINK
: undefined
}
/>
)}
</Box>
Expand Down
23 changes: 0 additions & 23 deletions cypress/integration/fund_account.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {

const CORRECT_ADDRESS = "0xeb179c27144f783c"
const FLOW_SUCCESS_RESPONSE = {token: "FLOW", amount: "1000.0"}
const FUSD_SUCCESS_RESPONSE = {token: "FUSD", amount: "10.0"}

const fundAccountForm = () => cy.get("[data-test='fund-account-form'")
const addressInput = () => cy.get("input[name='address']")
Expand Down Expand Up @@ -41,28 +40,6 @@ describe("Fund account", () => {
)
})

it("Funds an account with FUSD tokens", () => {
cy.intercept("POST", "/api/fund", {body: FUSD_SUCCESS_RESPONSE, delay: 50})

fundAccountButton().should("be.disabled")

addressInput().type(CORRECT_ADDRESS)
cy.get('[data-test="token-select"] select').select("FUSD")
cy.submitCaptcha()

fundAccountButton().click()

fundAccountForm().should("contain", "We are funding your account")

fundAccountForm().should("contain", "Account Funded!")
fundAccountForm().should(
"contain",
`${parseFloat(FUSD_SUCCESS_RESPONSE.amount).toLocaleString()} ${
FUSD_SUCCESS_RESPONSE.token
} tokens`
)
})

it("Shows error on submit failure", () => {
cy.intercept("POST", "/api/fund", {
errors: [FUND_ACCOUNT_ERROR],
Expand Down
Loading

0 comments on commit 1f151b1

Please sign in to comment.