Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: toggle autosweep [OTE-866] #708

Merged
merged 2 commits into from
Oct 16, 2024
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 @@ -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