From 29d63b13f8f1273542b8be811367f153972797a3 Mon Sep 17 00:00:00 2001 From: vvvvvv1vvvvvv Date: Thu, 28 Nov 2024 10:35:43 +0800 Subject: [PATCH] feat: + error toast --- .../screens/Transaction/HistoryFilterScamScreen.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/mobile/src/screens/Transaction/HistoryFilterScamScreen.tsx b/apps/mobile/src/screens/Transaction/HistoryFilterScamScreen.tsx index c1a3f051c..8528d38af 100644 --- a/apps/mobile/src/screens/Transaction/HistoryFilterScamScreen.tsx +++ b/apps/mobile/src/screens/Transaction/HistoryFilterScamScreen.tsx @@ -12,6 +12,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { KeyringAccountWithAlias, useMyAccounts } from '@/hooks/account'; import { HistoryDisplayItem } from './MultiAddressHistory'; import NormalScreenContainer2024 from '@/components2024/ScreenContainer/NormalScreenContainer'; +import { toast } from '@/components2024/Toast'; const waitQueueFinished = (q: PQueue) => { return new Promise(resolve => { @@ -45,9 +46,13 @@ function HistoryFilterScamScreen({ if (!account) { return; } - const addr = account.address.toLowerCase(); - const result = await fetchData(addr); - list.push(...result.list); + try { + const addr = account.address.toLowerCase(); + const result = await fetchData(addr); + list.push(...result.list); + } catch (e) { + toast.error(`${account.address} load failed, ${JSON.stringify(e)}`); + } }); } await waitQueueFinished(queue);