Skip to content

Commit 7de006e

Browse files
committed
refactor: self review refactor
1 parent e4f30ec commit 7de006e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/frontend/src/components/Strategies/Bull/BullTrade/Deposit.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,15 @@ const BullDeposit: React.FC<{ onTxnConfirm: (txn: BullTransactionConfirmation) =
238238
}
239239

240240
if (useQueue) {
241-
await queueDepositEth(new BigNumber(depositAmountRef.current), dataToTrack, onTxnConfirmed)
241+
await queueDepositEth(amount, dataToTrack, onTxnConfirmed)
242242
} else {
243243
await bullFlashDeposit(
244244
quote.ethToCrab,
245245
quote.minEthFromSqth,
246246
quote.minEthFromUsdc,
247247
quote.wPowerPerpPoolFee,
248248
quote.usdcPoolFee,
249-
new BigNumber(depositAmountRef.current),
249+
amount,
250250
dataToTrack,
251251
onTxnConfirmed,
252252
)

packages/frontend/src/pages/positions/BullPosition.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ const BullPosition: React.FC = () => {
3838

3939
const loading = !useAtomValue(bullPositionLoadedAtom)
4040

41-
const initiatedDepositAmount = toTokenAmount(ethQueued, WETH_DECIMALS)
42-
const initiatedWithdrawalAmount = toTokenAmount(zenBullQueued, ZENBULL_TOKEN_DECIMALS).times(bullEthValue)
43-
44-
if (bullCurrentETH.isZero() && initiatedDepositAmount.isZero() && initiatedWithdrawalAmount.isZero()) {
41+
if (bullCurrentETH.isZero() && ethQueued.isZero() && zenBullQueued.isZero()) {
4542
return null
4643
}
4744

45+
const initiatedDepositAmount = toTokenAmount(ethQueued, WETH_DECIMALS)
46+
const initiatedWithdrawalAmount = toTokenAmount(zenBullQueued, ZENBULL_TOKEN_DECIMALS).times(bullEthValue)
47+
4848
return (
4949
<div className={classes.position} id="pos-page-bull">
5050
<div className={classes.positionTitle}>

0 commit comments

Comments
 (0)