From b9a50098e85cff06260e7e8ad01bf79a7380f5a4 Mon Sep 17 00:00:00 2001
From: Ryan Miller
Date: Tue, 9 Jul 2024 16:37:49 +1000
Subject: [PATCH] fix: add watch token to faucet on success
---
apps/staking/app/faucet/AuthModule.tsx | 8 ++++++++
apps/staking/locales/en.json | 2 ++
2 files changed, 10 insertions(+)
diff --git a/apps/staking/app/faucet/AuthModule.tsx b/apps/staking/app/faucet/AuthModule.tsx
index 70b5faca..a8f11f22 100644
--- a/apps/staking/app/faucet/AuthModule.tsx
+++ b/apps/staking/app/faucet/AuthModule.tsx
@@ -10,6 +10,7 @@ import { Input } from '@session/ui/ui/input';
import { useTranslations } from 'next-intl';
import ActionModule, { ActionModuleDivider } from '../stake/ActionModule';
+import { WalletAddTokenWithLocales } from '@/components/WalletAddTokenWithLocales';
import { FAUCET, FAUCET_ERROR } from '@/lib/constants';
import { ButtonDataTestId } from '@/testing/data-test-ids';
import { zodResolver } from '@hookform/resolvers/zod';
@@ -381,6 +382,13 @@ export const AuthModule = () => {
})}
) : null}
+
+ {formState === FORM_STATE.SUCCESS ? (
+ <>
+ {dictionary('watchSENTInfo')}
+
+ >
+ ) : null}
);
};
diff --git a/apps/staking/locales/en.json b/apps/staking/locales/en.json
index 26dbf1d1..71fb6208 100644
--- a/apps/staking/locales/en.json
+++ b/apps/staking/locales/en.json
@@ -130,6 +130,8 @@
"transactionHash": "Transaction Hash: {hash}",
"transactionHashDescription": "Transaction hash of the faucet transaction.",
"haveSomeMore": "Alright then, you can have some more",
+ "watchSENTInfo": "You may need to add {tokenSymbol} to your wallet to make it show up, click the button below to add it.",
+ "watchSENTButtonText": "Add {tokenSymbol} to wallet",
"copyTransactionHash": "Copy Transaction Hash",
"copyTransactionHashSuccessToast": "Copied Transaction Hash to clipboard!"
}