Skip to content

Commit

Permalink
fix: maximize when pool does not have native assets (#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
agualis authored Oct 3, 2024
1 parent 1a6ffc2 commit 430f456
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ export function useMaximumInputs() {

// Depending on if the user is using WETH or ETH, we need to filter out the
// native asset or wrapped native asset.
const nativeAssetFilter = (balance: TokenAmount) =>
wethIsEth
? wNativeAsset && balance.address !== wNativeAsset.address
: nativeAsset && balance.address !== nativeAsset.address
const nativeAssetFilter = (balance: TokenAmount) => {
return wethIsEth
? balance.address !== wNativeAsset?.address
: balance.address !== nativeAsset?.address
}

const filteredBalances = useMemo(() => {
return balances.filter(nativeAssetFilter)
Expand Down

0 comments on commit 430f456

Please sign in to comment.