@ethersphere/bee-dashboard 0.36.0 → 0.36.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.html CHANGED
@@ -9,7 +9,7 @@
9
9
  <link rel="apple-touch-icon" href="/logo192.png" />
10
10
  <link rel="manifest" href="/manifest.json" />
11
11
  <title>Bee Dashboard</title>
12
- <script type="module" crossorigin src="/assets/index-Dd3cxIPS.js"></script>
12
+ <script type="module" crossorigin src="/assets/index-QjfIOSmO.js"></script>
13
13
  <link rel="modulepreload" crossorigin href="/assets/vendor-react-mui-tUcmOwCz.js">
14
14
  <link rel="modulepreload" crossorigin href="/assets/vendor-ethers-DdwEM-gK.js">
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-DMp5phAM.css">
@@ -52453,6 +52453,7 @@ const BEE_DESKTOP_LATEST_RELEASE_PAGE = "https://github.com/ethersphere/bee-desk
52453
52453
  const BEE_DESKTOP_LATEST_RELEASE_PAGE_API = "https://api.github.com/repos/ethersphere/bee-desktop/releases/latest";
52454
52454
  const DEFAULT_BEE_API_HOST = "http://localhost:1633";
52455
52455
  const DEFAULT_RPC_URL = "https://xdai.fairdatasociety.org";
52456
+ const DEFAULT_GIFT_WALLET_FEES = { dai: "0.1", bzz: "5" };
52456
52457
  const MIN_STAMP_DEPTH = 17;
52457
52458
  const MAX_STAMP_DEPTH = 255;
52458
52459
  function bind(fn2, thisArg) {
@@ -55826,6 +55827,15 @@ async function setEnsResolverInDesktop(desktopUrl, value) {
55826
55827
  "resolver-options": value
55827
55828
  });
55828
55829
  }
55830
+ const ENS_RESOLVER_URL = /^(?:[a-z0-9-]+:)?(?:0x[0-9a-fA-F]{40}@)?(https?:\/\/.+)$/i;
55831
+ function extractEnsResolverUrl(value) {
55832
+ const urlPart = ENS_RESOLVER_URL.exec(value.trim())?.[1];
55833
+ try {
55834
+ return urlPart && new URL(urlPart).hostname ? urlPart : null;
55835
+ } catch {
55836
+ return null;
55837
+ }
55838
+ }
55829
55839
  function getDesktopConfiguration(desktopUrl) {
55830
55840
  return getJson(`${desktopUrl}/config`);
55831
55841
  }
@@ -75581,7 +75591,7 @@ function Provider$8({ children, ...propsSettings }) {
75581
75591
  desktopApiKey,
75582
75592
  isDesktop,
75583
75593
  desktopUrl,
75584
- giftWalletFees: propsSettings.giftWalletFees,
75594
+ giftWalletFees: propsSettings.giftWalletFees ?? DEFAULT_GIFT_WALLET_FEES,
75585
75595
  rpcProvider,
75586
75596
  rpcProviderUrl,
75587
75597
  cors: config2?.["cors-allowed-origins"] ?? null,
@@ -88881,10 +88891,10 @@ P?.name || "";
88881
88891
  const bytesEndpoint = "bytes";
88882
88892
  async function processDownload(bee, resources, options, requestOptions) {
88883
88893
  if (O$1) {
88884
- const { downloadNode } = await Promise.resolve().then(() => require("./download.node-Bzm4Mzw4.js"));
88894
+ const { downloadNode } = await Promise.resolve().then(() => require("./download.node-DNc4t8KE.js"));
88885
88895
  return await downloadNode(bee, Object.values(resources), options, requestOptions);
88886
88896
  }
88887
- const { downloadBrowser } = await Promise.resolve().then(() => require("./download.browser-BtsZfHY2.js"));
88897
+ const { downloadBrowser } = await Promise.resolve().then(() => require("./download.browser-DVvlVttp.js"));
88888
88898
  return await downloadBrowser(Object.values(resources), bee.url, bytesEndpoint, options, requestOptions);
88889
88899
  }
88890
88900
  class EventEmitterBase {
@@ -88941,7 +88951,7 @@ async function processUpload(bee, driveInfo, fileOptions, uploadOptions, request
88941
88951
  return processedOptions.file;
88942
88952
  }
88943
88953
  if (O$1) {
88944
- const { processUploadNode } = await Promise.resolve().then(() => require("./upload.node-Lj4JAWof.js"));
88954
+ const { processUploadNode } = await Promise.resolve().then(() => require("./upload.node-FJ4naJB8.js"));
88945
88955
  const nodeOptions = processedOptions.options;
88946
88956
  return processUploadNode(bee, driveInfo, nodeOptions, uploadOptions, requestOptions);
88947
88957
  }
@@ -102551,67 +102561,74 @@ function AssetSummary({ reference: reference2 }) {
102551
102561
  /* @__PURE__ */ jsxRuntimeExports.jsx(DocumentationText, { children: "Files are accessed through your configured Bee API endpoint." })
102552
102562
  ] });
