lbry-desktop/ui/util/hosting.js

9 lines
274 B
JavaScript
Raw Normal View History

2022-06-01 21:27:47 +02:00
export function convertGbToMbStr(gb) {
return String(Number(gb) * 1024);
}
export function isValidHostingAmount(amountString) {
const numberAmount = Number(amountString);
return amountString.length && ((numberAmount && String(numberAmount)) || numberAmount === 0);
}