@playlive/realtime-pipeline
    Preparing search index...

    Function protectFundraisingEventAmounts

    • Ensures a fundraising event's total_amount_raised never decreases when merging an incoming snapshot over the existing state.

      Parameters

      • incoming: TiltifyFundraisingEvent[]

        Fresh batch from the server.

      • existing: TiltifyFundraisingEvent[]

        Currently-known fundraising events.

      Returns TiltifyFundraisingEvent[]

      Merged array with monotonically non-decreasing totals.