102553
102563
  }
102554
- function LinearProgressWithLabel(props) {
102564
+ function LinearProgressWithLabel({ indeterminate, value, linearProgressProps, label }) {
102565
+ const displayLabel = label ?? (indeterminate ? "Syncing..." : `${Math.round(value)}%`);
102555
102566
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", children: [
102556
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { width: "100%", mr: 1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgress, { variant: "determinate", ...props }) }),
102557
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { minWidth: 35, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "textSecondary", children: `${Math.round(props.value)}%` }) })
102567
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { width: "100%", mr: 1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
102568
+ LinearProgress,
102569
+ {
102570
+ ...linearProgressProps,
102571
+ variant: indeterminate ? "indeterminate" : "determinate",
102572
+ value
102573
+ }
102574
+ ) }),
102575
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { minWidth: 35, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "textSecondary", children: displayLabel }) })
102558
102576
  ] });
102559
102577
  }
102560
- const SYNC_CHECK_INTERVAL_MS = 2e3;
102578
+ const PROBE_RETRY_DELAY_MS = 500;
102579
+ const PROBE_TIMEOUT_MS = 10 * 1e3;
102561
102580
  function AssetSyncing({ reference: reference2 }) {
102562
102581
  const { beeApi } = React.useContext(Context$8);
102563
- const syncTimer = React.useRef(null);
102564
- const [isRetrieveChecking, setIsRetrieveChecking] = React.useState(false);
102565
102582
  const [syncProgress, setSyncProgress] = React.useState(0);
102566
- const syncCheck = React.useCallback(async () => {
102567
- if (!beeApi || !reference2) return;
102568
- let allTags = [];
102569
- let offset2 = 0;
102570
- const limit = 1e3;
102571
- let tagsBatch;
102572
- do {
102573
- tagsBatch = await beeApi.getAllTags({ limit, offset: offset2 });
102574
- allTags = allTags.concat(tagsBatch);
102575
- offset2 += limit;
102576
- } while (tagsBatch.length === limit);
102577
- const tag = allTags.find((t2) => t2.address === reference2);
102578
- if (tag && tag.split > 0) {
102579
- const progress = (tag.seen + tag.synced) / tag.split * 100;
102580
- setSyncProgress(progress);
102581
- }
102582
- }, [beeApi, reference2]);
102583
+ const [probeFailed, setProbeFailed] = React.useState(false);
102583
102584
  React.useEffect(() => {
102584
- syncTimer.current = setInterval(syncCheck, SYNC_CHECK_INTERVAL_MS);
102585
+ setSyncProgress(0);
102586
+ setProbeFailed(false);
102587
+ if (!beeApi || !reference2) return;
102588
+ let isMounted = true;
102589
+ let retryTimer = null;
102590
+ let currentAbortController = null;
102591
+ const check = async (isRetry) => {
102592
+ const abortController = new AbortController();
102593
+ currentAbortController = abortController;
102594
+ const abortTimer = setTimeout(() => abortController.abort(), PROBE_TIMEOUT_MS);
102595
+ try {
102596
+ await beeApi.probeData(reference2, { signal: abortController.signal });
102597
+ if (isMounted) setSyncProgress(100);
102598
+ } catch {
102599
+ if (!isMounted) return;
102600
+ if (!isRetry) {
102601
+ retryTimer = setTimeout(() => check(true), PROBE_RETRY_DELAY_MS);
102602
+ } else {
102603
+ setProbeFailed(true);
102604
+ }
102605
+ } finally {
102606
+ clearTimeout(abortTimer);
102607
+ }
102608
+ };
102609
+ check(false);
102585
102610
  return () => {
102586
- if (syncTimer.current) {
102587
- clearInterval(syncTimer.current);
102588
- syncTimer.current = null;
102611
+ isMounted = false;
102612
+ currentAbortController?.abort();
102613
+ if (retryTimer) {
102614
+ clearTimeout(retryTimer);
102589
102615
  }
102590
102616
  };
102591
- }, [reference2, syncCheck]);
102592
- React.useEffect(() => {
102593
- if (syncProgress === 100 && syncTimer.current) {
102594
- clearInterval(syncTimer.current);
102595
- syncTimer.current = null;
102596
- }
102597
- }, [syncProgress]);
102598
- React.useEffect(() => {
102599
- if (beeApi && reference2 && !isRetrieveChecking && syncProgress > 10 && syncProgress < 100) {
102600
- setIsRetrieveChecking(true);
102601
- beeApi.isReferenceRetrievable(reference2).then((isRetriavable) => {
102602
- if (isRetriavable) {
102603
- setSyncProgress(100);
102604
- }
102605
- setIsRetrieveChecking(false);
102606
- });
102607
- }
102608
- }, [syncProgress, isRetrieveChecking, beeApi, reference2]);
102617
+ }, [beeApi, reference2]);
102609
102618
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
102610
102619
  /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mb: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DocumentationText, { children: [
102611
102620
  "Files are not immediately accessible on the Swarm network. Please wait until your upload is synced to the network.",
102612
102621
  " "
102613
102622
  ] }) }),
