diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx index 8b9a4b440..bccec79db 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx @@ -259,7 +259,7 @@ export function OpenLongForm({ ) : null } bottomRightElement={ -
+
{activeTokenBalance ? `Balance: ${formatBalance({ @@ -286,17 +286,19 @@ export function OpenLongForm({ /> } transactionPreview={ - + depositAmountAsBigInt ? ( + + ) : null } disclaimer={(() => { if (!!depositAmountAsBigInt && !hasEnoughLiquidity) { diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityForm/AddLiquidityForm2.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityForm/AddLiquidityForm2.tsx index 0d6be3dac..85c9b68fa 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityForm/AddLiquidityForm2.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/lp/AddLiquidityForm/AddLiquidityForm2.tsx @@ -277,7 +277,7 @@ export function AddLiquidityForm2({
} bottomRightElement={ -
+
{activeTokenBalance ? `Balance: ${formatBalance({ diff --git a/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortForm/OpenShortForm.tsx b/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortForm/OpenShortForm.tsx index 36a09713b..a21db040b 100644 --- a/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortForm/OpenShortForm.tsx +++ b/apps/hyperdrive-trading/src/ui/hyperdrive/shorts/OpenShortForm/OpenShortForm.tsx @@ -475,20 +475,13 @@ export function OpenShortForm({ ); } // In all other cases where the user has input an amount, show the disclaimer, but ensure a skeleton is shown only on the stats that are being refetched on new blocks - return ( -
- {!hasEnoughBalance && openShortPreviewStatus !== "loading" ? ( -

- Insufficient balance -

- ) : null} - {hyperdrive.withdrawOptions.isBaseTokenWithdrawalEnabled ? null : ( -

- {`When closing your Short position, you'll receive ${sharesToken?.symbol}.`} -

- )} -
- ); + if (!hasEnoughBalance && openShortPreviewStatus !== "loading") { + return ( +

+ Insufficient balance +

+ ); + } })()} actionButton={(() => { if (!account) { diff --git a/apps/hyperdrive-trading/src/ui/token/TokenInputTwo.tsx b/apps/hyperdrive-trading/src/ui/token/TokenInputTwo.tsx index e605f1a19..8215e9637 100644 --- a/apps/hyperdrive-trading/src/ui/token/TokenInputTwo.tsx +++ b/apps/hyperdrive-trading/src/ui/token/TokenInputTwo.tsx @@ -120,7 +120,7 @@ export function TokenInputTwo({