diff --git a/build.gradle.kts b/build.gradle.kts index feddc7744..f3e3dc7c6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,7 +52,7 @@ allprojects { } group = "exchange.dydx.abacus" -version = "1.13.28" +version = "1.13.29" repositories { google() diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/markets/OrderbookProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/markets/OrderbookProcessor.kt index 2d465d12e..7f0d5f0c2 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/markets/OrderbookProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/markets/OrderbookProcessor.kt @@ -77,7 +77,7 @@ internal class OrderbookProcessor( ): InternalMarketState { this.groupingMultiplier = groupingMultiplier existing.groupedOrderbook = calculator.calculate( - rawOrderbook = existing.rawOrderbook, + rawOrderbook = existing.consolidatedOrderbook, tickSize = tickSize ?: defaultTickSize, groupingMultiplier = groupingMultiplier, ) @@ -105,7 +105,7 @@ internal class OrderbookProcessor( rawOrderbook = existing.rawOrderbook, ) existing.groupedOrderbook = calculator.calculate( - rawOrderbook = existing.rawOrderbook, + rawOrderbook = existing.consolidatedOrderbook, tickSize = tickSize ?: defaultTickSize, groupingMultiplier = groupingMultiplier, ) diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/V4SubaccountsProcessor.kt b/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/V4SubaccountsProcessor.kt index 6a48fa7c1..8f8ebf435 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/V4SubaccountsProcessor.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/processor/wallet/account/V4SubaccountsProcessor.kt @@ -46,7 +46,7 @@ internal class V4SubaccountsProcessor( payload: List?, ): MutableMap { return if (payload != null) { - internalState.clear() + val modifiedSubaccountNumbers = mutableListOf() for (item in payload) { val data = parser.asNativeMap(item) if (data != null) { @@ -62,9 +62,16 @@ internal class V4SubaccountsProcessor( firstTime = true, ) internalState[subaccountNumber] = subaccount + modifiedSubaccountNumbers.add(subaccountNumber) } } } + val keys = internalState.keys.toSet() + for (key in keys) { + if (!modifiedSubaccountNumbers.contains(key)) { + internalState.remove(key) + } + } internalState } else { internalState diff --git a/v4_abacus.podspec b/v4_abacus.podspec index 76cabe338..b65631c23 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.28' + spec.version = '1.13.29' spec.homepage = 'https://github.com/dydxprotocol/v4-abacus' spec.source = { :http=> ''} spec.authors = ''