102614
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mb: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgressWithLabel, { value: syncProgress }) })
102623
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mb: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
102624
+ LinearProgressWithLabel,
102625
+ {
102626
+ value: syncProgress,
102627
+ indeterminate: syncProgress < 100 && !probeFailed,
102628
+ label: probeFailed ? "Unknown" : void 0
102629
+ }
102630
+ ) }),
102631
+ probeFailed && /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mb: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DocumentationText, { children: "Upload succeeded, but we couldn't confirm it locally. Try refreshing this page — your file has very likely still been uploaded successfully." }) })
102615
102632
  ] });
102616
102633
  }
102617
102634
  function DownloadActionBar({
@@ -103758,7 +103775,7 @@ function Provider({ children }) {
103758
103775
  function Index$1() {
103759
103776
  const { giftWallets, addGiftWallet } = React.useContext(Context$1);
103760
103777
  const { rpcProvider, desktopUrl, giftWalletFees } = React.useContext(Context$8);
103761
- const { balance } = React.useContext(Context);
103778
+ const { balance, refresh: refreshBalance } = React.useContext(Context);
103762
103779
  const [loading, setLoading] = React.useState(false);
103763
103780
  const [balances, setBalances] = React.useState([]);
103764
103781
  const { enqueueSnackbar } = useSnackbar();
@@ -103796,6 +103813,7 @@ function Index$1() {
103796
103813
  console.error(error);
103797
103814
  enqueueSnackbar(`Failed to fund gift wallet: ${extractBeeApiErrorMessage(error)}`, { variant: "error" });
103798
103815
  } finally {
103816
+ await refreshBalance();
103799
103817
  setLoading(false);
103800
103818
  }
103801
103819
  }
@@ -103839,7 +103857,7 @@ function Index$1() {
103839
103857
  ] })
103840
103858
  ] });
103841
103859
  }
103842
- const version = "0.36.0";
103860
+ const version = "0.36.2";
103843
103861
  var withoutCountries$1 = { exports: {} };
