From 8b6a8cafb7c7360cabce23699f9bce897565bde8 Mon Sep 17 00:00:00 2001 From: Ryan Miller Date: Tue, 9 Jul 2024 09:45:43 +1000 Subject: [PATCH] fix: add padding in mobile and add discord and telegram to faucet backend call --- apps/staking/app/faucet/AuthModule.tsx | 15 ++++++++------- apps/staking/app/faucet/page.tsx | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/staking/app/faucet/AuthModule.tsx b/apps/staking/app/faucet/AuthModule.tsx index 96eb96cd..282e2d92 100644 --- a/apps/staking/app/faucet/AuthModule.tsx +++ b/apps/staking/app/faucet/AuthModule.tsx @@ -107,6 +107,14 @@ export const AuthModule = () => { }); } + if (discordId) { + data.discordId = discordId; + } + + if (telegramId) { + data.telegramId = telegramId; + } + const promise: Promise
= new Promise((resolve, reject) => transferTestTokens(data).then((res) => { if (!res) { @@ -190,13 +198,6 @@ export const AuthModule = () => { } }, [walletStatus, address, form]); - useEffect(() => { - if (authStatus === 'authenticated') { - form.setValue('discordId', discordId); - form.setValue('telegramId', telegramId); - } - }, [authStatus, discordId, telegramId, form]); - return ( {formState !== FORM_STATE.LANDING && formState !== FORM_STATE.SUCCESS ? ( diff --git a/apps/staking/app/faucet/page.tsx b/apps/staking/app/faucet/page.tsx index 79928544..330641e4 100644 --- a/apps/staking/app/faucet/page.tsx +++ b/apps/staking/app/faucet/page.tsx @@ -10,7 +10,7 @@ export default function FaucetPage() { const dictionary = useTranslations('faucet.information'); return ( -
+

{dictionary('title')}

{dictionary('communityTitle')}