Skip to content

Commit 0ca71b3

Browse files
authored
Show max long in terms of active token (#1786)
1 parent ad5eced commit 0ca71b3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/hyperdrive-trading/src/ui/hyperdrive/longs/OpenLongForm/OpenLongForm.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,14 @@ export function OpenLongForm({
422422
<InvalidTransactionButton wide>
423423
Pool limit exceeded. Max long is{" "}
424424
{formatBalance({
425-
balance: maxBondsOut || 0n,
425+
balance:
426+
activeToken.address === sharesToken?.address
427+
? maxSharesIn || 0n
428+
: maxBaseIn || 0n,
426429
decimals: baseToken.decimals,
427430
places: baseToken.places,
428431
})}{" "}
429-
hy{baseToken.symbol}
432+
{activeToken.symbol}
430433
</InvalidTransactionButton>
431434
);
432435
}

0 commit comments

Comments
 (0)