103844
103862
  function globals(defs2) {
103845
103863
  defs2("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
@@ -118618,10 +118636,24 @@ function SettingsPage() {
118618
118636
  }
118619
118637
  }
118620
118638
  async function handleSetEnsResolverUrl(value) {
118639
+ const resolverUrl = extractEnsResolverUrl(value);
118640
+ if (!resolverUrl) {
118641
+ enqueueSnackbar("Failed to change ENS resolver. Invalid URL format.", { variant: "error" });
118642
+ return;
118643
+ }
118644
+ try {
118645
+ await newGnosisProviderForValidation(resolverUrl).getNetwork();
118646
+ } catch (e2) {
118647
+ console.error(e2);
118648
+ enqueueSnackbar(`Failed to connect to ENS resolver endpoint. ${extractBeeApiErrorMessage(e2)}`, {
118649
+ variant: "error"
118650
+ });
118651
+ return;
118652
+ }
118621
118653
  try {
118622
118654
  await setEnsResolverInDesktop(desktopUrl, value);
118623
118655
  setEnsResolver(value);
118624
- const snackKey = enqueueSnackbar("ENS resolver successfully changed, restarting Bee node...", {
118656
+ const snackKey = enqueueSnackbar("ENS resolver saved, restarting Bee node...", {
118625
118657
  variant: "success"
118626
118658
  });
118627
118659
  await restartBeeNode(desktopUrl);
@@ -52436,6 +52436,7 @@ const BEE_DESKTOP_LATEST_RELEASE_PAGE = "https://github.com/ethersphere/bee-desk
52436
52436
  const BEE_DESKTOP_LATEST_RELEASE_PAGE_API = "https://api.github.com/repos/ethersphere/bee-desktop/releases/latest";
52437
52437
  const DEFAULT_BEE_API_HOST = "http://localhost:1633";
52438
52438
  const DEFAULT_RPC_URL = "https://xdai.fairdatasociety.org";
52439
+ const DEFAULT_GIFT_WALLET_FEES = { dai: "0.1", bzz: "5" };
52439
52440
  const MIN_STAMP_DEPTH = 17;
52440
52441
  const MAX_STAMP_DEPTH = 255;
52441
52442
  function bind(fn2, thisArg) {
@@ -55809,6 +55810,15 @@ async function setEnsResolverInDesktop(desktopUrl, value) {
55809
55810
  "resolver-options": value
55810
55811
  });
55811
55812
  }
55813
+ const ENS_RESOLVER_URL = /^(?:[a-z0-9-]+:)?(?:0x[0-9a-fA-F]{40}@)?(https?:\/\/.+)$/i;
55814
+ function extractEnsResolverUrl(value) {
55815
+ const urlPart = ENS_RESOLVER_URL.exec(value.trim())?.[1];
55816
+ try {
55817
+ return urlPart && new URL(urlPart).hostname ? urlPart : null;
55818
+ } catch {
55819
+ return null;
55820
+ }
55821
+ }
55812
55822
  function getDesktopConfiguration(desktopUrl) {
55813
55823
  return getJson(`${desktopUrl}/config`);
55814
55824
  }
@@ -75564,7 +75574,7 @@ function Provider$8({ children, ...propsSettings }) {
75564
75574
  desktopApiKey,
75565
75575
  isDesktop,
75566
75576
  desktopUrl,
75567
- giftWalletFees: propsSettings.giftWalletFees,
75577
+ giftWalletFees: propsSettings.giftWalletFees ?? DEFAULT_GIFT_WALLET_FEES,
75568
75578
  rpcProvider,
75569
75579
  rpcProviderUrl,
75570
75580
  cors: config2?.["cors-allowed-origins"] ?? null,
@@ -88864,10 +88874,10 @@ P?.name || "";
88864
88874
  const bytesEndpoint = "bytes";
88865
88875
  async function processDownload(bee, resources, options, requestOptions) {
88866
88876
  if (O$1) {
88867
- const { downloadNode } = await import("./download.node-Cot8qXzn.mjs");
88877
+ const { downloadNode } = await import("./download.node-BvTcf4pA.mjs");
88868
88878
  return await downloadNode(bee, Object.values(resources), options, requestOptions);
88869
88879
  }
88870
- const { downloadBrowser } = await import("./download.browser-xicfmV_K.mjs");
88880
+ const { downloadBrowser } = await import("./download.browser-1J0WA0ZY.mjs");
88871
88881
  return await downloadBrowser(Object.values(resources), bee.url, bytesEndpoint, options, requestOptions);
88872
88882
  }
88873
88883
  class EventEmitterBase {
@@ -88924,7 +88934,7 @@ async function processUpload(bee, driveInfo, fileOptions, uploadOptions, request
88924
88934
  return processedOptions.file;
88925
88935
  }
88926
88936
  if (O$1) {
88927
- const { processUploadNode } = await import("./upload.node-Do4ZBa7z.mjs");
88937
+ const { processUploadNode } = await import("./upload.node-BHNhyWDJ.mjs");
88928
88938
  const nodeOptions = processedOptions.options;
88929
88939
  return processUploadNode(bee, driveInfo, nodeOptions, uploadOptions, requestOptions);
88930
88940
  }
@@ -102534,67 +102544,74 @@ function AssetSummary({ reference: reference2 }) {
102534
102544
  /* @__PURE__ */ jsxRuntimeExports.jsx(DocumentationText, { children: "Files are accessed through your configured Bee API endpoint." })
102535
102545
  ] });
102536
102546
  }
102537
- function LinearProgressWithLabel(props) {
102547
+ function LinearProgressWithLabel({ indeterminate, value, linearProgressProps, label }) {
102548
+ const displayLabel = label ?? (indeterminate ? "Syncing..." : `${Math.round(value)}%`);
102538
102549
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", children: [
102539
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { width: "100%", mr: 1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgress, { variant: "determinate", ...props }) }),
102540
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { minWidth: 35, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "textSecondary", children: `${Math.round(props.value)}%` }) })
102550
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { width: "100%", mr: 1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
102551
+ LinearProgress,
102552
+ {
102553
+ ...linearProgressProps,
102554
+ variant: indeterminate ? "indeterminate" : "determinate",
102555
+ value
102556
+ }
102557
+ ) }),
102558
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { minWidth: 35, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "textSecondary", children: displayLabel }) })
102541
102559
  ] });
