diff --git a/src/components/Header.tsx b/src/components/Header.tsx index da4bb28..82f1410 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -96,7 +96,7 @@ export function Header() { setMobileMenuOpen(false)}> Explore - setMobileMenuOpen(false)}> + setMobileMenuOpen(false)}> Pools setMobileMenuOpen(false)}> diff --git a/src/components/PoolModal.tsx b/src/components/PoolModal.tsx index 75d64ce..9157a57 100644 --- a/src/components/PoolModal.tsx +++ b/src/components/PoolModal.tsx @@ -347,62 +347,57 @@ export default function PoolModal({ {isHfAmm ? ( - + ) : (
- + - +
)} - - {mode === 'Withdraw' ? `Withdraw from ${poolLabel}` : poolLabel} - + {poolLabel} -
- - + {/* Tabs */} +
+
+ + +
{mode === 'Deposit' && ( @@ -423,109 +418,143 @@ export default function PoolModal({ className='border-0 bg-transparent p-0 h-auto text-lg focus-visible:ring-0' onChange={(e) => onInputChange(e.target.value)} /> -
- - Balance: {formatTokenAmount({ - value: balance, - expo: decimals, - })}{' '} - {isHfAmm - ? (underlyingToken?.symbol ?? underlyingSymbol) - : pool.symbol} - - - - -
-
-
- {PERCENTAGES.map((n) => ( - - ))} -
+ -
- Deposit percentage - {depositPct}% +
+ + Balance: {formatTokenAmount({ value: balance, expo: decimals })}{' '} + {isHfAmm ? (underlyingToken?.symbol ?? underlyingSymbol) : pool.symbol} +
-
-
+
+ {PERCENTAGES.map((n) => ( + + ))}
-
-

- You receive (min) -

-
-
+ + {inputError &&

{inputError}

} + + {/* Details */} +
+
+ Max slippage + + + {slippage} % + +
+
+ Balance + + {formatTokenAmount({ value: balance, expo: decimals })}{' '} + {isHfAmm ? (underlyingToken?.symbol ?? underlyingSymbol) : pool.symbol} + +
+
+ My position + + {formatTokenAmount({ value: lpBalance, expo: pool.decimals })}{' '} + {isHfAmm + ? (pool.symbol.startsWith('z') ? pool.symbol : `z${pool.symbol}`) + : pool.symbol} + +
+
+ Pool share + {poolShareDisplay} +
+
+ + {/* Receive row — inline with details */} +
+
+ You receive (min) + + {minLpFormatted ?? '0'}{' '} - - {isHfAmm - ? (pool.symbol.startsWith('z') ? pool.symbol : `z${pool.symbol}`) - : pool.symbol} - -
- {minLpFormatted ?? '0.00'} +
{expectedLpFormatted != null && expectedLpFormatted !== (minLpFormatted ?? '0.00') && (

Expected: {expectedLpFormatted}

)} {isHfAmm && ( -
- Total Value +
+ Total Value {formatUsd(totalValueUsd)}
)}
- {inputError &&

{inputError}

} -
- -
- Pool Share - {poolShareDisplay} -
-
+ + {/* CTA */} )} {mode === 'Withdraw' && ( <> -
-

- Withdraw amount -

- + {/* Input card */} +
+
+ onInputChange(e.target.value)} + /> + + + +
+
+ + Balance: {formatTokenAmount({ value: lpBalance, expo: decimals })}{' '} + {isHfAmm + ? (pool.symbol.startsWith('z') ? pool.symbol : `z${pool.symbol}`) + : 'LP'} + +
+
+ {PERCENTAGES.map((n) => ( + + ))} +
@@ -565,15 +594,27 @@ export default function PoolModal({ ))}
-
- Withdraw percentage - {withdrawPct}% +
+ Balance + + {formatTokenAmount({ value: lpBalance, expo: pool.decimals })}{' '} + {isHfAmm + ? (pool.symbol.startsWith('z') ? pool.symbol : `z${pool.symbol}`) + : 'LP'} + +
+
+ My position + + {formatTokenAmount({ value: lpBalance, expo: pool.decimals })}{' '} + {isHfAmm + ? (pool.symbol.startsWith('z') ? pool.symbol : `z${pool.symbol}`) + : pool.symbol} +
-
-
+
+ Pool share after + {withdrawPoolShareDisplay}
@@ -613,49 +654,29 @@ export default function PoolModal({ )} {isHfAmm && ( -
- Total Value +
+ Total Value {formatUsd(totalValueUsd)}
)}
-
- -
- Remaining pool share - {withdrawPoolShareDisplay} -
-
- {!isHfAmm && ( -
- -
-

- Impermanent Loss Notice -

-

- Withdrawing now realizes any impermanent loss. Your position may have - experienced IL since deposit. If you deposited at a different price - ratio, you may receive fewer tokens than expected. -

-
-
- )} + + {/* CTA */} )} {(depositError || withdrawError) && ( -

+

{depositError ?? withdrawError}

)} diff --git a/src/components/SwapPairs.tsx b/src/components/SwapPairs.tsx index ad47293..c72fd0b 100644 --- a/src/components/SwapPairs.tsx +++ b/src/components/SwapPairs.tsx @@ -1,9 +1,18 @@ +import { useState } from 'react'; + export const SwapPairs = ( { swapPairs, disabled }: { swapPairs: () => void; disabled: boolean }, ) => { + const [rotation, setRotation] = useState(0); + + const handleClick = () => { + setRotation((r) => r + 180); + swapPairs(); + }; + return ( diff --git a/src/providers/ModalProvider.tsx b/src/providers/ModalProvider.tsx index b844d1a..938ff91 100644 --- a/src/providers/ModalProvider.tsx +++ b/src/providers/ModalProvider.tsx @@ -40,7 +40,7 @@ const ModalBackdrop = ({ return createPortal(