diff --git a/src/commonMain/kotlin/exchange.dydx.abacus/output/Configs.kt b/src/commonMain/kotlin/exchange.dydx.abacus/output/Configs.kt index d3c6dd185..fbdb80b86 100644 --- a/src/commonMain/kotlin/exchange.dydx.abacus/output/Configs.kt +++ b/src/commonMain/kotlin/exchange.dydx.abacus/output/Configs.kt @@ -290,14 +290,14 @@ data class EquityTiers( parser.asMap(item)?.let { val tier = existing?.getOrNull(i) val nextTierData = parser.asMap(nextItem) - EquityTier.create(tier, parser, it, i + 1, nextTierData)?.let { equityTier -> + EquityTier.create(tier, parser, it, nextTierData)?.let { equityTier -> equityTiers.add(equityTier) } } } return equityTiers } - Logger.d { "Equity Tiers values not valid" } + Logger.d { "Equity Tiers not valid" } return null } } @@ -306,7 +306,6 @@ data class EquityTiers( @JsExport @Serializable data class EquityTier( - val tierId: Int, val requiredTotalNetCollateralUSD: Double, val nextLevelRequiredTotalNetCollateralUSD: Double?, val maxOrders: Int, @@ -316,7 +315,6 @@ data class EquityTier( existing: EquityTier?, parser: ParserProtocol, data: Map<*, *>?, - tierId: Int, nextTierData: Map<*, *>? ): EquityTier? { data?.let { @@ -327,13 +325,12 @@ data class EquityTier( val maxOrders = parser.asInt(data["maxOrders"]) if (requiredTotalNetCollateralUSD != null && maxOrders != null) { - return if (existing?.tierId != tierId || + return if ( existing?.requiredTotalNetCollateralUSD != requiredTotalNetCollateralUSD || existing?.nextLevelRequiredTotalNetCollateralUSD != nextLevelRequiredTotalNetCollateralUSD || existing?.maxOrders != maxOrders ) { EquityTier( - tierId, requiredTotalNetCollateralUSD, nextLevelRequiredTotalNetCollateralUSD, maxOrders,