Skip to content

Commit

Permalink
pull into constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredvu committed Nov 20, 2024
1 parent a16eede commit b5403a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import exchange.dydx.abacus.utils.IMap
import exchange.dydx.abacus.utils.IMutableList
import exchange.dydx.abacus.utils.Logger
import exchange.dydx.abacus.utils.NUM_PARENT_SUBACCOUNTS
import exchange.dydx.abacus.utils.POST_TRANSFER_PLACE_ORDER_DELAY
import exchange.dydx.abacus.utils.ParsingHelper
import exchange.dydx.abacus.utils.SHORT_TERM_ORDER_FLAGS
import exchange.dydx.abacus.utils.iMapOf
Expand Down Expand Up @@ -666,7 +667,7 @@ internal class SubaccountTransactionSupervisor(
// Return submitTransaction after a delay to ensure the transfer is confirmed
val timer = helper.ioImplementations.timer ?: CoroutineTimer.instance

isolatedMarginOrderTimer = timer.run(0.25) {
isolatedMarginOrderTimer = timer.run(POST_TRANSFER_PLACE_ORDER_DELAY) {
submitTransaction(
transactionType = TransactionType.PlaceOrder,
transactionPayloadString = string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ internal const val MAX_FREE_COLLATERAL_BUFFER_PERCENT = 0.95
internal const val MAX_LEVERAGE_BUFFER_PERCENT = 0.98
internal const val MARGIN_COLLATERALIZATION_CHECK_BUFFER = 0.01;
internal const val DEFAULT_TARGET_LEVERAGE = 2.0;
internal const val POST_TRANSFER_PLACE_ORDER_DELAY = 0.25;

// Order flags
internal const val SHORT_TERM_ORDER_FLAGS = 0
Expand Down

0 comments on commit b5403a8

Please sign in to comment.