diff --git a/ui/component/settingStorage/view.jsx b/ui/component/settingStorage/view.jsx
index b7e920d7e..cdc06f442 100644
--- a/ui/component/settingStorage/view.jsx
+++ b/ui/component/settingStorage/view.jsx
@@ -53,7 +53,7 @@ export default function SettingStorage(props: Props) {
title={__('Enable Data Hosting')}
subtitle={
- {__('Help improve the P2P data network (and make LBRY happy) by hosting data.')}{' '}
+ {__('Help improve the P2P data network (and make LBRY users happy) by hosting data.')}
}
footer={
}
@@ -66,7 +66,7 @@ export default function SettingStorage(props: Props) {
disabled={!saveBlobs}
subtitle={
- {__("View History Hosting lets you choose how much storage to use helping content you've consumed.")}{' '}
+ {__("View History Hosting lets you choose how much storage to use hosting content you've consumed.")}{' '}
}
@@ -79,7 +79,7 @@ export default function SettingStorage(props: Props) {
disabled={!saveBlobs}
subtitle={
- {__('Automatic Hosting downloads a small slice of content currently active on the network.')}{' '}
+ {__('Automatic Hosting downloads a small portion of content active on the network.')}{' '}
}
diff --git a/ui/component/settingViewHosting/view.jsx b/ui/component/settingViewHosting/view.jsx
index 4e15567c2..d89e371da 100644
--- a/ui/component/settingViewHosting/view.jsx
+++ b/ui/component/settingViewHosting/view.jsx
@@ -24,6 +24,10 @@ type Props = {
diskSpace: DiskSpace,
};
+const TWENTY_PERCENT = 0.2;
+const TEN_PERCENT = 0.1;
+const MINIMUM_VIEW_SETTING = '0.01';
+
function SettingViewHosting(props: Props) {
const {
diskSpace,
@@ -41,8 +45,8 @@ function SettingViewHosting(props: Props) {
const freeMB = diskSpace && Math.floor(Number(diskSpace.free) / 1024);
const getGB = (val) => (Number(val) / 1024).toFixed(2);
const recommendedSpace =
- freeMB > totalMB * 0.2 // plenty of space?
- ? Math.ceil(Number(getGB(totalMB * 0.1))) // 10% of total
+ freeMB > totalMB * TWENTY_PERCENT // plenty of space?
+ ? Math.ceil(Number(getGB(totalMB * TEN_PERCENT))) // 10% of total
: Math.ceil(Number(getGB(viewBlobSpace))); // current amount to avoid deleting
// daemon settings come in as 'number', but we manage them as 'String'.
const [contentBlobSpaceLimitGB, setContentBlobSpaceLimit] = React.useState(
@@ -55,7 +59,7 @@ function SettingViewHosting(props: Props) {
if (gb === '') {
setContentBlobSpaceLimit('');
} else if (gb === '0') {
- setContentBlobSpaceLimit('0.01'); // setting 0 means unlimited.
+ setContentBlobSpaceLimit(MINIMUM_VIEW_SETTING); // setting 0 means unlimited.
} else {
if (isTrulyANumber(Number(gb))) {
setContentBlobSpaceLimit(gb);
@@ -69,7 +73,7 @@ function SettingViewHosting(props: Props) {
} else {
await setDaemonSetting(
DAEMON_SETTINGS.BLOB_STORAGE_LIMIT_MB,
- String(contentBlobSpaceLimitGB === '0.01' ? '1' : convertGbToMbStr(contentBlobSpaceLimitGB))
+ contentBlobSpaceLimitGB === MINIMUM_VIEW_SETTING ? '1' : convertGbToMbStr(contentBlobSpaceLimitGB)
);
}
await cleanBlobs();
@@ -152,7 +156,7 @@ function SettingViewHosting(props: Props) {
onWheel={(e) => e.preventDefault()}
label={__(`View Hosting Limit (GB)`)}
onChange={(e) => handleContentLimitChange(e.target.value)}
- value={Number(contentBlobSpaceLimitGB) <= Number('0.01') ? '0' : contentBlobSpaceLimitGB}
+ value={Number(contentBlobSpaceLimitGB) <= Number(MINIMUM_VIEW_SETTING) ? '0' : contentBlobSpaceLimitGB}
/>
>