Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
aforaleka committed Apr 22, 2024
1 parent e55d092 commit ffef887
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1448,12 +1448,19 @@ class V4StateManagerAdaptor(
)
}

private fun errorTrackingParams(error: ParsingError): IMap<String, Any?> {
return iMapOf(
"errorType" to error.type.rawValue,
"errorMessage" to error.message,
"errorStringKey" to error.stringKey,
)
private fun errorTrackingParams(error: ParsingError): IMap<String, Any> {
return if (error.stringKey != null) {
iMapOf(
"errorType" to error.type.rawValue,
"errorMessage" to error.message,
"errorStringKey" to error.stringKey,
)
} else {
iMapOf(
"errorType" to error.type.rawValue,
"errorMessage" to error.message,
)
}
}

override fun trackingParams(interval: Double): IMap<String, Any> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,19 @@ internal class SubaccountSupervisor(
)
}

private fun errorTrackingParams(error: ParsingError): IMap<String, Any?> {
return iMapOf(
"errorType" to error.type.rawValue,
"errorMessage" to error.message,
"errorStringKey" to error.stringKey,
)
private fun errorTrackingParams(error: ParsingError): IMap<String, Any> {
return if (error.stringKey != null) {
iMapOf(
"errorType" to error.type.rawValue,
"errorMessage" to error.message,
"errorStringKey" to error.stringKey,
)
} else {
iMapOf(
"errorType" to error.type.rawValue,
"errorMessage" to error.message,
)
}
}

fun closePosition(
Expand Down

0 comments on commit ffef887

Please sign in to comment.