Skip to content

Commit

Permalink
refactor: self review refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkaroraa committed Feb 8, 2023
1 parent e4f30ec commit 7de006e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,15 @@ 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,
quote.minEthFromSqth,
quote.minEthFromUsdc,
quote.wPowerPerpPoolFee,
quote.usdcPoolFee,
new BigNumber(depositAmountRef.current),
amount,
dataToTrack,
onTxnConfirmed,
)
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/src/pages/positions/BullPosition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}>
Expand Down

0 comments on commit 7de006e

Please sign in to comment.