Skip to content
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 @@ -53,7 +53,7 @@ allprojects {
}

group = "exchange.dydx.abacus"
version = "1.14.11"
version = "1.14.12"

repositories {
google()
Expand Down
160 changes: 90 additions & 70 deletions integration/iOS/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -79,51 +79,51 @@ internal class TradeInputOptionsCalculator(
return when (trade.type) {
OrderType.Market -> {
return when (trade.marginMode) {
MarginMode.Isolated -> listOf(
MarginMode.Isolated -> listOfNotNull(
sizeField(),
balancePercentField(),
bracketsField(),
marginModeField(market, account, subaccount),
reduceOnlyField(),
).filterNotNull()
)

else -> listOf(
else -> listOfNotNull(
sizeField(),
leverageField(),
balancePercentField(),
bracketsField(),
marginModeField(market, account, subaccount),
reduceOnlyField(),
).filterNotNull()
)
}
}

OrderType.Limit -> {
when (trade.timeInForce) {
"GTT" ->
listOf(
listOfNotNull(
sizeField(),
limitPriceField(),
timeInForceField(),
goodTilField(),
postOnlyField(),
marginModeField(market, account, subaccount),
).filterNotNull()
)

else ->
listOf(
listOfNotNull(
sizeField(),
limitPriceField(),
timeInForceField(),
marginModeField(market, account, subaccount),
reduceOnlyField(),
).filterNotNull()
)
}
}

OrderType.StopLimit, OrderType.TakeProfitLimit -> {
val execution = trade.execution
listOf(
listOfNotNull(
sizeField(),
limitPriceField(),
triggerPriceField(),
Expand All @@ -134,28 +134,28 @@ internal class TradeInputOptionsCalculator(
"IOC" -> reduceOnlyField()
else -> null
},
).filterNotNull()
)
}

OrderType.StopMarket, OrderType.TakeProfitMarket -> {
listOf(
listOfNotNull(
sizeField(),
triggerPriceField(),
goodTilField(),
executionField(includesDefaultAndPostOnly = false),
marginModeField(market, account, subaccount),
reduceOnlyField(),
).filterNotNull()
)
}

OrderType.TrailingStop -> {
listOf(
listOfNotNull(
sizeField(),
trailingPercentField(),
goodTilField(),
executionField(includesDefaultAndPostOnly = false),
marginModeField(market, account, subaccount),
).filterNotNull()
)
}

OrderType.Liquidated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,44 @@ class ClientTrackableEventType {
"tokenInChainId" to status.routeStatuses?.lastOrNull()?.chainId,
).filterValues { it != null } as Map<String, Any>
}

class FiatDepositShowInputEvent() : ClientTrackableEvent {
override val name: String get() = "FiatDepositShowInput"
override val customParameters: Map<String, Any> get() = emptyMap()
}

class FiatDepositRouteToProviderCompletedEvent(
private val amountUsd: Double?,
private val depositAddress: String?,
private val provider: String,
) : ClientTrackableEvent {
override val name: String get() = "FiatDepositRouteToProviderCompleted"
override val customParameters: Map<String, Any> get() = mapOf(
"amountUsd" to amountUsd,
"depositAddress" to depositAddress,
"provider" to provider,
).filterValues { it != null } as Map<String, Any>
}

class FiatDepositRouteToProviderErrorEvent(
private val message: String?,
private val provider: String,
) : ClientTrackableEvent {
override val name: String get() = "FiatDepositRouteToProviderError"
override val customParameters: Map<String, Any> get() = mapOf(
"message" to message,
"provider" to provider,
).filterValues { it != null } as Map<String, Any>
}

class FiatDepositMoonPayCallbackEvent(
private val callbackName: String,
private val data: Map<String, Any>? = null,
) : ClientTrackableEvent {
override val name: String get() = "FiatDepositMoonPayCallback"
override val customParameters: Map<String, Any> get() = mapOf(
"callbackName" to callbackName,
"data" to data,
).filterValues { it != null } as Map<String, Any>
}
}
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.14.11'
spec.version = '1.14.12'
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
spec.source = { :http=> ''}
spec.authors = ''
Expand Down