-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(billing): use allocated bytes in store/add receipt (#303)
Uses `allocated` property in the `store/add` receipt to count bytes added to the space. The `allocated` property will be 0 when the user tries to add a shard that is already present in the space. ❓ should we store a diff anyway? even though the size did not change? refs storacha/w3up#1213
- Loading branch information
Alan Shaw
authored
Dec 12, 2023
1 parent
36c0bd9
commit e4db048
Showing
8 changed files
with
271 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Failure } from '@ucanto/server' | ||
|
||
export class RecordNotFound extends Failure { | ||
constructor () { | ||
super() | ||
this.name = /** @type {const} */ ('RecordNotFound') | ||
} | ||
|
||
describe () { | ||
return 'record not found' | ||
} | ||
} | ||
|
||
export class RecordKeyConflict extends Failure { | ||
constructor () { | ||
super() | ||
this.name = /** @type {const} */ ('RecordKeyConflict') | ||
} | ||
|
||
describe () { | ||
return 'record key conflict' | ||
} | ||
} |
Oops, something went wrong.