From bcd975e3e3926d89e02a9a05745b74677dec107f Mon Sep 17 00:00:00 2001 From: Taras Alechin Date: Wed, 9 Aug 2023 15:30:49 +0400 Subject: [PATCH] feat: toast message after adding token to wallet --- shared/components/token-to-wallet/token-to-wallet.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/shared/components/token-to-wallet/token-to-wallet.tsx b/shared/components/token-to-wallet/token-to-wallet.tsx index 4827d3b90..b1bbf4857 100644 --- a/shared/components/token-to-wallet/token-to-wallet.tsx +++ b/shared/components/token-to-wallet/token-to-wallet.tsx @@ -1,4 +1,4 @@ -import { Tooltip } from '@lidofinance/lido-ui'; +import { ToastInfo, Tooltip } from '@lidofinance/lido-ui'; import { useTokenToWallet } from '@lido-sdk/react'; import { TokenToWalletStyle } from './styles'; @@ -12,9 +12,16 @@ export const TokenToWallet: TokenToWalletComponent = (props) => { if (!addToken) return null; + const onClickHandler = async () => { + const result = await addToken(); + if (!result) return; + + ToastInfo('Tokens were successfully added to your wallet', {}); + }; + return ( - + ); };