Skip to content

Commit

Permalink
Merge branch 'main' into fix/9862_redundant_metametrics_calls
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasMassart authored Jun 13, 2024
2 parents ce2a52f + 76299fb commit a3b939a
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions app/components/UI/Ramp/Views/BuildQuote/BuildQuote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,19 @@ const BuildQuote = () => {
estimateRange: 'high',
});

const assetForBalance =
selectedAsset && selectedAsset.address !== NATIVE_ADDRESS
? {
address: selectedAsset.address,
symbol: selectedAsset.symbol,
decimals: selectedAsset.decimals,
}
: {
isETH: true,
};
const assetForBalance = useMemo(
() =>
selectedAsset && selectedAsset.address !== NATIVE_ADDRESS
? {
address: selectedAsset.address,
symbol: selectedAsset.symbol,
decimals: selectedAsset.decimals,
}
: {
isETH: true,
},
[selectedAsset],
);

const { addressBalance } = useAddressBalance(
assetForBalance as Asset,
Expand Down

0 comments on commit a3b939a

Please sign in to comment.