From cbc0db09b8222bc4a99384442cd063a437bc5365 Mon Sep 17 00:00:00 2001 From: Dong-Ha Kim Date: Thu, 2 Nov 2023 16:48:22 +0100 Subject: [PATCH] fix: quote update after user connected wallet via bridge action button (#898) * fix: make quote query dependent on block * fix: update quote after user connected wallet * fixup --- src/views/Bridge/hooks/useBridge.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/Bridge/hooks/useBridge.ts b/src/views/Bridge/hooks/useBridge.ts index ae4cd0a6d..36f99701b 100644 --- a/src/views/Bridge/hooks/useBridge.ts +++ b/src/views/Bridge/hooks/useBridge.ts @@ -117,7 +117,10 @@ export function useBridge() { useEffect(() => { if (shouldUpdateQuote && bridgeAction.isButtonActionLoading) { setShouldUpdateQuote(false); - } else if (bridgeAction.didActionError && !shouldUpdateQuote) { + } else if ( + (bridgeAction.didActionError || !bridgeAction.isButtonActionLoading) && + !shouldUpdateQuote + ) { setShouldUpdateQuote(true); } }, [