filecoin-pin
Version:
Bridge IPFS content to Filecoin Onchain Cloud using familiar tools
12 lines • 418 B
JavaScript
/**
* Validation utility for core financial calculations.
* Keeps pricing inputs non-zero and positive.
*
* @param pricePerTiBPerEpoch - Current pricing from storage service
*/
export function assertPriceNonZero(pricePerTiBPerEpoch) {
if (pricePerTiBPerEpoch <= 0n) {
throw new Error('Invalid pricePerTiBPerEpoch: must be positive non-zero value');
}
}
//# sourceMappingURL=validate-pricing.js.map