102542
102560
  }
102543
- const SYNC_CHECK_INTERVAL_MS = 2e3;
102561
+ const PROBE_RETRY_DELAY_MS = 500;
102562
+ const PROBE_TIMEOUT_MS = 10 * 1e3;
102544
102563
  function AssetSyncing({ reference: reference2 }) {
102545
102564
  const { beeApi } = useContext(Context$8);
102546
- const syncTimer = useRef(null);
102547
- const [isRetrieveChecking, setIsRetrieveChecking] = useState(false);
102548
102565
  const [syncProgress, setSyncProgress] = useState(0);
102549
- const syncCheck = useCallback(async () => {
102550
- if (!beeApi || !reference2) return;
102551
- let allTags = [];
102552
- let offset2 = 0;
102553
- const limit = 1e3;
102554
- let tagsBatch;
102555
- do {
102556
- tagsBatch = await beeApi.getAllTags({ limit, offset: offset2 });
102557
- allTags = allTags.concat(tagsBatch);
102558
- offset2 += limit;
102559
- } while (tagsBatch.length === limit);
102560
- const tag = allTags.find((t2) => t2.address === reference2);
102561
- if (tag && tag.split > 0) {
102562
- const progress = (tag.seen + tag.synced) / tag.split * 100;
102563
- setSyncProgress(progress);
102564
- }
102565
- }, [beeApi, reference2]);
102566
+ const [probeFailed, setProbeFailed] = useState(false);
102566
102567
  useEffect(() => {
102567
- syncTimer.current = setInterval(syncCheck, SYNC_CHECK_INTERVAL_MS);
102568
+ setSyncProgress(0);
102569
+ setProbeFailed(false);
102570
+ if (!beeApi || !reference2) return;
102571
+ let isMounted = true;
102572
+ let retryTimer = null;
102573
+ let currentAbortController = null;
102574
+ const check = async (isRetry) => {
102575
+ const abortController = new AbortController();
102576
+ currentAbortController = abortController;
102577
+ const abortTimer = setTimeout(() => abortController.abort(), PROBE_TIMEOUT_MS);
102578
+ try {
102579
+ await beeApi.probeData(reference2, { signal: abortController.signal });
102580
+ if (isMounted) setSyncProgress(100);
102581
+ } catch {
102582
+ if (!isMounted) return;
102583
+ if (!isRetry) {
102584
+ retryTimer = setTimeout(() => check(true), PROBE_RETRY_DELAY_MS);
102585
+ } else {
102586
+ setProbeFailed(true);
102587
+ }
102588
+ } finally {
102589
+ clearTimeout(abortTimer);
102590
+ }
102591
+ };
102592
+ check(false);
102568
102593
  return () => {
102569
- if (syncTimer.current) {
102570
- clearInterval(syncTimer.current);
102571
- syncTimer.current = null;
102594
+ isMounted = false;
102595
+ currentAbortController?.abort();
102596
+ if (retryTimer) {
102597
+ clearTimeout(retryTimer);
102572
102598
  }
102573
102599
  };
102574
- }, [reference2, syncCheck]);
102575
- useEffect(() => {
102576
- if (syncProgress === 100 && syncTimer.current) {
102577
- clearInterval(syncTimer.current);
102578
- syncTimer.current = null;
102579
- }
102580
- }, [syncProgress]);
102581
- useEffect(() => {
102582
- if (beeApi && reference2 && !isRetrieveChecking && syncProgress > 10 && syncProgress < 100) {
102583
- setIsRetrieveChecking(true);
102584
- beeApi.isReferenceRetrievable(reference2).then((isRetriavable) => {
102585
- if (isRetriavable) {
102586
- setSyncProgress(100);
102587
- }
102588
- setIsRetrieveChecking(false);
102589
- });
102590
- }
102591
- }, [syncProgress, isRetrieveChecking, beeApi, reference2]);
102600
+ }, [beeApi, reference2]);
102592
102601
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
102593
102602
  /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mb: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DocumentationText, { children: [
102594
102603
  "Files are not immediately accessible on the Swarm network. Please wait until your upload is synced to the network.",
102595
102604
  " "
102596
102605
  ] }) }),
