Skip to content

Commit

Permalink
fix(billing): skip batchPut if no space diff
Browse files Browse the repository at this point in the history
  • Loading branch information
fforbeck committed Nov 18, 2024
1 parent c6be8c1 commit de27be6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions billing/lib/ucan-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ export const storeSpaceUsageDeltas = async (deltas, ctx) => {
spaceDiffs.push(...res.ok)
}

if (spaceDiffs.length === 0) return {
ok: 'no space diffs to store',
error: undefined
}

return ctx.spaceDiffStore.batchPut(spaceDiffs)
}

Expand Down

0 comments on commit de27be6

Please sign in to comment.