From b3e946c27f0aadc7bd3458a4fc27a1c4edbad5f4 Mon Sep 17 00:00:00 2001 From: hotequil Date: Wed, 18 Dec 2024 16:59:47 -0300 Subject: [PATCH] CU-86a5xqdaq-NEON3 - Swap Request - Show error toast when Pair is unavailable --- src/renderer/src/routes/pages/Swap/SwapPageContent.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/src/routes/pages/Swap/SwapPageContent.tsx b/src/renderer/src/routes/pages/Swap/SwapPageContent.tsx index 8f8f6239..0beb66b3 100644 --- a/src/renderer/src/routes/pages/Swap/SwapPageContent.tsx +++ b/src/renderer/src/routes/pages/Swap/SwapPageContent.tsx @@ -26,6 +26,7 @@ import { TransactionFeeActionStep } from '@renderer/components/TransactionFeeAct import { SWAP_NETWORK_BY_BLOCKCHAIN_AND_NETWORK_ID } from '@renderer/constants/swap' import { AccountHelper } from '@renderer/helpers/AccountHelper' import { NumberHelper } from '@renderer/helpers/NumberHelper' +import { ToastHelper } from '@renderer/helpers/ToastHelper' import { UtilsHelper } from '@renderer/helpers/UtilsHelper' import { useAccountsSelector } from '@renderer/hooks/useAccountSelector' import { useActions } from '@renderer/hooks/useActions' @@ -273,6 +274,10 @@ export const SwapPageContent = ({ account }: TProps) => { setData({ selectAmountToUseMinMax: amountToUseMinMax }) }) + swapService.eventEmitter.on('error', error => { + ToastHelper.error({ message: error, duration: 6000 }) + }) + swapService.init() return () => {