Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang committed Oct 4, 2024
1 parent 14cc2a5 commit c450a70
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class DydxTransferSubaccountWorker @Inject constructor(

combine(
timerFlow(20.seconds),
abacusStateManager.state.accountBalance(abacusStateManager.usdcTokenDenom)
.filterNotNull(),
abacusStateManager.state.accountBalance(abacusStateManager.usdcTokenDenom),
abacusStateManager.state.currentWallet.mapNotNull { it },
) { _, balance, wallet ->
val balance = balance ?: 0.0
if (balance > balanceRetainAmount) {
val depositAmount = balance.minus(balanceRetainAmount)
if (depositAmount <= 0) return@combine
Expand Down

0 comments on commit c450a70

Please sign in to comment.