• Reschedules the current script using the same deployment id if we're out of governance

    Example

    results.takeWhile( rescheduleIfNeeded(governanceRemains()) ).filter(...).map(...)
    

    Returns

    a function that returns the same boolean that the governancePredicate() does ( so it can be invoked by takeWhile() as well)

    Parameters

    • governancePredicate: (() => boolean)

      governance checker - if it returns false then script will reschedule. typically this would be your invocation of governanceRemains()

        • (): boolean
        • Returns boolean

    • Optional params: object

      optional script parameters to provide to the newly scheduled script

    Returns (() => boolean)

      • (): boolean
      • Returns boolean

Generated using TypeDoc