Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo committed Sep 25, 2024
1 parent f4209f3 commit 60b2d1f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ object VaultDepositWithdrawFormValidator {

val withdrawnAmountIncludingSlippage = slippageResponse?.expectedAmount
val postOpVaultBalance = when (formData.action) {
VaultFormAction.DEPOSIT -> (vaultAccount?.balanceUsdc ?: 0.0) + amount
VaultFormAction.WITHDRAW -> (vaultAccount?.balanceUsdc ?: 0.0) - amount
}
VaultFormAction.DEPOSIT -> (vaultAccount?.balanceUsdc ?: 0.0) + amount
VaultFormAction.WITHDRAW -> (vaultAccount?.balanceUsdc ?: 0.0) - amount
}

val (postOpFreeCollateral, postOpMarginUsage) = if (accountData?.freeCollateral != null && accountData.marginUsage != null) {
val equity = accountData.freeCollateral / (1 - accountData.marginUsage)
Expand Down

0 comments on commit 60b2d1f

Please sign in to comment.