Skip to content

Commit

Permalink
Remove FUSD
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Jan 11, 2024
1 parent 2959756 commit f3533e5
Show file tree
Hide file tree
Showing 14 changed files with 6 additions and 406 deletions.
1 change: 0 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
FLOW_INIT_ACCOUNTS=0
CONTRACT_FUNGIBLE_TOKEN=0xee82856bf20e2aa6
CONTRACT_FLOW_TOKEN=0x0ae53cb6e3f42a79
CONTRACT_FUSD=0xf8d6e0586b0a20c7
CONTRACT_FCL_CRYPTO=0xf8d6e0586b0a20c7
FLOW_AVATAR_URL=https://avatars.onflow.org/avatar/

Expand Down
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
FLOW_INIT_ACCOUNTS=0
CONTRACT_FUNGIBLE_TOKEN=0xee82856bf20e2aa6
CONTRACT_FLOW_TOKEN=0x0ae53cb6e3f42a79
CONTRACT_FUSD=0xf8d6e0586b0a20c7
CONTRACT_FCL_CRYPTO=0xf8d6e0586b0a20c7
FLOW_AVATAR_URL=https://avatars.onflow.org/avatar/

Expand Down
226 changes: 0 additions & 226 deletions cadence/contracts/FUSD.cdc

This file was deleted.

12 changes: 0 additions & 12 deletions cadence/scripts/checkFUSDVault.cdc

This file was deleted.

7 changes: 0 additions & 7 deletions cadence/scripts/getFUSDBalance.cdc

This file was deleted.

52 changes: 0 additions & 52 deletions cadence/transactions/fundFUSD.cdc

This file was deleted.

22 changes: 1 addition & 21 deletions components/AccountBalances.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/** @jsxImportSource theme-ui */
import * as fcl from "@onflow/fcl"
import useAccount from "hooks/useAccount"
import useFUSDBalance from "hooks/useFUSDBalance"
import {fundAccount} from "src/accounts"
import {formattedBalance} from "src/balance"
import {FLOW_TYPE, FUSD_TYPE, TokenTypes} from "src/constants"
import {FLOW_TYPE, TokenTypes} from "src/constants"
import useConfig from "hooks/useConfig"
import {Label, Themed} from "theme-ui"
import {SXStyles} from "types"
Expand Down Expand Up @@ -42,7 +41,6 @@ export default function AccountBalances({
address: string
flowAccountAddress: string
}) {
const {data: fusdBalance, refresh: refreshFUSD} = useFUSDBalance(address)
const {data: account, refresh: refreshAccount} = useAccount(address)
const config = useConfig()

Expand All @@ -52,7 +50,6 @@ export default function AccountBalances({
const fund = async (token: TokenTypes) => {
await fundAccount(config, address, token)
refreshAccount()
refreshFUSD()
}

return (
Expand All @@ -76,23 +73,6 @@ export default function AccountBalances({
</Button>
)}
</div>
<div sx={styles.accountSection}>
<Label sx={styles.label}>FUSD</Label>
<div sx={styles.balance}>
{fusdBalance && formattedBalance(fusdBalance.toString())}
</div>
{!isServiceAccount && (
<Button
variant="ghost"
size="xs"
onClick={() => fund(FUSD_TYPE)}
sx={styles.fundButton}
type="button"
>
Fund
</Button>
)}
</div>
</>
)
}
2 changes: 0 additions & 2 deletions contexts/ConfigContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ interface RuntimeConfig {
flowAvatarUrl: string
contractFungibleToken: string
contractFlowToken: string
contractFUSD: string
contractFCLCrypto: string
flowAccountAddress: string
flowAccountPrivateKey: string
Expand All @@ -22,7 +21,6 @@ const defaultConfig = {
flowAvatarUrl: process.env.flowAvatarUrl || "",
contractFungibleToken: process.env.contractFungibleToken || "",
contractFlowToken: process.env.contractFlowToken || "",
contractFUSD: process.env.contractFUSD || "",
contractFCLCrypto: process.env.contractFCLCrypto || "",
flowAccountAddress: process.env.flowAccountAddress || "",
flowAccountPrivateKey: process.env.flowAccountPrivateKey || "",
Expand Down
Loading

0 comments on commit f3533e5

Please sign in to comment.