diff --git a/packages/frontend/src/components/Strategies/Bull/BullTrade/Deposit.tsx b/packages/frontend/src/components/Strategies/Bull/BullTrade/Deposit.tsx index 6e52d3857..601950980 100644 --- a/packages/frontend/src/components/Strategies/Bull/BullTrade/Deposit.tsx +++ b/packages/frontend/src/components/Strategies/Bull/BullTrade/Deposit.tsx @@ -238,7 +238,7 @@ const BullDeposit: React.FC<{ onTxnConfirm: (txn: BullTransactionConfirmation) = } if (useQueue) { - await queueDepositEth(new BigNumber(depositAmountRef.current), dataToTrack, onTxnConfirmed) + await queueDepositEth(amount, dataToTrack, onTxnConfirmed) } else { await bullFlashDeposit( quote.ethToCrab, @@ -246,7 +246,7 @@ const BullDeposit: React.FC<{ onTxnConfirm: (txn: BullTransactionConfirmation) = quote.minEthFromUsdc, quote.wPowerPerpPoolFee, quote.usdcPoolFee, - new BigNumber(depositAmountRef.current), + amount, dataToTrack, onTxnConfirmed, ) diff --git a/packages/frontend/src/pages/positions/BullPosition.tsx b/packages/frontend/src/pages/positions/BullPosition.tsx index ae6876dd6..2cc84b4d5 100644 --- a/packages/frontend/src/pages/positions/BullPosition.tsx +++ b/packages/frontend/src/pages/positions/BullPosition.tsx @@ -38,13 +38,13 @@ const BullPosition: React.FC = () => { const loading = !useAtomValue(bullPositionLoadedAtom) - const initiatedDepositAmount = toTokenAmount(ethQueued, WETH_DECIMALS) - const initiatedWithdrawalAmount = toTokenAmount(zenBullQueued, ZENBULL_TOKEN_DECIMALS).times(bullEthValue) - - if (bullCurrentETH.isZero() && initiatedDepositAmount.isZero() && initiatedWithdrawalAmount.isZero()) { + if (bullCurrentETH.isZero() && ethQueued.isZero() && zenBullQueued.isZero()) { return null } + const initiatedDepositAmount = toTokenAmount(ethQueued, WETH_DECIMALS) + const initiatedWithdrawalAmount = toTokenAmount(zenBullQueued, ZENBULL_TOKEN_DECIMALS).times(bullEthValue) + return ( <div className={classes.position} id="pos-page-bull"> <div className={classes.positionTitle}>