102597
- /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mb: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgressWithLabel, { value: syncProgress }) })
102606
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mb: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
102607
+ LinearProgressWithLabel,
102608
+ {
102609
+ value: syncProgress,
102610
+ indeterminate: syncProgress < 100 && !probeFailed,
102611
+ label: probeFailed ? "Unknown" : void 0
102612
+ }
102613
+ ) }),
102614
+ probeFailed && /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mb: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DocumentationText, { children: "Upload succeeded, but we couldn't confirm it locally. Try refreshing this page — your file has very likely still been uploaded successfully." }) })
102598
102615
  ] });
102599
102616
  }
102600
102617
  function DownloadActionBar({
@@ -103741,7 +103758,7 @@ function Provider({ children }) {
103741
103758
  function Index$1() {
103742
103759
  const { giftWallets, addGiftWallet } = useContext(Context$1);
103743
103760
  const { rpcProvider, desktopUrl, giftWalletFees } = useContext(Context$8);
103744
- const { balance } = useContext(Context);
103761
+ const { balance, refresh: refreshBalance } = useContext(Context);
103745
103762
  const [loading, setLoading] = useState(false);
103746
103763
  const [balances, setBalances] = useState([]);
103747
103764
  const { enqueueSnackbar } = useSnackbar();
@@ -103779,6 +103796,7 @@ function Index$1() {
103779
103796
  console.error(error);
103780
103797
  enqueueSnackbar(`Failed to fund gift wallet: ${extractBeeApiErrorMessage(error)}`, { variant: "error" });
103781
103798
  } finally {
103799
+ await refreshBalance();
103782
103800
  setLoading(false);
103783
103801
  }
103784
103802
  }
@@ -103822,7 +103840,7 @@ function Index$1() {
103822
103840
  ] })
103823
103841
  ] });
103824
103842
  }
103825
- const version = "0.36.0";
103843
+ const version = "0.36.2";
103826
103844
  var withoutCountries$1 = { exports: {} };
