diff --git a/build.gradle.kts b/build.gradle.kts index 727667bc6..9daaadd97 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,7 +52,7 @@ allprojects { } group = "exchange.dydx.abacus" -version = "1.11.21" +version = "1.11.22" repositories { google() diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/functional/vault/VaultDepositWithdrawForm.kt b/src/commonMain/kotlin/exchange.dydx.abacus/functional/vault/VaultDepositWithdrawForm.kt index c4bcdb407..1e48b71c9 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/functional/vault/VaultDepositWithdrawForm.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/functional/vault/VaultDepositWithdrawForm.kt @@ -232,13 +232,9 @@ object VaultDepositWithdrawFormValidator { } val withdrawnAmountIncludingSlippage = slippageResponse?.expectedAmount - val postOpVaultBalance = if (vaultAccount?.balanceUsdc != null) { - when (formData.action) { - VaultFormAction.DEPOSIT -> vaultAccount.balanceUsdc + amount - VaultFormAction.WITHDRAW -> vaultAccount.balanceUsdc - amount - } - } else { - null + val postOpVaultBalance = when (formData.action) { + VaultFormAction.DEPOSIT -> (vaultAccount?.balanceUsdc ?: 0.0) + amount + VaultFormAction.WITHDRAW -> (vaultAccount?.balanceUsdc ?: 0.0) - amount } val (postOpFreeCollateral, postOpMarginUsage) = if (accountData?.freeCollateral != null && accountData.marginUsage != null) { diff --git a/v4_abacus.podspec b/v4_abacus.podspec index 141225b20..35d5b375b 100644 --- a/v4_abacus.podspec +++ b/v4_abacus.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'v4_abacus' - spec.version = '1.11.21' + spec.version = '1.11.22' spec.homepage = 'https://github.com/dydxprotocol/v4-abacus' spec.source = { :http=> ''} spec.authors = ''