generated from scaffold-eth/scaffold-eth
-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3026 from OlympusDAO/develop
Release: My Balances
- Loading branch information
Showing
74 changed files
with
1,395 additions
and
4,495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Box, FormControl, MenuItem, Select, Typography } from "@mui/material"; | ||
import { SecondaryButton } from "@olympusdao/component-library"; | ||
import { useState } from "react"; | ||
import { useFaucet } from "src/components/TopBar/Wallet/hooks/useFaucet"; | ||
|
||
export const DevFaucet = () => { | ||
const PREFIX = "AssetsIndex"; | ||
const [faucetToken, setFaucetToken] = useState("OHM V2"); | ||
const faucetMutation = useFaucet(); | ||
|
||
const classes = { | ||
selector: `${PREFIX}-selector`, | ||
forecast: `${PREFIX}-forecast`, | ||
faucet: `${PREFIX}-faucet`, | ||
}; | ||
const isFaucetLoading = faucetMutation.isLoading; | ||
|
||
return ( | ||
<> | ||
<Typography variant="h5">Dev Faucet</Typography> | ||
<Box display="flex" flexDirection="row" justifyContent="space-between" mt="18px"> | ||
<FormControl className={classes.faucet}> | ||
<Select | ||
label="Contract" | ||
id="contract-select" | ||
value={faucetToken} | ||
onChange={event => setFaucetToken(event.target.value)} | ||
> | ||
<MenuItem value="OHM V1">OHM V1</MenuItem> | ||
<MenuItem value="OHM V2">OHM V2</MenuItem> | ||
<MenuItem value="sOHM V1">sOHM V1</MenuItem> | ||
<MenuItem value="sOHM V2">sOHM V2</MenuItem> | ||
<MenuItem value="wsOHM">wsOHM</MenuItem> | ||
<MenuItem value="gOHM">gOHM</MenuItem> | ||
<MenuItem value="DAI">DAI</MenuItem> | ||
<MenuItem value="ETH">ETH</MenuItem> | ||
</Select> | ||
</FormControl> | ||
<SecondaryButton onClick={() => faucetMutation.mutate(faucetToken)}> | ||
{isFaucetLoading ? "Loading..." : "Get Tokens"} | ||
</SecondaryButton> | ||
</Box> | ||
</> | ||
); | ||
}; |
Oops, something went wrong.