From dc4026170a7dcf7a643c8681dcc5221f3ba6fdd6 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 7 Nov 2024 17:41:41 -0500 Subject: [PATCH] cap-free-collat --- build.gradle.kts | 2 +- .../calculator/V2/SubaccountCalculatorV2.kt | 2 +- v4_abacus.podspec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5afb9dc23..cd4830bfa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,7 +52,7 @@ allprojects { } group = "exchange.dydx.abacus" -version = "1.13.18" +version = "1.13.19" repositories { google() diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/calculator/V2/SubaccountCalculatorV2.kt b/src/commonMain/kotlin/exchange.dydx.abacus/calculator/V2/SubaccountCalculatorV2.kt index 970230c6b..e81e8068f 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/calculator/V2/SubaccountCalculatorV2.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/calculator/V2/SubaccountCalculatorV2.kt @@ -106,7 +106,7 @@ internal class SubaccountCalculatorV2( calculated.initialRiskTotal = initialRiskTotal val equity = valueTotal + quoteBalance - val freeCollateral = equity - initialRiskTotal + val freeCollateral = max(equity - initialRiskTotal, 0.0) calculated.equity = equity calculated.freeCollateral = freeCollateral diff --git a/v4_abacus.podspec b/v4_abacus.podspec index bac082fdb..39564ff53 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.13.18' + spec.version = '1.13.19' spec.homepage = 'https://github.com/dydxprotocol/v4-abacus' spec.source = { :http=> ''} spec.authors = ''