From 3d55299b01f245c2452bb335f2e828db2aac0b37 Mon Sep 17 00:00:00 2001 From: Guillaume Roux Date: Tue, 8 Nov 2022 13:08:52 +0100 Subject: [PATCH] reset errors and loading state on call --- ui/hooks/flask/useTransactionInsightSnap.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/hooks/flask/useTransactionInsightSnap.js b/ui/hooks/flask/useTransactionInsightSnap.js index be8911c52375..e7a4b656a789 100644 --- a/ui/hooks/flask/useTransactionInsightSnap.js +++ b/ui/hooks/flask/useTransactionInsightSnap.js @@ -20,6 +20,9 @@ export function useTransactionInsightSnap({ transaction, chainId, snapId }) { useEffect(() => { async function fetchInsight() { try { + setError(undefined); + setLoading(true); + const d = await handleSnapRequest({ snapId, origin: '',