Skip to content

Commit

Permalink
feat: enable autosweep toggling [OTE-866]
Browse files Browse the repository at this point in the history
  • Loading branch information
yogurtandjam committed Oct 15, 2024
1 parent 6b16c51 commit e548f2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,11 @@ data object StatsigConfig {
var ff_enable_timestamp_nonce: Boolean = false
}

@JsExport
data object AutoSweepConfig {
var disable_autosweep: Boolean = false
}

@JsExport
class AppSettings(
val ios: AppSetting?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import exchange.dydx.abacus.state.app.adaptors.V4TransactionErrors
import exchange.dydx.abacus.state.changes.Changes
import exchange.dydx.abacus.state.changes.StateChanges
import exchange.dydx.abacus.state.manager.ApiData
import exchange.dydx.abacus.state.manager.AutoSweepConfig
import exchange.dydx.abacus.state.manager.BlockAndTime
import exchange.dydx.abacus.state.manager.HistoricalTradingRewardsPeriod
import exchange.dydx.abacus.state.manager.HumanReadableCancelAllOrdersPayload
Expand Down Expand Up @@ -468,6 +469,9 @@ internal open class AccountSupervisor(
nobleBalancesTimer = null
return
}
if (AutoSweepConfig.disable_autosweep) {
return
}
val timer = helper.ioImplementations.timer ?: CoroutineTimer.instance
nobleBalancesTimer =
timer.schedule(0.0, nobleBalancePollingDuration) {
Expand Down

0 comments on commit e548f2c

Please sign in to comment.