Skip to content

Commit

Permalink
fix-lev
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo committed Nov 14, 2024
1 parent b4025ff commit 6fab06b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ allprojects {
}

group = "exchange.dydx.abacus"
version = "1.13.29"
version = "1.13.30"

repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ internal class TradeInputProcessor(
TradeInputField.marginMode
-> {
inputType.updateValueAction?.invoke(trade, inputData, parser)

// when moving from cross to isolated, update targetLeverage so it isn't sitting at null
if (trade.marginMode === MarginMode.Isolated) {
val market = marketSummaryState.markets[trade.marketId]
val maxMarketLeverage = market?.perpetualMarket?.configs?.maxMarketLeverage
?: Numeric.double.ONE
trade.targetLeverage = maxMarketLeverage
}

val changedSubaccountNumbers =
MarginCalculator.getChangedSubaccountNumbers(
parser = parser,
Expand Down
2 changes: 1 addition & 1 deletion v4_abacus.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'v4_abacus'
spec.version = '1.13.29'
spec.version = '1.13.30'
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
spec.source = { :http=> ''}
spec.authors = ''
Expand Down

0 comments on commit 6fab06b

Please sign in to comment.