From 05586896360d969e15803d40ff1f8ae85235b6a4 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Oct 2020 16:48:21 -0230 Subject: [PATCH] Compare convert ethBalance to decimal before comparing to fromTokenBalance in useEffect for eth token balance update (#9607) --- ui/app/pages/swaps/build-quote/build-quote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/pages/swaps/build-quote/build-quote.js b/ui/app/pages/swaps/build-quote/build-quote.js index f692f8d82..8ca56c3af 100644 --- a/ui/app/pages/swaps/build-quote/build-quote.js +++ b/ui/app/pages/swaps/build-quote/build-quote.js @@ -166,7 +166,7 @@ export default function BuildQuote ({ // If the eth balance changes while on build quote, we update the selected from token useEffect(() => { - if (fromToken?.address === ETH_SWAPS_TOKEN_OBJECT.address && (fromToken?.balance !== ethBalance)) { + if (fromToken?.address === ETH_SWAPS_TOKEN_OBJECT.address && (fromToken?.balance !== hexToDecimal(ethBalance))) { dispatch(setSwapsFromToken({ ...fromToken, balance: hexToDecimal(ethBalance),