@ethersphere/bee-js
Version:
Javascript client for Bee
28 lines (27 loc) • 740 B
JavaScript
;
// TODO: Remove this file after the issue is fixed
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeCurrentPrice = exports.normalizeBatchTTL = void 0;
function normalizeBatchTTL(batchTTL) {
if (!Number.isInteger(batchTTL)) {
return 1;
}
if (batchTTL < 1) {
return 1;
}
if (batchTTL > 315569260) {
return 315569260;
}
return batchTTL;
}
exports.normalizeBatchTTL = normalizeBatchTTL;
function normalizeCurrentPrice(currentPrice) {
if (!Number.isInteger(currentPrice)) {
return 24000;
}
if (currentPrice < 24000) {
return 24000;
}
return currentPrice;
}
exports.normalizeCurrentPrice = normalizeCurrentPrice;