103827
103845
  function globals(defs2) {
103828
103846
  defs2("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
@@ -118601,10 +118619,24 @@ function SettingsPage() {
118601
118619
  }
118602
118620
  }
118603
118621
  async function handleSetEnsResolverUrl(value) {
118622
+ const resolverUrl = extractEnsResolverUrl(value);
118623
+ if (!resolverUrl) {
118624
+ enqueueSnackbar("Failed to change ENS resolver. Invalid URL format.", { variant: "error" });
118625
+ return;
118626
+ }
118627
+ try {
118628
+ await newGnosisProviderForValidation(resolverUrl).getNetwork();
118629
+ } catch (e2) {
118630
+ console.error(e2);
118631
+ enqueueSnackbar(`Failed to connect to ENS resolver endpoint. ${extractBeeApiErrorMessage(e2)}`, {
118632
+ variant: "error"
118633
+ });
118634
+ return;
118635
+ }
118604
118636
  try {
118605
118637
  await setEnsResolverInDesktop(desktopUrl, value);
118606
118638
  setEnsResolver(value);
118607
- const snackKey = enqueueSnackbar("ENS resolver successfully changed, restarting Bee node...", {
118639
+ const snackKey = enqueueSnackbar("ENS resolver saved, restarting Bee node...", {
118608
118640
  variant: "success"
118609
118641
  });
118610
118642
  await restartBeeNode(desktopUrl);
package/lib/App.cjs.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
- const App = require("./App-bJc-m8lc.js");
2
+ const App = require("./App-B3D1R6YS.js");
3
3
  module.exports = App.App;
package/lib/App.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A } from "./App-DNdxuM_D.mjs";
1
+ import { A } from "./App-CwQdMHYW.mjs";
2
2
  export {
3
3
  A as default
4
4
  };
@@ -3,6 +3,8 @@ import { ReactElement } from 'react';
3
3
  interface Props {
4
4
  linearProgressProps?: LinearProgressProps;
5
5
  value: number;
6
+ indeterminate?: boolean;
7
+ label?: string;
6
8
  }
7
- export declare function LinearProgressWithLabel(props: Props): ReactElement;
9
+ export declare function LinearProgressWithLabel({ indeterminate, value, linearProgressProps, label }: Props): ReactElement;
8
10
  export {};
@@ -14,5 +14,9 @@ export declare const BEE_DESKTOP_LATEST_RELEASE_PAGE = "https://github.com/ether
14
14
  export declare const BEE_DESKTOP_LATEST_RELEASE_PAGE_API = "https://api.github.com/repos/ethersphere/bee-desktop/releases/latest";
15
15
  export declare const DEFAULT_BEE_API_HOST = "http://localhost:1633";
16
16
  export declare const DEFAULT_RPC_URL = "https://xdai.fairdatasociety.org";
17
+ export declare const DEFAULT_GIFT_WALLET_FEES: {
18
+ dai: string;
19
+ bzz: string;
20
+ };
17
21
  export declare const MIN_STAMP_DEPTH = 17;
18
22
  export declare const MAX_STAMP_DEPTH = 255;
@@ -1,4 +1,4 @@
1
- import { T as Types, R as Reference, P as PublicKey } from "./App-DNdxuM_D.mjs";
1
+ import { T as Types, R as Reference, P as PublicKey } from "./App-CwQdMHYW.mjs";
2
2
  async function downloadReadableFetch(resource, apiUrl, endpoint, options, requestOptions) {
3
3
  if (options) {
4
4
  options = prepareDownloadOptions(options);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const App = require("./App-bJc-m8lc.js");
3
+ const App = require("./App-B3D1R6YS.js");
4
4
  async function downloadReadableFetch(resource, apiUrl, endpoint, options, requestOptions) {
5
5
  if (options) {
6
6
  options = prepareDownloadOptions(options);
@@ -1,4 +1,4 @@
1
- import { s as settlePromises } from "./App-DNdxuM_D.mjs";
1
+ import { s as settlePromises } from "./App-CwQdMHYW.mjs";
2
2
  async function downloadNode(bee, resources, options, requestOptions) {
3
3
  const dataPromises = [];
4
4
  for (const resource of resources) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const App = require("./App-bJc-m8lc.js");
3
+ const App = require("./App-B3D1R6YS.js");
4
4
  async function downloadNode(bee, resources, options, requestOptions) {
5
5
  const dataPromises = [];
6
6
  for (const resource of resources) {
@@ -1,4 +1,4 @@
1
- import { F as FileError } from "./App-DNdxuM_D.mjs";
1
+ import { F as FileError } from "./App-CwQdMHYW.mjs";
2
2
  const contentTypes = /* @__PURE__ */ new Map([
3
3
  [".mp4", "video/mp4"],
4
4
  [".webm", "video/webm"],
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const App = require("./App-bJc-m8lc.js");
3
+ const App = require("./App-B3D1R6YS.js");
4
4
  const contentTypes = /* @__PURE__ */ new Map([
5
5
  [".mp4", "video/mp4"],
6
6
  [".webm", "video/webm"],
@@ -1,4 +1,4 @@
1
- import { B as BatchId, F as FileError } from "./App-DNdxuM_D.mjs";
1
+ import { B as BatchId, F as FileError } from "./App-CwQdMHYW.mjs";
2
2
  async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptions) {
3
3
  const uploadFilesRes = await uploadFileOrDirectory(bee, new BatchId(batchId), nodeOptions.path, { ...uploadOptions, act: false }, requestOptions);
4
4
  let uploadPreviewRes;
@@ -12,7 +12,7 @@ async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptio
12
12
  return await bee.uploadData(batchId, JSON.stringify(wrappedData), { ...uploadOptions, act: true }, requestOptions);
13
13
  }
14
14
  async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
15
- const { isDir } = await import("./fs.node-6BiRJR_i.mjs");
15
+ const { isDir } = await import("./fs.node-C0eGUtLy.mjs");
16
16
  const isPathDir = await isDir(resolvedPath);
17
17
  if (isPathDir) {
18
18
  return uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions);
@@ -21,7 +21,7 @@ async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions,
21
21
  }
22
22
  async function uploadFile(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
23
23
  try {
24
- const { readFile } = await import("./fs.node-6BiRJR_i.mjs");
24
+ const { readFile } = await import("./fs.node-C0eGUtLy.mjs");
25
25
  const { data, name, contentType } = await readFile(resolvedPath);
26
26
  return await bee.uploadFile(batchId, data, name, {
27
27
  ...uploadOptions,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const App = require("./App-bJc-m8lc.js");
3
+ const App = require("./App-B3D1R6YS.js");
4
4
  async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptions) {
5
5
  const uploadFilesRes = await uploadFileOrDirectory(bee, new App.BatchId(batchId), nodeOptions.path, { ...uploadOptions, act: false }, requestOptions);
6
6
  let uploadPreviewRes;
@@ -14,7 +14,7 @@ async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptio
14
14
  return await bee.uploadData(batchId, JSON.stringify(wrappedData), { ...uploadOptions, act: true }, requestOptions);
15
15
  }
16
16
  async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
17
- const { isDir } = await Promise.resolve().then(() => require("./fs.node-CVEodnBo.js"));
17
+ const { isDir } = await Promise.resolve().then(() => require("./fs.node-DnKAgPam.js"));
18
18
  const isPathDir = await isDir(resolvedPath);
19
19
  if (isPathDir) {
20
20
  return uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions);
@@ -23,7 +23,7 @@ async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions,
23
23
  }
24
24
  async function uploadFile(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
25
25
  try {
26
- const { readFile } = await Promise.resolve().then(() => require("./fs.node-CVEodnBo.js"));
26
+ const { readFile } = await Promise.resolve().then(() => require("./fs.node-DnKAgPam.js"));
27
27
  const { data, name, contentType } = await readFile(resolvedPath);
28
28
  return await bee.uploadFile(batchId, data, name, {
29
29
  ...uploadOptions,
@@ -19,6 +19,7 @@ export declare function getBzzPriceAsDai(desktopUrl: string): Promise<DAI>;
19
19
  export declare function upgradeToLightNode(desktopUrl: string, rpcProvider: string): Promise<BeeConfig>;
20
20
  export declare function setJsonRpcInDesktop(desktopUrl: string, value: string): Promise<void>;
21
21
  export declare function setEnsResolverInDesktop(desktopUrl: string, value: string): Promise<void>;
22
+ export declare function extractEnsResolverUrl(value: string): string | null;
22
23
  export declare function getDesktopConfiguration(desktopUrl: string): Promise<BeeConfig>;
23
24
  export declare function restartBeeNode(desktopUrl: string): Promise<void>;
24
25
  export declare function createGiftWallet(desktopUrl: string, address: string): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethersphere/bee-dashboard",
3
- "version": "0.36.0",
3
+ "version": "0.36.2",
4
4
  "description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
5
5
  "homepage": ".",
6
6
  "bin": {