Skip to content

Commit

Permalink
Remove Stablecoin access and add guide to Mento page (#198)
Browse files Browse the repository at this point in the history
* Remove Stablecoin access and add guide to Mento page

* fix:hardcode skipStables =true
  • Loading branch information
Ronexlemon authored Nov 15, 2024
1 parent 9de0521 commit c542297
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
17 changes: 2 additions & 15 deletions apps/web/components/request-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ export const RequestForm: FC<Props> = ({ isOutOfCELO, network }) => {
const { executeRecaptcha } = useGoogleReCaptcha()
const [skipStables, setSkipStables] = useState(true)

const toggleStables = useCallback(() => {
setSkipStables(!skipStables)
}, [skipStables])

const [faucetRequestKey, setKey] = useState<string | null>(null)
const [failureStatus, setFailureStatus] = useState<string | null>(null)

Expand Down Expand Up @@ -137,18 +133,9 @@ export const RequestForm: FC<Props> = ({ isOutOfCELO, network }) => {
className={styles.button}
type="submit"
>
{'Faucet'}
{'Claim CELO'}
</button>
<label>
<input
onChange={toggleStables}
name="token-request"
value={'skip-stables'}
type={'checkbox'}
defaultChecked={skipStables}
/>
<small className={inter.className}> CELO Only</small>
</label>

{/* @ts-ignore */}
<FaucetStatus
network={network}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/setup-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const SetupButton: FC<Props> = ({ network }) => {
Add Celo Testnet <span>&gt;</span>
</h3>
<p className={inter.className}>
Enable {networkCapitalized} and Register Mento tokens in Metamask
Enable {networkCapitalized} and Add Mentos Stablecoins to your Wallet
</p>
</button>
)
Expand Down
8 changes: 8 additions & 0 deletions apps/web/pages/[chain].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ const Home: NextPage<Props> = ({ isOutOfCELO, network }: Props) => {
*Accounts with large balances will receive a phased down amount.
Please consider returning any tokens you won&#39;t need.
</small>
<small className={`${styles.phaseDown} ${inter.className}`}>
Swap CELO for cUSD, cEUR, or cREAL on{' '}
<u>
<Link href="https://app.mento.org/">mento</Link>
</u>{' '}
. For other tokens like USDT or USDC, swap CELO to cUSD first, then
exchange to your desired token.
</small>
</div>
<footer className={styles.grid}>
<SetupButton network={network} />
Expand Down
3 changes: 2 additions & 1 deletion apps/web/pages/api/faucet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default async function handler(
console.error('Authentication check failed', e)
}

const { captchaToken, beneficiary, skipStables, network } = req.body
const { captchaToken, beneficiary, network } = req.body
const skipStables = true

if (!networks.includes(network)) {
res.status(400).json({
Expand Down

0 comments on commit c542297

Please sign in to comment.