Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 8f63fca

Browse files
committed
fix: maximize when pool does not have native assets
1 parent 1a6ffc2 commit 8f63fca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/modules/pool/actions/add-liquidity/form/useMaximumInputs.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ export function useMaximumInputs() {
2323

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

3132
const filteredBalances = useMemo(() => {
3233
return balances.filter(nativeAssetFilter)

0 commit comments

Comments
 (0)