Skip to content

Commit 94560b3

Browse files
committed
revert: Remove restartRecurring flag, use Schedule capability for recovery instead
Keep only the fee buffer fix (5% margin) in scheduleNextRebalance(). The recovery mechanism now uses Schedule capability to directly call scheduleNextRebalance() rather than passing a flag through executeTransaction().
1 parent ce4b1f7 commit 94560b3

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

cadence/contracts/interfaces/DeFiActions.cdc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,21 +1017,15 @@ access(all) contract DeFiActions {
10171017
// execute as declared, otherwise execute as currently configured, otherwise default to false
10181018
let dataDict = data as? {String: AnyStruct} ?? {}
10191019
let force = dataDict["force"] as? Bool ?? self._recurringConfig?.forceRebalance as? Bool ?? false
1020-
// restartRecurring: when true, signals that this externally-scheduled transaction
1021-
// should restart the AutoBalancer's self-scheduling cycle (e.g., Supervisor recovery)
1022-
let restartRecurring = dataDict["restartRecurring"] as? Bool ?? false
10231020

10241021
self.rebalance(force: force)
10251022

1026-
// If configured as recurring, schedule the next execution if:
1027-
// 1. This transaction is internally managed (normal self-scheduling cycle), OR
1028-
// 2. The caller explicitly requested to restart recurring (recovery scenario)
1029-
//
1030-
// By default, externally-scheduled transactions are treated as "fire once" to support
1023+
// If configured as recurring, schedule the next execution only if this is an internally-managed
1024+
// scheduled transaction. Externally-scheduled transactions are treated as "fire once" to support
10311025
// external scheduling logic that manages its own recurring behavior.
10321026
if self._recurringConfig != nil {
10331027
let isInternallyManaged = self.borrowScheduledTransaction(id: id) != nil
1034-
if isInternallyManaged || restartRecurring {
1028+
if isInternallyManaged {
10351029
let err = self.scheduleNextRebalance(whileExecuting: id)
10361030
if err != nil {
10371031
emit FailedRecurringSchedule(

0 commit comments

Comments
 (0)