Skip to content

Commit

Permalink
feat: toggle autosweep [OTE-866] (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
yogurtandjam authored Oct 16, 2024
1 parent bb5b492 commit e52720c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
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.12.29"
version = "1.12.30"

repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,12 @@ data object StatsigConfig {
var ff_enable_timestamp_nonce: Boolean = false
}

@JsExport
@Suppress("PropertyName")
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
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.12.29'
spec.version = '1.12.30'
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
spec.source = { :http=> ''}
spec.authors = ''
Expand Down

0 comments on commit e52720c

Please sign in to comment.