Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: trigger order resetting #744

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.21"
version = "1.13.22"

repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package exchange.dydx.abacus.processor.input

import exchange.dydx.abacus.calculator.v2.TriggerOrdersInputCalculatorV2
import exchange.dydx.abacus.output.input.InputType
import exchange.dydx.abacus.output.input.OrderType
import exchange.dydx.abacus.output.input.TriggerPrice
Expand All @@ -10,7 +9,6 @@ import exchange.dydx.abacus.state.changes.StateChanges
import exchange.dydx.abacus.state.internalstate.InternalAccountState
import exchange.dydx.abacus.state.internalstate.InternalInputState
import exchange.dydx.abacus.state.internalstate.InternalTriggerOrderState
import exchange.dydx.abacus.state.internalstate.InternalTriggerOrdersInputState
import exchange.dydx.abacus.state.internalstate.safeCreate
import exchange.dydx.abacus.state.model.TriggerOrdersInputField
import kollections.iListOf
Expand All @@ -27,7 +25,6 @@ internal interface TriggerOrdersInputProcessorProtocol {

internal class TriggerOrdersInputProcessor(
private val parser: ParserProtocol,
private val calculator: TriggerOrdersInputCalculatorV2 = TriggerOrdersInputCalculatorV2()
) : TriggerOrdersInputProcessorProtocol {

override fun triggerOrderInput(
Expand All @@ -39,8 +36,6 @@ internal class TriggerOrdersInputProcessor(
): StateChanges {
if (inputState.currentType != InputType.TRIGGER_ORDERS) {
inputState.currentType = InputType.TRIGGER_ORDERS
inputState.triggerOrders = InternalTriggerOrdersInputState()
calculator.calculate(inputState.triggerOrders, account, subaccountNumber)
}

if (type != null) {
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.21'
spec.version = '1.13.22'
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
spec.source = { :http=> ''}
spec.authors = ''
Expand Down