mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Compare convert ethBalance to decimal before comparing to fromTokenBalance in useEffect for eth token balance update (#9607)
This commit is contained in:
parent
c39617e111
commit
0558689636
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user