@ethersphere/bee-dashboard 0.8.0 → 0.11.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.
Files changed (118) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +10 -3
  3. package/build/asset-manifest.json +12 -12
  4. package/build/index.html +1 -1
  5. package/build/static/js/2.4ff98457.chunk.js +3 -0
  6. package/build/static/js/{2.ab1e4c48.chunk.js.LICENSE.txt → 2.4ff98457.chunk.js.LICENSE.txt} +13 -0
  7. package/build/static/js/2.4ff98457.chunk.js.map +1 -0
  8. package/build/static/js/3.11a1627e.chunk.js +2 -0
  9. package/build/static/js/3.11a1627e.chunk.js.map +1 -0
  10. package/build/static/js/main.83c3a1a6.chunk.js +2 -0
  11. package/build/static/js/main.83c3a1a6.chunk.js.map +1 -0
  12. package/build/static/js/{runtime-main.e4043ba2.js → runtime-main.6c2da3b6.js} +2 -2
  13. package/build/static/js/{runtime-main.e4043ba2.js.map → runtime-main.6c2da3b6.js.map} +1 -1
  14. package/lib/App.js +105277 -0
  15. package/lib/App.js.map +1 -0
  16. package/lib/assets/fonts/IBMPlexMono500.ttf +0 -0
  17. package/lib/assets/fonts/IBMPlexMono600.ttf +0 -0
  18. package/lib/assets/fonts/IBMPlexMonoregular.ttf +0 -0
  19. package/lib/assets/fonts/WorkSans-Italic-VariableFont_wght.ttf +0 -0
  20. package/lib/assets/fonts/WorkSans-VariableFont_wght.ttf +0 -0
  21. package/lib/assets/logo.svg +11 -0
  22. package/lib/src/App.d.ts +9 -0
  23. package/lib/src/App.test.d.ts +1 -0
  24. package/lib/src/components/AlertUploadSize.d.ts +6 -0
  25. package/lib/src/components/AlertVersion.d.ts +2 -0
  26. package/lib/src/components/Capacity.d.ts +7 -0
  27. package/lib/src/components/CashoutModal.d.ts +7 -0
  28. package/lib/src/components/ClipboardCopy.d.ts +6 -0
  29. package/lib/src/components/CodeBlock.d.ts +8 -0
  30. package/lib/src/components/CodeBlockTabs.d.ts +8 -0
  31. package/lib/src/components/ErrorBoundary.d.ts +16 -0
  32. package/lib/src/components/EthereumAddress.d.ts +9 -0
  33. package/lib/src/components/ExpandableElement.d.ts +8 -0
  34. package/lib/src/components/ExpandableList.d.ts +10 -0
  35. package/lib/src/components/ExpandableListItem.d.ts +8 -0
  36. package/lib/src/components/ExpandableListItemActions.d.ts +6 -0
  37. package/lib/src/components/ExpandableListItemInput.d.ts +16 -0
  38. package/lib/src/components/ExpandableListItemKey.d.ts +7 -0
  39. package/lib/src/components/ExpandableListItemLink.d.ts +10 -0
  40. package/lib/src/components/ExpandableListItemNote.d.ts +6 -0
  41. package/lib/src/components/FitImage.d.ts +9 -0
  42. package/lib/src/components/History.d.ts +8 -0
  43. package/lib/src/components/HistoryHeader.d.ts +6 -0
  44. package/lib/src/components/Loading.d.ts +2 -0
  45. package/lib/src/components/QRCodeModal.d.ts +7 -0
  46. package/lib/src/components/SideBar.d.ts +2 -0
  47. package/lib/src/components/SideBarItem.d.ts +9 -0
  48. package/lib/src/components/SideBarStatus.d.ts +6 -0
  49. package/lib/src/components/StatusIcon.d.ts +9 -0
  50. package/lib/src/components/StripedWrapper.d.ts +6 -0
  51. package/lib/src/components/SwarmButton.d.ts +12 -0
  52. package/lib/src/components/TabsContainer.d.ts +12 -0
  53. package/lib/src/components/TopologyStats.d.ts +7 -0
  54. package/lib/src/components/TroubleshootConnectionCard.d.ts +2 -0
  55. package/lib/src/components/WithdrawDepositModal.d.ts +14 -0
  56. package/lib/src/config.d.ts +11 -0
  57. package/lib/src/containers/DepositModal.d.ts +2 -0
  58. package/lib/src/containers/WithdrawModal.d.ts +2 -0
  59. package/lib/src/hooks/accounting.d.ts +18 -0
  60. package/lib/src/hooks/apiHooks.d.ts +6 -0
  61. package/lib/src/index.d.ts +1 -0
  62. package/lib/src/layout/Dashboard.d.ts +6 -0
  63. package/lib/src/models/Token.d.ts +25 -0
  64. package/lib/src/models/Token.test.d.ts +1 -0
  65. package/lib/src/pages/accounting/PeerBalances.d.ts +10 -0
  66. package/lib/src/pages/accounting/index.d.ts +2 -0
  67. package/lib/src/pages/files/AssetIcon.d.ts +6 -0
  68. package/lib/src/pages/files/AssetPreview.d.ts +8 -0
  69. package/lib/src/pages/files/AssetSummary.d.ts +6 -0
  70. package/lib/src/pages/files/Download.d.ts +2 -0
  71. package/lib/src/pages/files/DownloadActionBar.d.ts +10 -0
  72. package/lib/src/pages/files/FileNavigation.d.ts +6 -0
  73. package/lib/src/pages/files/SelectStamp.d.ts +9 -0
  74. package/lib/src/pages/files/Share.d.ts +7 -0
  75. package/lib/src/pages/files/StampPreview.d.ts +7 -0
  76. package/lib/src/pages/files/Upload.d.ts +2 -0
  77. package/lib/src/pages/files/UploadActionBar.d.ts +13 -0
  78. package/lib/src/pages/files/UploadArea.d.ts +6 -0
  79. package/lib/src/pages/files/UploadLander.d.ts +2 -0
  80. package/lib/src/pages/info/index.d.ts +2 -0
  81. package/lib/src/pages/settings/index.d.ts +2 -0
  82. package/lib/src/pages/stamps/CreatePostageStampModal.d.ts +6 -0
  83. package/lib/src/pages/stamps/PostageStamp.d.ts +8 -0
  84. package/lib/src/pages/stamps/SelectPostageStampModal.d.ts +9 -0
  85. package/lib/src/pages/stamps/StampsTable.d.ts +7 -0
  86. package/lib/src/pages/stamps/index.d.ts +2 -0
  87. package/lib/src/pages/status/SetupSteps/ChequebookDeployFund.d.ts +3 -0
  88. package/lib/src/pages/status/SetupSteps/DebugConnectionCheck.d.ts +2 -0
  89. package/lib/src/pages/status/SetupSteps/EthereumConnectionCheck.d.ts +2 -0
  90. package/lib/src/pages/status/SetupSteps/NodeConnectionCheck.d.ts +2 -0
  91. package/lib/src/pages/status/SetupSteps/PeerConnection.d.ts +2 -0
  92. package/lib/src/pages/status/SetupSteps/VersionCheck.d.ts +2 -0
  93. package/lib/src/pages/status/index.d.ts +2 -0
  94. package/lib/src/providers/Bee.d.ts +45 -0
  95. package/lib/src/providers/File.d.ts +13 -0
  96. package/lib/src/providers/Platform.d.ts +23 -0
  97. package/lib/src/providers/Settings.d.ts +21 -0
  98. package/lib/src/providers/Stamps.d.ts +22 -0
  99. package/lib/src/reportWebVitals.d.ts +3 -0
  100. package/lib/src/routes.d.ts +15 -0
  101. package/lib/src/setupTests.d.ts +1 -0
  102. package/lib/src/theme.d.ts +7 -0
  103. package/lib/src/types.d.ts +19 -0
  104. package/lib/src/utils/SwarmFile.d.ts +10 -0
  105. package/lib/src/utils/date.d.ts +1 -0
  106. package/lib/src/utils/file.d.ts +7 -0
  107. package/lib/src/utils/hash.d.ts +1 -0
  108. package/lib/src/utils/index.d.ts +52 -0
  109. package/lib/src/utils/local-storage.d.ts +12 -0
  110. package/lib/src/utils/threshold.d.ts +22 -0
  111. package/package.json +70 -39
  112. package/serve.js +0 -0
  113. package/build/static/js/2.ab1e4c48.chunk.js +0 -3
  114. package/build/static/js/2.ab1e4c48.chunk.js.map +0 -1
  115. package/build/static/js/3.ad8c73af.chunk.js +0 -2
  116. package/build/static/js/3.ad8c73af.chunk.js.map +0 -1
  117. package/build/static/js/main.105fda76.chunk.js +0 -2
  118. package/build/static/js/main.105fda76.chunk.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["components/TroubleshootConnectionCard.tsx","utils/index.ts","models/Token.ts","providers/Settings.tsx","providers/Bee.tsx","hooks/apiHooks.tsx","components/ExpandableList.tsx","components/ExpandableListItem.tsx","components/ExpandableListItemKey.tsx","utils/threshold.ts","components/TopologyStats.tsx","pages/info/index.tsx","components/TabsContainer.tsx","providers/Platform.tsx","components/CodeBlock.tsx","components/CodeBlockTabs.tsx","components/ExpandableListItemActions.tsx","components/ExpandableListItemNote.tsx","components/ExpandableListItemInput.tsx","components/StatusIcon.tsx","pages/status/SetupSteps/DebugConnectionCheck.tsx","pages/status/SetupSteps/NodeConnectionCheck.tsx","pages/status/SetupSteps/VersionCheck.tsx","pages/status/SetupSteps/EthereumConnectionCheck.tsx","components/WithdrawDepositModal.tsx","containers/DepositModal.tsx","pages/status/SetupSteps/ChequebookDeployFund.tsx","pages/status/SetupSteps/PeerConnection.tsx","pages/status/index.tsx","pages/files/Download.tsx","components/AlertUploadSize.tsx","components/ClipboardCopy.tsx","providers/Stamps.tsx","pages/stamps/CreatePostageStampModal.tsx","pages/files/SelectStamp.tsx","pages/files/Upload.tsx","pages/files/index.tsx","components/QRCodeModal.tsx","components/EthereumAddress.tsx","components/CashoutModal.tsx","pages/accounting/PeerBalances.tsx","hooks/accounting.ts","containers/WithdrawModal.tsx","pages/accounting/index.tsx","pages/settings/index.tsx","pages/stamps/StampsTable.tsx","routes.tsx","pages/stamps/index.tsx","components/ErrorBoundary.tsx","components/AlertVersion.tsx","components/SideBarItem.tsx","components/SideBarStatus.tsx","assets/logo.svg","components/SideBar.tsx","layout/Dashboard.tsx","theme.tsx","App.tsx","reportWebVitals.ts","index.tsx"],"names":["useStyles","makeStyles","theme","createStyles","root","height","content","maxWidth","marginBottom","spacing","icon","TroubleshootConnectionCard","classes","Grid","container","direction","justifyContent","alignItems","className","item","Typography","variant","align","href","process","target","rel","Button","component","Link","startIcon","to","ROUTES","STATUS","isInteger","value","BigNumber","isBigNumber","makeBigNumber","toString","TypeError","sleepMs","ms","a","Promise","resolve","setTimeout","POSSIBLE_DECIMALS","Token","amount","decimals","includes","this","BigInt","toFixed","dividedBy","pow","digits","toDecimal","t","multipliedBy","initialValues","apiUrl","sessionStorage","getItem","apiDebugUrl","beeApi","beeDebugApi","setApiUrl","setDebugApiUrl","Context","createContext","Consumer","Provider","children","useState","setBeeApi","setBeeDebugApi","useEffect","Bee","setItem","e","BeeDebug","status","all","version","blockchainConnection","debugApiConnection","apiConnection","topology","chequebook","latestPublishedVersion","undefined","latestUserVersion","latestUserVersionExact","isLatestBeeVersion","latestBeeVersionUrl","error","apiHealth","debugApiHealth","nodeAddresses","chequebookAddress","peers","chequebookBalance","peerBalances","peerCheques","settlements","latestBeeRelease","isLoading","isRefreshing","lastUpdate","start","stop","refresh","reject","getStatus","Boolean","semver","satisfies","engines","bee","includePrerelease","ethereum","connected","totalBalance","toBigNumber","isGreaterThan","Object","values","every","v","useContext","SettingsContext","setApiHealth","setDebugApiHealth","setNodeAddresses","setNodeTopology","setChequebookAddress","setPeers","setChequebookBalance","setPeerBalances","setPeerCheques","setSettlements","setLatestBeeRelease","isLoadingLatestBeeRelease","setLoading","setError","axios","get","then","res","data","catch","finally","useLatestBeeRelease","setIsLoading","setIsRefreshing","setLastUpdate","frequency","setFrequency","coerce","name","chequeBalanceWrapper","getChequebookBalance","availableBalance","peerBalanceWrapper","getAllBalances","balances","map","peer","balance","settlementsWrapper","getAllSettlements","totalReceived","totalSent","received","sent","promises","isConnected","getHealth","getNodeAddresses","getTopology","getPeers","getChequebookAddress","getLastCheques","allSettled","Date","now","interval","setInterval","clearInterval","html_url","freq","width","padding","margin","marginTop","rootLevel1","rootLevel2","header","backgroundColor","palette","background","paper","contentLevel0","contentLevel12","infoText","color","ExpandableList","label","level","defaultOpen","info","open","setOpen","rootLevelClass","typographyVariant","contentLevelClass","ListItem","button","onClick","ListItemText","primary","style","display","ExpandLess","ExpandMore","Collapse","in","timeout","unmountOnExit","wordBreak","copyValue","cursor","borderRadius","main","ExpandableListItem","tooltip","Tooltip","title","placement","arrow","IconButton","size","strokeWidth","borderLeft","headerOpen","keyMargin","marginRight","ExpandableListItemKey","s","copied","setCopied","toggleOpen","tooltipClickHandler","tooltipCloseHandler","splitValues","replace","length","lengthWithoutPrefix","match","hasPrefix","test","isPrefixedHexString","onClose","text","i","OPTIMAL_POPULATION","GENERIC_ERROR","THRESHOLDS","connectedPeers","minimumValue","explanation","score","population","toLocaleString","depth","pickThreshold","key","thresholds","maximumScore","last","TopologyStats","props","maximumTotalScore","reduce","sum","actualTotalScore","percentageText","Math","round","Status","BeeContext","publicKey","pssPublicKey","overlay","underlay","addr","TabPanel","index","other","role","hidden","flexGrow","SimpleTabs","indexChanged","React","setValue","Tabs","onChange","event","newValue","idx","Tab","Platforms","SupportedPlatforms","CodeBlock","textAlign","language","showLineNumbers","code","macOS","Linux","platform","setPlatform","os","userAgent","window","navigator","iOS","Windows","Android","getOS","keys","isSupportedPlatform","CodeBlockTabs","linux","mac","action","ExpandableListItemActions","Array","isArray","typography","ExpandableListItemNote","unselectableLabel","userSelect","WebkitUserSelect","MozUserSelect","msUserSelect","onConfirm","confirmLabel","confirmLabelDisabled","expandedOnly","helperText","placeholder","inputValue","setInputValue","InputBase","fullWidth","autoFocus","disabled","StatusIcon","isOk","CircularProgress","NodeConnectionCheck","elevation","severity","VersionCheck","EthereumConnectionCheck","WithdrawDepositModal","successMessage","errorMessage","dialogMessage","min","max","setAmount","amountToken","setAmountToken","amountError","setAmountError","enqueueSnackbar","useSnackbar","handleClose","handleAction","toBigInt","transactionHash","message","stopPropagation","Dialog","DialogTitle","id","DialogContent","DialogContentText","Input","type","fromDecimal","isLessThan","Error","FormHelperText","DialogActions","DepositModal","depositTokens","ChequebookDeployFund","PeerConnection","NodeSetupWorkflow","Files","referenceError","setReferenceError","Utils","isHexString","UploadSizeAlert","aboveLimit","file","Alert","AlertTitle","ClipboardCopy","marginLeft","stamps","enrichStamp","postageBatch","bucketDepth","usage","utilization","usageText","ceil","setStamps","getAllPostageBatch","initialFormValues","wrapper","position","field","buttonProgress","top","left","FormDialog","handleClickOpen","onSubmit","actions","Number","parseInt","options","createPostageBatch","resetForm","setSubmitting","validate","errors","isLessThanOrEqualTo","submitForm","isValid","isSubmitting","TextField","required","SimpleMenu","selectedStamp","setSelected","anchorEl","setAnchorEl","currentTarget","Menu","keepMounted","stamp","MenuItem","selected","batchID","ListItemIcon","substr","loadingProgress","dropzoneKey","setDropzoneKey","setFile","uploadReference","setUploadReference","isUploadingFile","setIsUploadingFile","setSelectedStamp","prev","curr","files","filesLimit","maxFileSize","Chip","avatar","Avatar","deleteIcon","onDelete","uploadFile","hash","reference","Container","QRCodeModal","FilterCenterFocusSharp","bgColor","fgColor","includeMargin","renderAs","EthereumAddress","address","hideBlockie","paddingTop","string","truncate","overflow","textOverflow","whiteSpace","transaction","CheckoutModal","peerId","uncashedAmount","loadingCashout","setLoadingCashout","overflowWrap","cashoutLastCheque","PeerBalances","accounting","isLoadingUncashed","totalUncashed","toFixedDecimal","total","useAccounting","setIsloadingUncashed","uncashedAmounts","setUncashedAmounts","filter","gt","fn","maxRetries","delayMs","tries","results","makeRetriablePromise","getLastCashoutAction","promiseSettledResults","fulfilled","promise","rejected","x","reason","String","unwrapPromiseSettlements","forEach","plus","minus","sort","b","diff","toNumber","mergeAccounting","WithdrawModal","withdrawTokens","Accounting","Settings","StampsTable","postageStamps","flex","flexWrap","StampsContext","BaseRouter","exact","path","FILES","ACCOUNTING","SETTINGS","STAMPS","Stamps","INFO","Info","ErrorBoundary","state","errorInfo","console","Component","VersionAlert","isExactlySupportedBeeVersion","SUPPORTED_BEE_VERSION_EXACT","fontSize","StyledListItem","withStyles","paddingLeft","paddingRight","activeIcon","SideBarItem","iconStart","iconEnd","location","useLocation","isSelected","matchPath","pathname","disableRipple","iconSmall","rootError","smallerText","navBarItems","Home","FileText","Layers","DollarSign","minHeight","paddingBottom","drawer","flexShrink","drawerPaper","logo","divider","link","textDecoration","SideBar","Drawer","anchor","alt","src","Logo","List","p","Divider","OpenInNewSharp","default","Dashboard","createMuiTheme","light","dark","orange","secondary","fontFamily","join","h1","fontWeight","h2","h3","body2","overrides","MuiListItem","MuiContainer","maxWidthXs","maxWidthSm","maxWidthMd","maxWidthLg","maxWidthXl","MuiButton","endIcon","outlined","border","outlinedSizeSmall","boxShadow","outlinedSizeLarge","containedSizeLarge","containedSizeSmall","contained","MuiTab","opacity","fontWeightMedium","textColorInherit","MuiTabs","borderBottom","indicator","MuiButtonBase","App","ThemeProvider","CssBaseline","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"4cAQMA,EAAYC,aAAW,SAACC,GAAD,OAC3BC,YAAa,CACXC,KAAM,CACJC,OAAQ,Q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GAEX,aAAc,CACZvB,WAAYhnB,GAAMoV,WAAWoT,mBAGjCC,iBAAkB,CAChBF,QAAS,KAGbG,QAAS,CACPxoB,KAAM,CACJyoB,aAAc,QAEhBC,UAAW,CACTtc,gBAAiB,iBAoDvBtM,GAAMyR,MA/CiB,CACrB6W,OAAQ,CACN5D,eAAe,GAEjBmE,cAAe,CACbnE,eAAe,ICxJnB,IAyBeoE,GAzBH,kBACV,qBAAK9nB,UAAU,MAAf,SACE,cAAC+nB,EAAA,EAAD,CAAe/oB,MAAOA,GAAtB,SACE,cAAC,EAAD,UACE,cAAC,EAAD,UACE,cAAC,GAAD,UACE,cAAC,GAAD,UACE,cAAC,IAAD,UACE,cAAC,IAAD,UACE,qCACE,cAACgpB,EAAA,EAAD,IACA,cAAC,GAAD,UACE,cAAC,GAAD,0BCdPC,GAZS,SAACC,GACnBA,GAAeA,aAAuBC,UACxC,8BAAqBhgB,MAAK,YAAkD,IAA/CigB,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,OCHdO,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEFC,SAASC,eAAe,SAM1BZ,O","file":"static/js/main.105fda76.chunk.js","sourcesContent":["import type { ReactElement } from 'react'\nimport { Link } from 'react-router-dom'\n\nimport { createStyles, makeStyles, Theme } from '@material-ui/core/styles'\nimport { Button, Grid, Typography, Link as MuiLink } from '@material-ui/core/'\nimport { ROUTES } from '../routes'\nimport { Activity } from 'react-feather'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n height: '100%',\n },\n content: {\n maxWidth: 500,\n marginBottom: theme.spacing(4),\n '&:last-child': {\n marginBottom: 0,\n },\n },\n icon: {\n height: '1rem',\n },\n }),\n)\n\nexport default function TroubleshootConnectionCard(): ReactElement {\n const classes = useStyles()\n\n return (\n <Grid container direction=\"column\" justifyContent=\"center\" alignItems=\"center\" className={classes.root}>\n <Grid item className={classes.content}>\n <Typography variant=\"h1\" align=\"center\">\n Uh oh, it looks like your node is not connected.\n </Typography>\n </Grid>\n <Grid item className={classes.content}>\n <Typography align=\"center\">\n Please check your node status to fix the problem. You can also check out the{' '}\n <MuiLink href={process.env.REACT_APP_BEE_DOCS_HOST} target=\"_blank\" rel=\"noreferrer\">\n Swarm Bee Docs\n </MuiLink>{' '}\n or ask for support on the{' '}\n <MuiLink href={process.env.REACT_APP_BEE_DISCORD_HOST} target=\"_blank\" rel=\"noreferrer\">\n Ethereum Swarm Discord\n </MuiLink>\n .\n </Typography>\n </Grid>\n <Grid item className={classes.content}>\n <Typography align=\"center\">\n <Button\n component={Link}\n variant=\"contained\"\n startIcon={<Activity className={classes.icon} />}\n to={ROUTES.STATUS}\n >\n Check node status\n </Button>\n </Typography>\n </Grid>\n </Grid>\n )\n}\n","import { BigNumber } from 'bignumber.js'\n\n/**\n * Test if value is an integer\n *\n * @param value Value to be tested if it is an integer\n *\n * @returns True if the passed in value is integer\n */\nexport function isInteger(value: unknown): value is BigNumber | bigint {\n return (BigNumber.isBigNumber(value) && value.isInteger()) || typeof value === 'bigint'\n}\n\n/**\n *Convert value into a BigNumber if not already\n *\n * @param value Value to be converted\n *\n * @throws {TypeError} if the value is not convertible to a BigNumber\n *\n * @returns BigNumber - but it may still be NaN or Infinite\n */\nexport function makeBigNumber(value: BigNumber | BigInt | number | string): BigNumber | never {\n if (BigNumber.isBigNumber(value)) return value\n\n if (typeof value === 'string') return new BigNumber(value)\n\n if (typeof value === 'bigint') return new BigNumber(value.toString())\n\n // FIXME: bee-js still returns some values as numbers and even outside of SAFE INTEGER bounds\n if (typeof value === 'number' /* && Number.isSafeInteger(value)*/) return new BigNumber(value)\n\n throw new TypeError(`Not a BigNumber or BigNumber convertible value. Type: ${typeof value} value: ${value}`)\n}\n\nexport type PromiseSettlements<T> = {\n fulfilled: PromiseFulfilledResult<T>[]\n rejected: PromiseRejectedResult[]\n}\n\nexport type UnwrappedPromiseSettlements<T> = {\n fulfilled: T[]\n rejected: string[]\n}\n\nexport async function sleepMs(ms: number): Promise<void> {\n await new Promise<void>(resolve =>\n setTimeout(() => {\n resolve()\n }, ms),\n )\n}\n\n/**\n * Maps the returned results of `Promise.allSettled` to an object\n * with `fulfilled` and `rejected` arrays for easy access.\n *\n * The results still need to be unwrapped to get the fulfilled values or rejection reasons.\n */\nexport function mapPromiseSettlements<T>(promises: PromiseSettledResult<T>[]): PromiseSettlements<T> {\n const fulfilled = promises.filter(promise => promise.status === 'fulfilled') as PromiseFulfilledResult<T>[]\n const rejected = promises.filter(promise => promise.status === 'rejected') as PromiseRejectedResult[]\n\n return { fulfilled, rejected }\n}\n\n/**\n * Maps the returned values of `Promise.allSettled` to an object\n * with `fulfilled` and `rejected` arrays for easy access.\n *\n * For rejected promises, the value is the stringified `reason`,\n * or `'Unknown error'` string when it is unavailable.\n */\nexport function unwrapPromiseSettlements<T>(\n promiseSettledResults: PromiseSettledResult<T>[],\n): UnwrappedPromiseSettlements<T> {\n const values = mapPromiseSettlements(promiseSettledResults)\n const fulfilled = values.fulfilled.map(x => x.value)\n const rejected = values.rejected.map(x => (x.reason ? String(x.reason) : 'Unknown error'))\n\n return { fulfilled, rejected }\n}\n\n/**\n * Wraps a `Promise<T>` or async function inside a new `Promise<T>`,\n * which retries the original function up to `maxRetries` times,\n * waiting `delayMs` milliseconds between failed attempts.\n *\n * If all attempts fail, then this `Promise<T>` also rejects.\n */\nexport function makeRetriablePromise<T>(fn: () => Promise<T>, maxRetries = 3, delayMs = 1000): Promise<T> {\n return new Promise(async (resolve, reject) => {\n for (let tries = 0; tries < maxRetries; tries++) {\n try {\n const results = await fn()\n resolve(results)\n\n return\n } catch (error) {\n if (tries < maxRetries - 1) {\n await sleepMs(delayMs)\n } else {\n reject(error)\n }\n }\n }\n })\n}\n","import { BigNumber } from 'bignumber.js'\nimport { isInteger, makeBigNumber } from '../utils'\n\nconst POSSIBLE_DECIMALS = [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\ntype digits = typeof POSSIBLE_DECIMALS[number]\n\nconst BZZ_DECIMALS = 16\n\nexport class Token {\n private amount: BigNumber // Represented in the base units, so it is always an integer value\n private readonly decimals: digits\n\n constructor(amount: BigNumber | string | BigInt, decimals: digits = BZZ_DECIMALS) {\n const a = makeBigNumber(amount)\n\n if (!isInteger(a) || !POSSIBLE_DECIMALS.includes(decimals)) throw new TypeError('Not a valid token values')\n\n this.amount = a\n this.decimals = decimals\n }\n\n /**\n * Construct new Token from a digit representation\n *\n * @param amount Amount of a token in the digits (1 token = 10^decimals)\n * @param decimals Number of decimals for the token (must be integer)\n *\n * @throws {TypeError} If the decimals is not an integer or the amount after conversion is not an integer\n *\n * @returns new Token\n */\n static fromDecimal(amount: BigNumber | string | BigInt, decimals: digits = BZZ_DECIMALS): Token | never {\n const a = makeBigNumber(amount)\n\n // No need to do any validation here, it is done when the new token is created\n const t = a.multipliedBy(new BigNumber(10).pow(decimals))\n\n return new Token(t, decimals)\n }\n\n get toBigInt(): BigInt {\n return BigInt(this.amount.toFixed(0))\n }\n\n get toString(): string {\n return this.amount.toFixed(0)\n }\n\n get toBigNumber(): BigNumber {\n return new BigNumber(this.amount)\n }\n\n get toDecimal(): BigNumber {\n return this.amount.dividedBy(new BigNumber(10).pow(this.decimals))\n }\n\n toFixedDecimal(digits = 7): string {\n return this.toDecimal.toFixed(digits)\n }\n}\n","import { createContext, ReactChild, ReactElement, useState, useEffect } from 'react'\nimport { Bee, BeeDebug } from '@ethersphere/bee-js'\n\ninterface ContextInterface {\n apiUrl: string\n apiDebugUrl: string\n beeApi: Bee | null\n beeDebugApi: BeeDebug | null\n setApiUrl: (url: string) => void\n setDebugApiUrl: (url: string) => void\n}\n\nconst initialValues: ContextInterface = {\n apiUrl: sessionStorage.getItem('api_host') || process.env.REACT_APP_BEE_HOST || 'http://localhost:1633',\n apiDebugUrl:\n sessionStorage.getItem('debug_api_host') || process.env.REACT_APP_BEE_DEBUG_HOST || 'http://localhost:1635',\n beeApi: null,\n beeDebugApi: null,\n setApiUrl: () => {}, // eslint-disable-line\n setDebugApiUrl: () => {}, // eslint-disable-line\n}\n\nexport const Context = createContext<ContextInterface>(initialValues)\nexport const Consumer = Context.Consumer\n\ninterface Props {\n children: ReactChild\n}\n\nexport function Provider({ children }: Props): ReactElement {\n const [apiUrl, setApiUrl] = useState<string>(initialValues.apiUrl)\n const [apiDebugUrl, setDebugApiUrl] = useState<string>(initialValues.apiDebugUrl)\n const [beeApi, setBeeApi] = useState<Bee | null>(null)\n const [beeDebugApi, setBeeDebugApi] = useState<BeeDebug | null>(null)\n\n useEffect(() => {\n try {\n setBeeApi(new Bee(apiUrl))\n sessionStorage.setItem('api_host', apiUrl)\n } catch (e) {\n setBeeApi(null)\n }\n }, [apiUrl])\n\n useEffect(() => {\n try {\n setBeeDebugApi(new BeeDebug(apiDebugUrl))\n sessionStorage.setItem('debug_api_host', apiDebugUrl)\n } catch (e) {\n setBeeDebugApi(null)\n }\n }, [apiDebugUrl])\n\n return (\n <Context.Provider value={{ apiUrl, apiDebugUrl, beeApi, beeDebugApi, setApiUrl, setDebugApiUrl }}>\n {children}\n </Context.Provider>\n )\n}\n","import type { ChequebookBalance, Balance, Settlements } from '../types'\nimport { createContext, ReactChild, ReactElement, useEffect, useState, useContext } from 'react'\nimport { Token } from '../models/Token'\nimport semver from 'semver'\nimport { engines } from '../../package.json'\nimport { Context as SettingsContext } from './Settings'\n\nimport type {\n NodeAddresses,\n ChequebookAddressResponse,\n LastChequesResponse,\n Health,\n Peer,\n Topology,\n} from '@ethersphere/bee-js'\nimport { useLatestBeeRelease } from '../hooks/apiHooks'\n\ninterface Status {\n all: boolean\n version: boolean\n blockchainConnection: boolean\n debugApiConnection: boolean\n apiConnection: boolean\n topology: boolean\n chequebook: boolean\n}\n\ninterface ContextInterface {\n status: Status\n latestPublishedVersion?: string\n latestUserVersion?: string\n latestUserVersionExact?: string\n isLatestBeeVersion: boolean\n latestBeeVersionUrl: string\n error: Error | null\n apiHealth: boolean\n debugApiHealth: Health | null\n nodeAddresses: NodeAddresses | null\n topology: Topology | null\n chequebookAddress: ChequebookAddressResponse | null\n peers: Peer[] | null\n chequebookBalance: ChequebookBalance | null\n peerBalances: Balance[] | null\n peerCheques: LastChequesResponse | null\n settlements: Settlements | null\n latestBeeRelease: LatestBeeRelease | null\n isLoading: boolean\n isRefreshing: boolean\n lastUpdate: number | null\n start: (frequency?: number) => void\n stop: () => void\n refresh: () => Promise<void>\n}\n\nconst initialValues: ContextInterface = {\n status: {\n all: false,\n version: false,\n blockchainConnection: false,\n debugApiConnection: false,\n apiConnection: false,\n topology: false,\n chequebook: false,\n },\n latestPublishedVersion: undefined,\n latestUserVersion: undefined,\n latestUserVersionExact: undefined,\n isLatestBeeVersion: false,\n latestBeeVersionUrl: 'https://github.com/ethersphere/bee/releases/latest',\n error: null,\n apiHealth: false,\n debugApiHealth: null,\n nodeAddresses: null,\n topology: null,\n chequebookAddress: null,\n peers: null,\n chequebookBalance: null,\n peerBalances: null,\n peerCheques: null,\n settlements: null,\n latestBeeRelease: null,\n isLoading: true,\n isRefreshing: false,\n lastUpdate: null,\n start: () => {}, // eslint-disable-line\n stop: () => {}, // eslint-disable-line\n refresh: () => Promise.reject(),\n}\n\nexport const Context = createContext<ContextInterface>(initialValues)\nexport const Consumer = Context.Consumer\n\ninterface Props {\n children: ReactChild\n}\n\nfunction getStatus(\n debugApiHealth: Health | null,\n nodeAddresses: NodeAddresses | null,\n apiHealth: boolean,\n topology: Topology | null,\n chequebookAddress: ChequebookAddressResponse | null,\n chequebookBalance: ChequebookBalance | null,\n error: Error | null,\n): Status {\n const status = {\n version: Boolean(\n debugApiHealth &&\n semver.satisfies(debugApiHealth.version, engines.bee, {\n includePrerelease: true,\n }),\n ),\n blockchainConnection: Boolean(nodeAddresses?.ethereum),\n debugApiConnection: Boolean(debugApiHealth?.status === 'ok'),\n apiConnection: apiHealth,\n topology: Boolean(topology?.connected && topology?.connected > 0),\n chequebook:\n Boolean(chequebookAddress?.chequebookAddress) &&\n chequebookBalance !== null &&\n chequebookBalance?.totalBalance.toBigNumber.isGreaterThan(0),\n }\n\n return { ...status, all: !error && Object.values(status).every(v => v) }\n}\n\nexport function Provider({ children }: Props): ReactElement {\n const { beeApi, beeDebugApi } = useContext(SettingsContext)\n const [apiHealth, setApiHealth] = useState<boolean>(false)\n const [debugApiHealth, setDebugApiHealth] = useState<Health | null>(null)\n const [nodeAddresses, setNodeAddresses] = useState<NodeAddresses | null>(null)\n const [topology, setNodeTopology] = useState<Topology | null>(null)\n const [chequebookAddress, setChequebookAddress] = useState<ChequebookAddressResponse | null>(null)\n const [peers, setPeers] = useState<Peer[] | null>(null)\n const [chequebookBalance, setChequebookBalance] = useState<ChequebookBalance | null>(null)\n const [peerBalances, setPeerBalances] = useState<Balance[] | null>(null)\n const [peerCheques, setPeerCheques] = useState<LastChequesResponse | null>(null)\n const [settlements, setSettlements] = useState<Settlements | null>(null)\n const { latestBeeRelease } = useLatestBeeRelease()\n\n const [error, setError] = useState<Error | null>(initialValues.error)\n const [isLoading, setIsLoading] = useState<boolean>(initialValues.isLoading)\n const [isRefreshing, setIsRefreshing] = useState<boolean>(initialValues.isRefreshing)\n const [lastUpdate, setLastUpdate] = useState<number | null>(initialValues.lastUpdate)\n const [frequency, setFrequency] = useState<number | null>(30000)\n\n const latestPublishedVersion = semver.coerce(latestBeeRelease?.name)?.version\n const latestUserVersion = semver.coerce(debugApiHealth?.version)?.version\n const latestUserVersionExact = debugApiHealth?.version\n\n useEffect(() => {\n setIsLoading(true)\n\n setApiHealth(false)\n\n refresh()\n }, [beeApi])\n\n useEffect(() => {\n setIsLoading(true)\n\n setDebugApiHealth(null)\n setNodeAddresses(null)\n setNodeTopology(null)\n setPeers(null)\n setChequebookAddress(null)\n setChequebookBalance(null)\n setPeerBalances(null)\n setPeerCheques(null)\n setSettlements(null)\n\n refresh()\n }, [beeDebugApi])\n\n const refresh = async () => {\n // Don't want to refresh when already refreshing\n if (isRefreshing) return\n\n // Not a valid bee api\n if (!beeApi || !beeDebugApi) {\n setIsLoading(false)\n\n return\n }\n\n try {\n setIsRefreshing(true)\n setError(null)\n\n // Wrap the chequebook balance call to return BZZ values as Token object\n const chequeBalanceWrapper = async () => {\n const { totalBalance, availableBalance } = await beeDebugApi.getChequebookBalance()\n\n return {\n totalBalance: new Token(totalBalance),\n availableBalance: new Token(availableBalance),\n }\n }\n\n // Wrap the balances call to return BZZ values as Token object\n const peerBalanceWrapper = async () => {\n const { balances } = await beeDebugApi.getAllBalances()\n\n return balances.map(({ peer, balance }) => ({ peer, balance: new Token(balance) }))\n }\n\n // Wrap the settlements call to return BZZ values as Token object\n const settlementsWrapper = async () => {\n const { totalReceived, settlements, totalSent } = await beeDebugApi.getAllSettlements()\n\n return {\n totalReceived: new Token(totalReceived),\n totalSent: new Token(totalSent),\n settlements: settlements.map(({ peer, received, sent }) => ({\n peer,\n received: new Token(received),\n sent: new Token(sent),\n })),\n }\n }\n\n const promises = [\n // API health\n beeApi\n .isConnected()\n .then(setApiHealth)\n .catch(() => setApiHealth(false)),\n\n // Debug API health\n beeDebugApi\n .getHealth()\n .then(setDebugApiHealth)\n .catch(() => setDebugApiHealth(null)),\n\n // Node Addresses\n beeDebugApi\n .getNodeAddresses()\n .then(setNodeAddresses)\n .catch(() => setNodeAddresses(null)),\n\n // Network Topology\n beeDebugApi\n .getTopology()\n .then(setNodeTopology)\n .catch(() => setNodeTopology(null)),\n\n // Peers\n beeDebugApi\n .getPeers()\n .then(setPeers)\n .catch(() => setPeers(null)),\n\n // Chequebook address\n beeDebugApi\n .getChequebookAddress()\n .then(setChequebookAddress)\n .catch(() => setChequebookAddress(null)),\n\n // Cheques\n beeDebugApi\n .getLastCheques()\n .then(setPeerCheques)\n .catch(() => setPeerCheques(null)),\n\n // Chequebook balance\n chequeBalanceWrapper()\n .then(setChequebookBalance)\n .catch(() => setChequebookBalance(null)),\n\n // Peer balances\n peerBalanceWrapper()\n .then(setPeerBalances)\n .catch(() => setPeerBalances(null)),\n\n // Settlements\n settlementsWrapper()\n .then(setSettlements)\n .catch(() => setSettlements(null)),\n ]\n\n await Promise.allSettled(promises)\n } catch (e) {\n setError(e)\n } finally {\n setIsLoading(false)\n setIsRefreshing(false)\n setLastUpdate(Date.now())\n }\n }\n\n const start = (freq = 30000) => setFrequency(freq)\n const stop = () => setFrequency(null)\n\n // Start the update loop\n useEffect(() => {\n refresh()\n\n // Start autorefresh only if the frequency is set\n if (frequency) {\n const interval = setInterval(refresh, frequency)\n\n return () => clearInterval(interval)\n }\n }, [frequency, beeDebugApi, beeApi])\n\n return (\n <Context.Provider\n value={{\n status: getStatus(\n debugApiHealth,\n nodeAddresses,\n apiHealth,\n topology,\n chequebookAddress,\n chequebookBalance,\n error,\n ),\n latestUserVersion,\n latestUserVersionExact,\n latestPublishedVersion,\n isLatestBeeVersion: Boolean(\n latestPublishedVersion &&\n latestUserVersion &&\n semver.satisfies(latestPublishedVersion, latestUserVersion, {\n includePrerelease: true,\n }),\n ),\n latestBeeVersionUrl: latestBeeRelease?.html_url || 'https://github.com/ethersphere/bee/releases/latest',\n error,\n apiHealth,\n debugApiHealth,\n nodeAddresses,\n topology,\n chequebookAddress,\n peers,\n chequebookBalance,\n peerBalances,\n peerCheques,\n settlements,\n latestBeeRelease,\n isLoading,\n isRefreshing,\n lastUpdate,\n start,\n stop,\n refresh,\n }}\n >\n {children}\n </Context.Provider>\n )\n}\n","import { useState, useEffect } from 'react'\nimport axios from 'axios'\n\nexport interface LatestBeeReleaseHook {\n latestBeeRelease: LatestBeeRelease | null\n isLoadingLatestBeeRelease: boolean\n error: Error | null\n}\n\nexport const useLatestBeeRelease = (): LatestBeeReleaseHook => {\n const [latestBeeRelease, setLatestBeeRelease] = useState<LatestBeeRelease | null>(null)\n const [isLoadingLatestBeeRelease, setLoading] = useState<boolean>(false)\n const [error, setError] = useState<Error | null>(null)\n\n useEffect(() => {\n axios\n .get(`${process.env.REACT_APP_BEE_GITHUB_REPO_URL}/releases/latest`)\n .then(res => {\n setLatestBeeRelease(res.data)\n })\n .catch((error: Error) => {\n setError(error)\n })\n .finally(() => {\n setLoading(false)\n })\n }, [])\n\n return { latestBeeRelease, isLoadingLatestBeeRelease, error }\n}\n","import { ReactElement, ReactNode, useState } from 'react'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport { Collapse, ListItem, ListItemText, Typography } from '@material-ui/core'\nimport { ExpandLess, ExpandMore } from '@material-ui/icons'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n width: '100%',\n padding: 0,\n margin: 0,\n marginTop: theme.spacing(4),\n '&:first-child': {\n marginTop: 0,\n },\n },\n rootLevel1: { marginTop: theme.spacing(1) },\n rootLevel2: { marginTop: theme.spacing(0.5) },\n header: {\n backgroundColor: theme.palette.background.paper,\n },\n contentLevel0: {\n marginTop: theme.spacing(1),\n },\n contentLevel12: {\n marginTop: theme.spacing(0.25),\n },\n infoText: {\n color: '#c9c9c9',\n },\n }),\n)\n\ninterface Props {\n children?: ReactNode\n label: ReactNode\n info?: ReactNode\n level?: 0 | 1 | 2\n defaultOpen?: boolean\n}\n\nexport default function ExpandableList({ children, label, level, defaultOpen, info }: Props): ReactElement | null {\n const classes = useStyles()\n const [open, setOpen] = useState<boolean>(Boolean(defaultOpen))\n\n const handleClick = () => {\n setOpen(!open)\n }\n\n let rootLevelClass = ''\n let typographyVariant: 'h1' | 'h2' | 'h3' = 'h1'\n let contentLevelClass = classes.contentLevel0\n\n if (level === 1) {\n rootLevelClass = classes.rootLevel1\n typographyVariant = 'h2'\n contentLevelClass = classes.contentLevel12\n } else if (level === 2) {\n rootLevelClass = classes.rootLevel2\n typographyVariant = 'h3'\n contentLevelClass = classes.contentLevel12\n }\n\n return (\n <div className={`${classes.root} ${rootLevelClass}`}>\n <ListItem button onClick={handleClick} className={classes.header}>\n <ListItemText primary={<Typography variant={typographyVariant}>{label}</Typography>} />\n <div style={{ display: 'flex' }}>\n {!open && (\n <Typography variant=\"body2\" className={classes.infoText}>\n {info}\n </Typography>\n )}\n {open ? <ExpandLess /> : <ExpandMore />}\n </div>\n </ListItem>\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <div className={contentLevelClass}>{children}</div>\n </Collapse>\n </div>\n )\n}\n","import { ReactElement, ReactNode } from 'react'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport { Typography, Grid, IconButton, Tooltip } from '@material-ui/core'\nimport { Info } from 'react-feather'\nimport ListItem from '@material-ui/core/ListItem'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n header: {\n backgroundColor: theme.palette.background.paper,\n marginBottom: theme.spacing(0.25),\n wordBreak: 'break-word',\n },\n copyValue: {\n cursor: 'pointer',\n padding: theme.spacing(1),\n borderRadius: 0,\n '&:hover': {\n backgroundColor: '#fcf2e8',\n color: theme.palette.primary.main,\n },\n },\n }),\n)\n\ninterface Props {\n label?: ReactNode\n value?: ReactNode\n tooltip?: string\n}\n\nexport default function ExpandableListItem({ label, value, tooltip }: Props): ReactElement | null {\n const classes = useStyles()\n\n return (\n <ListItem className={classes.header}>\n <Grid container direction=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n {label && <Typography variant=\"body1\">{label}</Typography>}\n {value && (\n <Typography variant=\"body2\">\n {value}\n {tooltip && (\n <Tooltip title={tooltip} placement=\"top\" arrow>\n <IconButton size=\"small\" className={classes.copyValue}>\n <Info strokeWidth={1} />\n </IconButton>\n </Tooltip>\n )}\n </Typography>\n )}\n </Grid>\n </ListItem>\n )\n}\n","import { ReactElement, useState } from 'react'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport Collapse from '@material-ui/core/Collapse'\nimport { ListItem, Typography, Grid, IconButton, Tooltip } from '@material-ui/core'\nimport { Eye, Minus } from 'react-feather'\nimport { CopyToClipboard } from 'react-copy-to-clipboard'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n header: {\n backgroundColor: theme.palette.background.paper,\n marginBottom: theme.spacing(0.25),\n borderLeft: `${theme.spacing(0.25)}px solid rgba(0,0,0,0)`,\n wordBreak: 'break-word',\n },\n headerOpen: {\n borderLeft: `${theme.spacing(0.25)}px solid ${theme.palette.primary.main}`,\n },\n copyValue: {\n cursor: 'pointer',\n padding: theme.spacing(1),\n borderRadius: 0,\n '&:hover': {\n backgroundColor: '#fcf2e8',\n color: theme.palette.primary.main,\n },\n },\n content: {\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n keyMargin: {\n marginRight: theme.spacing(1),\n },\n }),\n)\n\ninterface Props {\n label: string\n value: string\n}\n\nconst lengthWithoutPrefix = (s: string) => s.replace(/^0x/i, '').length\n\nfunction isPrefixedHexString(s: unknown): boolean {\n return typeof s === 'string' && /^0x[0-9a-f]+$/i.test(s)\n}\n\nconst split = (s: string): string[] => {\n const nonPrefixLength = lengthWithoutPrefix(s)\n\n if (nonPrefixLength % 6 === 0) return s.match(/(0x|.{6})/gi) || []\n\n return s.match(/(0x|.{1,8})/gi) || []\n}\n\nexport default function ExpandableListItemKey({ label, value }: Props): ReactElement | null {\n const classes = useStyles()\n const [open, setOpen] = useState(false)\n const [copied, setCopied] = useState(false)\n const toggleOpen = () => setOpen(!open)\n\n const tooltipClickHandler = () => setCopied(true)\n const tooltipCloseHandler = () => setCopied(false)\n\n const splitValues = split(value)\n const hasPrefix = isPrefixedHexString(value)\n\n return (\n <ListItem className={`${classes.header} ${open ? classes.headerOpen : ''}`}>\n <Grid container direction=\"column\" justifyContent=\"space-between\" alignItems=\"stretch\">\n <Grid container direction=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n {label && <Typography variant=\"body1\">{label}</Typography>}\n <Typography variant=\"body2\">\n <div>\n {!open && (\n <span className={classes.copyValue}>\n <Tooltip title={copied ? 'Copied' : 'Copy'} placement=\"top\" arrow onClose={tooltipCloseHandler}>\n <CopyToClipboard text={value}>\n <span onClick={tooltipClickHandler}>{`${\n hasPrefix ? `${splitValues[0]} ${splitValues[1]}` : splitValues[0]\n }[…]${splitValues[splitValues.length - 1]}`}</span>\n </CopyToClipboard>\n </Tooltip>\n </span>\n )}\n <IconButton size=\"small\" className={classes.copyValue}>\n {open ? <Minus onClick={toggleOpen} strokeWidth={1} /> : <Eye onClick={toggleOpen} strokeWidth={1} />}\n </IconButton>\n </div>\n </Typography>\n </Grid>\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <div className={classes.content}>\n <Tooltip title={copied ? 'Copied' : 'Copy'} placement=\"top\" arrow onClose={tooltipCloseHandler}>\n <CopyToClipboard text={value}>\n {/* This has to be wrapped in two spans otherwise either the tooltip or the highlighting does not work*/}\n <span onClick={tooltipClickHandler}>\n <span className={classes.copyValue}>\n {splitValues.map((s, i) => (\n <Typography variant=\"body2\" key={i} className={classes.keyMargin} component=\"span\">\n {s}\n </Typography>\n ))}\n </span>\n </span>\n </CopyToClipboard>\n </Tooltip>\n </div>\n </Collapse>\n </Grid>\n </ListItem>\n )\n}\n","const OPTIMAL_CONNECTED_PEERS = 200\nconst OPTIMAL_POPULATION = 100_000\nconst OPTIMAL_DEPTH = 12\n\ninterface Threshold {\n minimumValue: number\n explanation: string\n score: number\n}\n\ntype Thresholds = {\n connectedPeers: Threshold[]\n population: Threshold[]\n depth: Threshold[]\n}\n\ntype ThresholdValue = {\n score: number\n maximumScore: number\n explanation: string\n}\n\nexport type ThresholdValues = {\n connectedPeers: ThresholdValue\n population: ThresholdValue\n depth: ThresholdValue\n}\n\nconst GENERIC_ERROR = 'There may be issues with your Bee node or connection.'\n\nconst THRESHOLDS: Thresholds = {\n connectedPeers: [\n {\n minimumValue: OPTIMAL_CONNECTED_PEERS,\n explanation: `Perfect! ${OPTIMAL_CONNECTED_PEERS} or more connected peers indicate a healthy topology.`,\n score: 2,\n },\n {\n minimumValue: 1,\n explanation: `Your Bee node is connected to peers, but this number should ideally be above ${OPTIMAL_CONNECTED_PEERS}. If you have only started your Bee node, this number may increase quickly.`,\n score: 1,\n },\n {\n minimumValue: 0,\n explanation: 'Your Bee node has not connected to any peers. ' + GENERIC_ERROR,\n score: 0,\n },\n ],\n population: [\n {\n minimumValue: OPTIMAL_POPULATION,\n explanation:\n 'Perfect! Your Bee node seems to have a realistic value for the network size, which means everything is working well on your end.',\n score: 2,\n },\n {\n minimumValue: 1,\n explanation: `Population is usually above ${OPTIMAL_POPULATION.toLocaleString()}. If the number does not increase within a few hours, there may be issues with your Bee node.`,\n score: 1,\n },\n {\n minimumValue: 0,\n explanation: 'Your Bee node has no information on the network population. ' + GENERIC_ERROR,\n score: 0,\n },\n ],\n depth: [\n {\n minimumValue: OPTIMAL_DEPTH,\n explanation: 'Perfect! Your Bee node has the highest available depth.',\n score: 2,\n },\n {\n minimumValue: 1,\n explanation: `Your Bee node is supposed to reach a depth of ${OPTIMAL_DEPTH} eventually. Stagnation or decrease in this number may indicate problems with your Bee node.`,\n score: 1,\n },\n {\n minimumValue: 0,\n explanation: 'Your Bee node has not started building its topology yet. ' + GENERIC_ERROR,\n score: 0,\n },\n ],\n}\n\nexport function pickThreshold(key: keyof Thresholds, value: number): ThresholdValue {\n const thresholds = THRESHOLDS[key]\n const maximumScore = thresholds[0].score\n for (const item of thresholds) {\n if (value >= item.minimumValue) {\n return {\n score: item.score,\n maximumScore,\n explanation: item.explanation,\n }\n }\n }\n const last = thresholds[thresholds.length - 1]\n\n return {\n score: last.score,\n maximumScore,\n explanation: last.explanation,\n }\n}\n","import type { Topology } from '@ethersphere/bee-js'\nimport type { ReactElement } from 'react'\nimport { pickThreshold, ThresholdValues } from '../utils/threshold'\nimport ExpandableListItem from './ExpandableListItem'\n\ninterface Props {\n topology: Topology | null\n}\n\nconst TopologyStats = (props: Props): ReactElement => {\n const thresholds: ThresholdValues = {\n connectedPeers: pickThreshold('connectedPeers', props.topology?.connected || 0),\n population: pickThreshold('population', props.topology?.population || 0),\n depth: pickThreshold('depth', props.topology?.depth || 0),\n }\n\n const maximumTotalScore = Object.values(thresholds).reduce((sum, item) => sum + item.maximumScore, 0)\n const actualTotalScore = Object.values(thresholds).reduce((sum, item) => sum + item.score, 0)\n const percentageText = Math.round((actualTotalScore / maximumTotalScore) * 100) + '%'\n\n return (\n <>\n <ExpandableListItem label=\"Overall Health Indicator\" value={percentageText} />\n <ExpandableListItem\n label=\"Connected Peers\"\n value={props.topology?.connected.toString()}\n tooltip={thresholds.connectedPeers.explanation}\n />\n <ExpandableListItem\n label=\"Population\"\n value={props.topology?.population.toString()}\n tooltip={thresholds.population.explanation}\n />\n <ExpandableListItem\n label=\"Depth\"\n value={props.topology?.depth.toString()}\n tooltip={thresholds.depth.explanation}\n />\n </>\n )\n}\n\nexport default TopologyStats\n","import { ReactElement, useContext } from 'react'\nimport { Button } from '@material-ui/core'\n\nimport TroubleshootConnectionCard from '../../components/TroubleshootConnectionCard'\nimport { Context as BeeContext } from '../../providers/Bee'\nimport ExpandableList from '../../components/ExpandableList'\nimport ExpandableListItem from '../../components/ExpandableListItem'\nimport ExpandableListItemKey from '../../components/ExpandableListItemKey'\nimport TopologyStats from '../../components/TopologyStats'\n\nexport default function Status(): ReactElement {\n const {\n status,\n latestUserVersion,\n isLatestBeeVersion,\n latestBeeVersionUrl,\n topology,\n nodeAddresses,\n chequebookAddress,\n } = useContext(BeeContext)\n\n if (!status.all) return <TroubleshootConnectionCard />\n\n return (\n <div>\n <ExpandableList label=\"Bee Node\" defaultOpen>\n <ExpandableListItem\n label=\"Agent\"\n value={\n <div>\n <a href=\"https://github.com/ethersphere/bee\" rel=\"noreferrer\" target=\"_blank\">\n Bee\n </a>\n {` ${latestUserVersion || '-'} `}\n <Button size=\"small\" variant=\"outlined\" href={latestBeeVersionUrl} target=\"_blank\">\n {isLatestBeeVersion ? 'latest' : 'update'}\n </Button>\n </div>\n }\n />\n <ExpandableListItemKey label=\"Public key\" value={nodeAddresses?.publicKey || ''} />\n <ExpandableListItemKey label=\"PSS public key\" value={nodeAddresses?.pssPublicKey || ''} />\n <ExpandableListItemKey label=\"Overlay address (Peer ID)\" value={nodeAddresses?.overlay || ''} />\n\n <ExpandableList level={1} label=\"Underlay addresses\">\n {nodeAddresses?.underlay.map(addr => (\n <ExpandableListItem key={addr} value={addr} />\n ))}\n </ExpandableList>\n </ExpandableList>\n <ExpandableList label=\"Blockchain\" defaultOpen>\n <ExpandableListItemKey label=\"Ethereum address\" value={nodeAddresses?.ethereum || ''} />\n <ExpandableListItemKey label=\"Chequebook contract address\" value={chequebookAddress?.chequebookAddress || ''} />\n </ExpandableList>\n <ExpandableList label=\"Connectivity\" defaultOpen>\n <TopologyStats topology={topology} />\n </ExpandableList>\n </div>\n )\n}\n","import React, { ReactElement, ReactNode } from 'react'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport { Tab, Tabs } from '@material-ui/core'\n\ninterface TabPanelProps {\n children?: ReactNode\n index: number\n value: number\n}\n\nfunction TabPanel(props: TabPanelProps) {\n const { children, value, index, ...other } = props\n\n return (\n <div role=\"tabpanel\" hidden={value !== index} {...other}>\n {value === index && children}\n </div>\n )\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n flexGrow: 1,\n },\n content: {\n marginTop: theme.spacing(2),\n },\n }),\n)\n\ninterface TabsValues {\n component: ReactNode\n label: ReactNode\n}\n\ninterface Props {\n values: TabsValues[]\n index?: number\n indexChanged?: (index: number) => void\n}\n\nexport default function SimpleTabs({ values, index, indexChanged }: Props): ReactElement {\n const classes = useStyles()\n const [value, setValue] = React.useState<number>(index || 0)\n\n const handleChange = (event: React.ChangeEvent<Record<string, never>>, newValue: number) => {\n if (indexChanged) indexChanged(newValue)\n else setValue(newValue)\n }\n\n const v = index !== undefined ? index : value\n\n return (\n <div className={classes.root}>\n <Tabs value={v} onChange={handleChange} variant=\"fullWidth\">\n {values.map(({ label }, idx) => (\n <Tab key={idx} label={label} />\n ))}\n </Tabs>\n <div className={classes.content}>\n {values.map(({ component }, idx) => (\n <TabPanel key={idx} value={v} index={idx}>\n {component}\n </TabPanel>\n ))}\n </div>\n </div>\n )\n}\n","import { createContext, ReactChild, ReactElement, useState, useEffect } from 'react'\n\n// These need to be numeric values as they are used as indexes in the TabsContainer\nexport enum Platforms {\n macOS = 0,\n Linux,\n Windows,\n iOS,\n Android,\n}\n\nexport enum SupportedPlatforms {\n macOS = Platforms.macOS,\n Linux = Platforms.Linux,\n}\n\ninterface ContextInterface {\n platform: SupportedPlatforms\n setPlatform: (platform: SupportedPlatforms) => void\n}\n\nconst initialValues: ContextInterface = {\n platform: SupportedPlatforms.macOS,\n setPlatform: () => {}, // eslint-disable-line\n}\n\nexport const Context = createContext<ContextInterface>(initialValues)\nexport const Consumer = Context.Consumer\n\ninterface Props {\n children: ReactChild\n}\n\nfunction isSupportedPlatform(platform: unknown): platform is SupportedPlatforms {\n return Object.keys(SupportedPlatforms).includes(platform as string)\n}\n\nfunction getOS(): Platforms | null {\n const userAgent = window.navigator.userAgent\n const platform = window.navigator.platform\n const macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K']\n const windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE']\n const iosPlatforms = ['iPhone', 'iPad', 'iPod']\n\n if (macosPlatforms.includes(platform)) return Platforms.macOS\n\n if (iosPlatforms.includes(platform)) return Platforms.iOS\n\n if (windowsPlatforms.includes(platform)) return Platforms.Windows\n\n if (/Android/.test(userAgent)) return Platforms.Android\n\n if (/Linux/.test(platform)) return Platforms.Linux\n\n return null\n}\n\nexport function Provider({ children }: Props): ReactElement {\n const [platform, setPlatform] = useState<SupportedPlatforms>(SupportedPlatforms.Linux)\n\n // This is in useEffect as it really just needs to run once and not on each re-render\n useEffect(() => {\n const os = getOS()\n\n setPlatform(isSupportedPlatform(os) ? os : SupportedPlatforms.Linux)\n }, [])\n\n return <Context.Provider value={{ platform, setPlatform }}>{children}</Context.Provider>\n}\n","import type { ReactElement } from 'react'\nimport SyntaxHighlighter from 'react-syntax-highlighter'\n\ninterface Props {\n code: string\n language: string\n showLineNumbers?: boolean\n}\n\nconst CodeBlock = (props: Props): ReactElement => {\n return (\n <div style={{ textAlign: 'left' }}>\n <SyntaxHighlighter language={props.language} showLineNumbers={props.showLineNumbers}>\n {props.code}\n </SyntaxHighlighter>\n </div>\n )\n}\n\nexport default CodeBlock\n","import { ReactElement, useContext } from 'react'\nimport TabsContainer from './TabsContainer'\nimport CodeBlock from './CodeBlock'\nimport { Context } from '../providers/Platform'\n\ninterface Props {\n linux: string\n mac: string\n showLineNumbers?: boolean\n}\n\nexport default function CodeBlockTabs(props: Props): ReactElement {\n const { platform, setPlatform } = useContext(Context)\n\n return (\n <TabsContainer\n index={platform}\n indexChanged={setPlatform}\n values={[\n {\n label: 'Linux',\n component: <CodeBlock showLineNumbers={props.showLineNumbers} language=\"bash\" code={props.linux} />,\n },\n {\n label: 'macOS',\n component: <CodeBlock showLineNumbers={props.showLineNumbers} language=\"bash\" code={props.mac} />,\n },\n ]}\n />\n )\n}\n","import { ReactElement, ReactNode } from 'react'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport { Grid } from '@material-ui/core'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n action: {\n marginTop: theme.spacing(0.75),\n marginBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n },\n }),\n)\n\ninterface Props {\n children: ReactNode | ReactNode[]\n}\n\nexport default function ExpandableListItemActions({ children }: Props): ReactElement | null {\n const classes = useStyles()\n\n if (Array.isArray(children)) {\n return (\n <Grid container direction=\"row\">\n {children.map((a, i) => (\n <Grid key={i} className={classes.action}>\n {a}\n </Grid>\n ))}\n </Grid>\n )\n }\n\n return (\n <Grid container direction=\"row\">\n <Grid className={classes.action}>{children}</Grid>\n </Grid>\n )\n}\n","import { ReactElement, ReactNode } from 'react'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport { Typography } from '@material-ui/core'\nimport ListItem from '@material-ui/core/ListItem'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n header: {\n backgroundColor: '#F7F7F7',\n marginBottom: theme.spacing(0.25),\n },\n typography: {\n color: '#242424',\n },\n }),\n)\n\ninterface Props {\n children?: ReactNode | ReactNode[]\n}\n\nexport default function ExpandableListItemNote({ children }: Props): ReactElement | null {\n const classes = useStyles()\n\n return (\n <ListItem className={classes.header}>\n <Typography variant=\"body1\" className={classes.typography}>\n {children}\n </Typography>\n </ListItem>\n )\n}\n","import { ReactElement, ChangeEvent, useState } from 'react'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport Collapse from '@material-ui/core/Collapse'\nimport { ListItem, Typography, Grid, IconButton, InputBase, Button } from '@material-ui/core'\nimport { Edit, Minus, RotateCcw, Check } from 'react-feather'\n\nimport ExpandableListItemActions from './ExpandableListItemActions'\nimport ExpandableListItemNote from './ExpandableListItemNote'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n header: {\n backgroundColor: theme.palette.background.paper,\n marginBottom: theme.spacing(0.25),\n borderLeft: `${theme.spacing(0.25)}px solid rgba(0,0,0,0)`,\n wordBreak: 'break-word',\n },\n headerOpen: {\n borderLeft: `${theme.spacing(0.25)}px solid ${theme.palette.primary.main}`,\n },\n copyValue: {\n cursor: 'pointer',\n padding: theme.spacing(1),\n borderRadius: 0,\n '&:hover': {\n backgroundColor: '#fcf2e8',\n color: theme.palette.primary.main,\n },\n },\n content: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n keyMargin: {\n marginRight: theme.spacing(1),\n },\n unselectableLabel: {\n cursor: 'default',\n userSelect: 'none',\n // Many browsers don't support yet the general user-select css property\n WebkitUserSelect: 'none',\n MozUserSelect: 'none',\n msUserSelect: 'none',\n },\n }),\n)\n\ninterface Props {\n label: string\n value?: string\n placeholder?: string\n helperText?: string\n expandedOnly?: boolean\n confirmLabel?: string\n confirmLabelDisabled?: boolean\n onChange?: (value: string) => void\n onConfirm: (value: string) => void\n}\n\nexport default function ExpandableListItemKey({\n label,\n value,\n onConfirm,\n onChange,\n confirmLabel,\n confirmLabelDisabled,\n expandedOnly,\n helperText,\n placeholder,\n}: Props): ReactElement | null {\n const classes = useStyles()\n const [open, setOpen] = useState(Boolean(expandedOnly))\n const [inputValue, setInputValue] = useState<string>(value || '')\n const toggleOpen = () => setOpen(!open)\n const handleChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n setInputValue(e.target.value)\n\n if (onChange) onChange(e.target.value)\n }\n\n return (\n <>\n <ListItem className={`${classes.header} ${open ? classes.headerOpen : ''}`}>\n <Grid container direction=\"column\" justifyContent=\"space-between\" alignItems=\"stretch\">\n <Grid container direction=\"row\" justifyContent=\"space-between\" alignItems=\"center\">\n {label && (\n <Typography variant=\"body1\" className={classes.unselectableLabel}>\n {label}\n </Typography>\n )}\n <Typography variant=\"body2\">\n <div>\n {!open && value}\n {!expandedOnly && (\n <IconButton size=\"small\" className={classes.copyValue}>\n {open ? (\n <Minus onClick={toggleOpen} strokeWidth={1} />\n ) : (\n <Edit onClick={toggleOpen} strokeWidth={1} />\n )}\n </IconButton>\n )}\n </div>\n </Typography>\n </Grid>\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <InputBase\n value={inputValue}\n placeholder={placeholder}\n onChange={handleChange}\n fullWidth\n className={classes.content}\n autoFocus\n />\n </Collapse>\n </Grid>\n </ListItem>\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n {helperText && <ExpandableListItemNote>{helperText}</ExpandableListItemNote>}\n <ExpandableListItemActions>\n <Button\n variant=\"contained\"\n disabled={\n inputValue === value ||\n Boolean(confirmLabelDisabled) || // Disable if external validation is provided\n (inputValue === '' && value === undefined) // Disable if no initial value was not provided and the field is empty. The undefined check is improtant so that it is possible to submit with empty input in other cases\n }\n startIcon={<Check size=\"1rem\" />}\n onClick={() => onConfirm(inputValue)}\n >\n {confirmLabel || 'Save'}\n </Button>\n <Button\n variant=\"contained\"\n disabled={inputValue === value || inputValue === ''}\n startIcon={<RotateCcw size=\"1rem\" />}\n onClick={() => setInputValue(value || '')}\n >\n Cancel\n </Button>\n </ExpandableListItemActions>\n </Collapse>\n </>\n )\n}\n","import type { ReactElement } from 'react'\nimport { CircularProgress } from '@material-ui/core'\n\ninterface Props {\n isOk: boolean\n isLoading?: boolean\n size?: number | string\n className?: string\n}\n\nexport default function StatusIcon({ isOk, size, className, isLoading }: Props): ReactElement {\n const s = size || '1rem'\n\n if (isLoading) return <CircularProgress size={s} className={className} />\n\n return (\n <span\n className={className}\n style={{\n backgroundColor: isOk ? '#1de600' : '#ff3a52',\n height: s,\n width: s,\n borderRadius: '50%',\n display: 'inline-block',\n }}\n />\n )\n}\n","import { ReactElement, useContext } from 'react'\nimport MuiAlert from '@material-ui/lab/Alert'\n\nimport CodeBlockTabs from '../../../components/CodeBlockTabs'\nimport ExpandableList from '../../../components/ExpandableList'\nimport ExpandableListItem from '../../../components/ExpandableListItem'\nimport ExpandableListItemInput from '../../../components/ExpandableListItemInput'\nimport ExpandableListItemNote from '../../../components/ExpandableListItemNote'\nimport StatusIcon from '../../../components/StatusIcon'\nimport { Context as SettingsContext } from '../../../providers/Settings'\nimport { Context } from '../../../providers/Bee'\n\nexport default function NodeConnectionCheck(): ReactElement | null {\n const { status, isLoading } = useContext(Context)\n const { setDebugApiUrl, apiDebugUrl } = useContext(SettingsContext)\n const isOk = status.debugApiConnection\n\n return (\n <ExpandableList\n label={\n <>\n <StatusIcon isOk={isOk} isLoading={isLoading} /> Connection to Bee Debug API\n </>\n }\n >\n <ExpandableListItemNote>\n {isOk\n ? 'The connection to the Bee nodes deug API has been successful'\n : 'We cannot connect to your nodes debug API. Please check the following to troubleshoot your issue.'}\n </ExpandableListItemNote>\n <ExpandableListItemInput label=\"Bee Debug API\" value={apiDebugUrl} onConfirm={setDebugApiUrl} />\n\n {!isOk && (\n <ExpandableList level={1} label=\"Troubleshoot\">\n <ExpandableListItem\n label={\n <ol>\n <li>Check the status of your node by running the below command to see if your node is running.</li>\n <CodeBlockTabs showLineNumbers linux={`sudo systemctl status bee`} mac={`brew services list`} />\n <li>\n If your node is running, check your firewall settings to make sure that port 1635 (or your custom\n specified port) is bound to localhost. If your node is not running try executing the below command to\n start your bee node\n </li>\n <MuiAlert\n style={{ marginTop: '10px', marginBottom: '10px' }}\n elevation={6}\n variant=\"filled\"\n severity=\"error\"\n >\n Your debug node API should never be completely open to the internet. If you want to connect remotely,\n make sure your firewall settings are set to only allow specific trusted IP addresses and block all\n other ports. A simple google search for &quot;what is my ip&quot; will show you your computers public\n IP address to allow.\n </MuiAlert>\n <CodeBlockTabs\n showLineNumbers\n linux={`sudo systemctl start bee`}\n mac={`brew services start swarm-bee`}\n />\n <li>Run the commands to validate your node is running and see the log output.</li>\n <CodeBlockTabs\n showLineNumbers\n linux={`sudo systemctl status bee \\njournalctl --lines=100 --follow --unit bee`}\n mac={`brew services list \\ntail -f /usr/local/var/log/swarm-bee/bee.log`}\n />\n <li>\n Lastly, check your nodes configuration settings to validate the debug API is enabled and the Cross\n Origin Resource Sharing (CORS) setting is configured to allow your host. Config parameter{' '}\n <strong>debug-api-enable</strong> must be set to <strong>true</strong> and{' '}\n <strong>cors-allowed-origins</strong> must be set to your host domain or IP (you can also use the\n wildcard <code>{\"cors-allowed-origins: ['*']\"}</code>). If edits are made to the configuration run the\n restart command below for changes to take effect.\n </li>\n <CodeBlockTabs\n showLineNumbers\n linux={`sudo vi /etc/bee/bee.yaml\\nsudo systemctl restart bee`}\n mac={`sudo vi /usr/local/etc/swarm-bee/bee.yaml \\nbrew services restart swarm-bee`}\n />\n </ol>\n }\n />\n </ExpandableList>\n )}\n </ExpandableList>\n )\n}\n","import { ReactElement, useContext } from 'react'\n\nimport CodeBlockTabs from '../../../components/CodeBlockTabs'\nimport { Context as SettingsContext } from '../../../providers/Settings'\nimport ExpandableList from '../../../components/ExpandableList'\nimport ExpandableListItem from '../../../components/ExpandableListItem'\nimport ExpandableListItemNote from '../../../components/ExpandableListItemNote'\nimport ExpandableListItemInput from '../../../components/ExpandableListItemInput'\nimport StatusIcon from '../../../components/StatusIcon'\nimport { Context } from '../../../providers/Bee'\n\nexport default function NodeConnectionCheck(): ReactElement | null {\n const { setApiUrl, apiUrl } = useContext(SettingsContext)\n const { status, isLoading } = useContext(Context)\n const isOk = status.apiConnection\n\n return (\n <ExpandableList\n label={\n <>\n <StatusIcon isOk={isOk} isLoading={isLoading} /> Connection to Bee API\n </>\n }\n >\n <ExpandableListItemNote>\n {isOk\n ? 'The connection to the Bee nodes API has been successful'\n : 'Could not connect to your Bee nodes API. Please check the troubleshoot below on how you may resolve it.'}\n </ExpandableListItemNote>\n <ExpandableListItemInput label=\"Bee API\" value={apiUrl} onConfirm={setApiUrl} />\n {!isOk && (\n <ExpandableList level={1} label=\"Troubleshoot\">\n <ExpandableListItem\n label={\n <ol>\n <li>Check the status of your node by running the below command to see if your node is running.</li>\n <CodeBlockTabs showLineNumbers linux={`sudo systemctl status bee`} mac={`brew services list`} />\n <li>\n If your node is running, check your firewall settings to make sure that port 1633 (or your custom\n specified port) is exposed to the internet. If your node is not running try executing the below\n command to start your bee node\n </li>\n <CodeBlockTabs\n showLineNumbers\n linux={`sudo systemctl start bee`}\n mac={`brew services start swarm-bee`}\n />\n <li>Run the commands to validate your node is running and see the log output.</li>\n <CodeBlockTabs\n showLineNumbers\n linux={`sudo systemctl status bee \\njournalctl --lines=100 --follow --unit bee`}\n mac={`brew services list \\ntail -f /usr/local/var/log/swarm-bee/bee.log`}\n />\n </ol>\n }\n />\n </ExpandableList>\n )}\n </ExpandableList>\n )\n}\n","import { ReactElement, useContext } from 'react'\nimport CodeBlockTabs from '../../../components/CodeBlockTabs'\nimport ExpandableList from '../../../components/ExpandableList'\nimport ExpandableListItem from '../../../components/ExpandableListItem'\nimport ExpandableListItemNote from '../../../components/ExpandableListItemNote'\nimport StatusIcon from '../../../components/StatusIcon'\nimport { Context } from '../../../providers/Bee'\n\nexport default function VersionCheck(): ReactElement | null {\n const { status, isLoading, latestUserVersion, latestPublishedVersion, latestBeeVersionUrl } = useContext(Context)\n const isOk = status.version\n\n return (\n <ExpandableList\n label={\n <>\n <StatusIcon isOk={isOk} isLoading={isLoading} /> Bee Version\n </>\n }\n >\n <ExpandableListItemNote>\n {isOk ? (\n 'You are running the latest version of Bee.'\n ) : (\n <>\n Your Bee version is out of date. Please update to the{' '}\n <a href={latestBeeVersionUrl} rel=\"noreferrer\" target=\"_blank\">\n latest\n </a>{' '}\n before continuing. Rerun the installation script below to upgrade. For more information please see the{' '}\n <a href=\"https://docs.ethswarm.org/docs/installation/manual#upgrading-bee\" rel=\"noreferrer\" target=\"_blank\">\n Docs\n </a>\n .\n <CodeBlockTabs\n showLineNumbers\n linux={`bee version\\nwget https://github.com/ethersphere/bee/releases/download/${latestPublishedVersion}/bee_${latestPublishedVersion}_amd64.deb\\nsudo dpkg -i bee_${latestPublishedVersion}_amd64.deb`}\n mac={`bee version\\nbrew tap ethersphere/tap\\nbrew install swarm-bee\\nbrew services start swarm-bee`}\n />\n </>\n )}\n </ExpandableListItemNote>\n <ExpandableListItem label=\"Your Version\" value={latestUserVersion || '-'} />\n <ExpandableListItem label=\"Latest Version\" value={latestPublishedVersion || '-'} />\n </ExpandableList>\n )\n}\n","import { ReactElement, useContext } from 'react'\nimport ExpandableList from '../../../components/ExpandableList'\nimport ExpandableListItemKey from '../../../components/ExpandableListItemKey'\nimport ExpandableListItemNote from '../../../components/ExpandableListItemNote'\nimport StatusIcon from '../../../components/StatusIcon'\nimport { Context } from '../../../providers/Bee'\n\nexport default function EthereumConnectionCheck(): ReactElement | null {\n const { status, isLoading, nodeAddresses } = useContext(Context)\n const isOk = status.blockchainConnection\n\n return (\n <ExpandableList\n label={\n <>\n <StatusIcon isOk={isOk} isLoading={isLoading} /> Connection to Blockchain\n </>\n }\n >\n <ExpandableListItemNote>\n {isOk ? (\n 'Your node is connected to the xDai blockchain'\n ) : (\n <>\n Your Bee node must have access to the xDai blockchain, so that it can interact and deploy your chequebook\n contract. You can run{' '}\n <a href=\"https://www.xdaichain.com/\" rel=\"noreferrer\" target=\"_blank\">\n your own xDai node\n </a>\n , or use a provider instead - we recommend{' '}\n <a href=\"https://getblock.io/\" rel=\"noreferrer\" target=\"_blank\">\n Getblock\n </a>\n . By default, Bee expects a local node at http://localhost:8545. To use a provider instead, simply change\n the <strong>swap-endpoint</strong> in your configuration file.\n </>\n )}\n </ExpandableListItemNote>\n {nodeAddresses?.ethereum && <ExpandableListItemKey label=\"Ethereum Address\" value={nodeAddresses?.ethereum} />}\n </ExpandableList>\n )\n}\n","import { ReactElement, ReactNode, useState } from 'react'\nimport Button from '@material-ui/core/Button'\nimport Input from '@material-ui/core/Input'\nimport Dialog from '@material-ui/core/Dialog'\nimport DialogActions from '@material-ui/core/DialogActions'\nimport DialogContent from '@material-ui/core/DialogContent'\nimport DialogContentText from '@material-ui/core/DialogContentText'\nimport DialogTitle from '@material-ui/core/DialogTitle'\nimport FormHelperText from '@material-ui/core/FormHelperText'\nimport { Token } from '../models/Token'\nimport type { BigNumber } from 'bignumber.js'\nimport { useSnackbar } from 'notistack'\n\ninterface Props {\n successMessage: string\n errorMessage: string\n dialogMessage: string\n label: string\n max?: BigNumber\n min?: BigNumber\n action: (amount: bigint) => Promise<string>\n icon?: ReactNode\n}\n\nexport default function WithdrawDepositModal({\n successMessage,\n errorMessage,\n dialogMessage,\n min,\n max,\n label,\n action,\n icon,\n}: Props): ReactElement {\n const [open, setOpen] = useState(false)\n const [amount, setAmount] = useState('')\n const [amountToken, setAmountToken] = useState<Token | null>(null)\n const [amountError, setAmountError] = useState<Error | null>(null)\n const { enqueueSnackbar } = useSnackbar()\n\n const handleClickOpen = (e: React.MouseEvent<HTMLButtonElement>) => {\n setOpen(true)\n e.stopPropagation()\n }\n\n const handleClose = () => {\n setOpen(false)\n }\n\n const handleAction = async () => {\n if (amountToken === null) return\n\n try {\n const transactionHash = await action(amountToken.toBigInt as bigint)\n setOpen(false)\n enqueueSnackbar(`${successMessage} Transaction ${transactionHash}`, { variant: 'success' })\n } catch (e) {\n enqueueSnackbar(`${errorMessage} Error: ${e.message}`, { variant: 'error' })\n }\n }\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => {\n const value = e.target.value\n setAmount(value)\n setAmountError(null)\n try {\n const t = Token.fromDecimal(value)\n setAmountToken(t)\n\n if (min && t.toDecimal.isLessThan(min)) setAmountError(new Error(`Needs to be more than ${min}`))\n\n if (max && t.toDecimal.isGreaterThan(max)) setAmountError(new Error(`Needs to be less than ${max}`))\n } catch (e) {\n setAmountError(e)\n }\n }\n\n return (\n <div>\n <Button variant=\"contained\" onClick={handleClickOpen} startIcon={icon}>\n {label}\n </Button>\n <Dialog open={open} onClose={handleClose} aria-labelledby=\"form-dialog-title\">\n <DialogTitle id=\"form-dialog-title\">{label}</DialogTitle>\n <DialogContent>\n <DialogContentText>{dialogMessage}</DialogContentText>\n <Input\n autoFocus\n margin=\"dense\"\n id=\"name\"\n type=\"text\"\n placeholder=\"Amount\"\n fullWidth\n value={amount}\n onChange={handleChange}\n />\n {amountError && (\n <FormHelperText error>\n Please provide valid BZZ amount (max 16 decimals). Error: {amountError.message}\n </FormHelperText>\n )}\n </DialogContent>\n <DialogActions>\n <Button onClick={handleClose} color=\"primary\">\n Cancel\n </Button>\n <Button onClick={handleAction} color=\"primary\">\n {label}\n </Button>\n </DialogActions>\n </Dialog>\n </div>\n )\n}\n","import { ReactElement, useContext } from 'react'\nimport { Download } from 'react-feather'\nimport { Context as SettingsContext } from '../providers/Settings'\n\nimport WithdrawDepositModal from '../components/WithdrawDepositModal'\nimport { BigNumber } from 'bignumber.js'\n\nexport default function DepositModal(): ReactElement {\n const { beeDebugApi } = useContext(SettingsContext)\n\n return (\n <WithdrawDepositModal\n successMessage=\"Successful deposit.\"\n errorMessage=\"Error with depositing\"\n dialogMessage=\"Specify the amount of BZZ you would like to deposit to your node.\"\n label=\"Deposit\"\n icon={<Download size=\"1rem\" />}\n min={new BigNumber(0)}\n action={(amount: bigint) => {\n if (!beeDebugApi) throw new Error('Bee Debug URL is not valid')\n\n return beeDebugApi.depositTokens(amount.toString())\n }}\n />\n )\n}\n","import { useContext } from 'react'\nimport DepositModal from '../../../containers/DepositModal'\nimport type { ReactElement } from 'react'\nimport ExpandableList from '../../../components/ExpandableList'\nimport ExpandableListItemKey from '../../../components/ExpandableListItemKey'\nimport ExpandableListItemActions from '../../../components/ExpandableListItemActions'\nimport ExpandableListItemNote from '../../../components/ExpandableListItemNote'\nimport StatusIcon from '../../../components/StatusIcon'\nimport { Context } from '../../../providers/Bee'\n\nconst ChequebookDeployFund = (): ReactElement | null => {\n const { status, isLoading, chequebookAddress } = useContext(Context)\n const isOk = status.chequebook\n\n return (\n <ExpandableList\n label={\n <>\n <StatusIcon isOk={isOk} isLoading={isLoading} /> Chequebook Deployment & Funding\n </>\n }\n >\n <ExpandableListItemNote>\n {isOk ? (\n 'Your chequebook is deployed and funded'\n ) : (\n <>\n Your chequebook is either not deployed or funded. To run the node you will need xDAI and xBZZ on the xDai\n network. You may need to aquire BZZ (e.g. <a href=\"https://bzz.exchange/\">bzz.exchange</a>) and bridge it to\n the xDai network through the <a href=\"https://omni.xdaichain.com/bridge\">omni bridge</a>. To pay the\n transaction fees, you will also need xDAI token. You can purchase DAI on the network and bridge it to xDai\n network through the <a href=\"https://bridge.xdaichain.com/\">xDai Bridge</a>. See the{' '}\n <a href=\"https://www.xdaichain.com/#xdai-stable-chain\">official xDai website</a> for more information.\n </>\n )}\n </ExpandableListItemNote>\n {chequebookAddress && (\n <>\n <ExpandableListItemKey label=\"Chequebook Address\" value={chequebookAddress.chequebookAddress} />\n <ExpandableListItemActions>\n <DepositModal />\n </ExpandableListItemActions>\n </>\n )}\n </ExpandableList>\n )\n}\n\nexport default ChequebookDeployFund\n","import { ReactElement, useContext } from 'react'\nimport ExpandableList from '../../../components/ExpandableList'\nimport ExpandableListItemNote from '../../../components/ExpandableListItemNote'\nimport TopologyStats from '../../../components/TopologyStats'\nimport StatusIcon from '../../../components/StatusIcon'\nimport { Context } from '../../../providers/Bee'\n\nexport default function PeerConnection(): ReactElement | null {\n const { status, isLoading, topology } = useContext(Context)\n const isOk = status.topology\n\n return (\n <ExpandableList\n label={\n <>\n <StatusIcon isOk={isOk} isLoading={isLoading} /> Connection to Peers\n </>\n }\n >\n <ExpandableListItemNote>\n {isOk\n ? 'You are connected to other Bee nodes'\n : 'Your node is not connected to any peers. Please wait a bit if you just started the node, otherwise review your configuration file.'}\n </ExpandableListItemNote>\n\n <TopologyStats topology={topology} />\n </ExpandableList>\n )\n}\n","import type { ReactElement } from 'react'\n\nimport DebugConnectionCheck from './SetupSteps/DebugConnectionCheck'\nimport NodeConnectionCheck from './SetupSteps/NodeConnectionCheck'\nimport VersionCheck from './SetupSteps/VersionCheck'\nimport EthereumConnectionCheck from './SetupSteps/EthereumConnectionCheck'\nimport ChequebookDeployFund from './SetupSteps/ChequebookDeployFund'\nimport PeerConnection from './SetupSteps/PeerConnection'\n\nexport default function NodeSetupWorkflow(): ReactElement {\n return (\n <div>\n <DebugConnectionCheck />\n <VersionCheck />\n <EthereumConnectionCheck />\n <ChequebookDeployFund />\n <NodeConnectionCheck />\n <PeerConnection />\n </div>\n )\n}\n","import { ReactElement, useState, useContext } from 'react'\nimport { Context as SettingsContext } from '../../providers/Settings'\nimport ExpandableListItemInput from '../../components/ExpandableListItemInput'\nimport { Utils } from '@ethersphere/bee-js'\n\nexport default function Files(): ReactElement {\n const { apiUrl } = useContext(SettingsContext)\n\n const [referenceError, setReferenceError] = useState<string | undefined>(undefined)\n\n const validateChange = (value: string) => {\n if (Utils.isHexString(value, 64) || Utils.isHexString(value, 128)) setReferenceError(undefined)\n else setReferenceError('Incorrect format of swarm hash. Expected 64 or 128 hexstring characters.')\n }\n\n return (\n <ExpandableListItemInput\n label=\"Swarm Hash\"\n onConfirm={value => window.open(`${apiUrl}/bzz/${value}`, '_blank')}\n onChange={validateChange}\n helperText={referenceError}\n confirmLabel={'Download'}\n confirmLabelDisabled={Boolean(referenceError)}\n placeholder=\"e.g. 31fb0362b1a42536134c86bc58b97ac0244e5c6630beec3e27c2d1cecb38c605\"\n expandedOnly\n />\n )\n}\n","import Collapse from '@material-ui/core/Collapse'\nimport { createStyles, makeStyles, Theme } from '@material-ui/core/styles'\nimport { Alert, AlertTitle } from '@material-ui/lab'\nimport { ReactElement } from 'react'\n\nconst LIMIT = 100_000_000 // 100 megabytes\n\ninterface Props {\n file: File\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n width: '100%',\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n },\n }),\n)\n\nexport default function UploadSizeAlert(props: Props): ReactElement | null {\n const classes = useStyles()\n\n const aboveLimit = props.file.size >= LIMIT\n\n return (\n <Collapse in={aboveLimit}>\n <div className={classes.root}>\n <Alert severity=\"warning\">\n <AlertTitle>Warning</AlertTitle>\n The file you are trying to upload is above the recommended size. The chunks may not be synchronised properly\n over the network.\n </Alert>\n </div>\n </Collapse>\n )\n}\n","import type { ReactElement } from 'react'\nimport IconButton from '@material-ui/core/IconButton'\nimport { CopyToClipboard } from 'react-copy-to-clipboard'\nimport { Clipboard } from 'react-feather'\nimport { useSnackbar } from 'notistack'\n\ninterface Props {\n value: string\n}\n\nexport default function ClipboardCopy({ value }: Props): ReactElement {\n const { enqueueSnackbar } = useSnackbar()\n const handleCopy = () => enqueueSnackbar(`Copied: ${value}`, { variant: 'success' })\n\n return (\n <div style={{ marginRight: '3px', marginLeft: '3px' }}>\n <IconButton color=\"primary\" size=\"small\" onClick={handleCopy}>\n <CopyToClipboard text={value}>\n <Clipboard style={{ height: '20px' }} />\n </CopyToClipboard>\n </IconButton>\n </div>\n )\n}\n","import { PostageBatch } from '@ethersphere/bee-js'\nimport { createContext, ReactChild, ReactElement, useEffect, useState, useContext } from 'react'\nimport { Context as SettingsContext } from './Settings'\n\nexport interface EnrichedPostageBatch extends PostageBatch {\n usage: number\n usageText: string\n}\n\ninterface ContextInterface {\n stamps: EnrichedPostageBatch[] | null\n error: Error | null\n isLoading: boolean\n lastUpdate: number | null\n start: (frequency?: number) => void\n stop: () => void\n refresh: () => Promise<void>\n}\n\nconst initialValues: ContextInterface = {\n stamps: null,\n error: null,\n isLoading: false,\n lastUpdate: null,\n start: () => {}, // eslint-disable-line\n stop: () => {}, // eslint-disable-line\n refresh: () => Promise.reject(),\n}\n\nexport const Context = createContext<ContextInterface>(initialValues)\nexport const Consumer = Context.Consumer\n\ninterface Props {\n children: ReactChild\n}\n\nfunction enrichStamp(postageBatch: PostageBatch): EnrichedPostageBatch {\n const { depth, bucketDepth, utilization } = postageBatch\n\n const usage = utilization / Math.pow(2, depth - bucketDepth)\n const usageText = `${Math.ceil(usage * 100)}%`\n\n return {\n ...postageBatch,\n usage,\n usageText,\n }\n}\n\nexport function Provider({ children }: Props): ReactElement {\n const { beeApi } = useContext(SettingsContext)\n const [stamps, setStamps] = useState<EnrichedPostageBatch[] | null>(initialValues.stamps)\n const [error, setError] = useState<Error | null>(initialValues.error)\n const [isLoading, setIsLoading] = useState<boolean>(initialValues.isLoading)\n const [lastUpdate, setLastUpdate] = useState<number | null>(initialValues.lastUpdate)\n const [frequency, setFrequency] = useState<number | null>(null)\n\n const refresh = async () => {\n // Don't want to refresh when already refreshing\n if (isLoading) return\n\n if (!beeApi) return\n\n try {\n setIsLoading(true)\n const stamps = await beeApi.getAllPostageBatch()\n\n setStamps(stamps.map(enrichStamp))\n setLastUpdate(Date.now())\n } catch (e) {\n setError(e)\n } finally {\n setIsLoading(false)\n }\n }\n\n const start = (freq = 30000) => setFrequency(freq)\n const stop = () => setFrequency(null)\n\n // Start the update loop\n useEffect(() => {\n refresh()\n\n // Start autorefresh only if the frequency is set\n if (frequency) {\n const interval = setInterval(refresh, frequency)\n\n return () => clearInterval(interval)\n }\n }, [frequency])\n\n return (\n <Context.Provider value={{ stamps, error, isLoading, lastUpdate, start, stop, refresh }}>\n {children}\n </Context.Provider>\n )\n}\n","import React, { ReactElement, useContext } from 'react'\nimport Button from '@material-ui/core/Button'\nimport Dialog from '@material-ui/core/Dialog'\nimport DialogActions from '@material-ui/core/DialogActions'\nimport DialogContent from '@material-ui/core/DialogContent'\nimport DialogContentText from '@material-ui/core/DialogContentText'\nimport CircularProgress from '@material-ui/core/CircularProgress'\nimport DialogTitle from '@material-ui/core/DialogTitle'\nimport BigNumber from 'bignumber.js'\nimport { FormikHelpers, Form, Field, Formik } from 'formik'\nimport { TextField } from 'formik-material-ui'\nimport { Context as SettingsContext } from '../../providers/Settings'\nimport { Context } from '../../providers/Stamps'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport { useSnackbar } from 'notistack'\n\ninterface FormValues {\n depth?: string\n amount?: string\n label?: string\n}\ntype FormErrors = Partial<FormValues>\nconst initialFormValues: FormValues = {\n depth: '',\n amount: '',\n label: '',\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n wrapper: {\n margin: theme.spacing(1),\n position: 'relative',\n },\n field: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n buttonProgress: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n marginTop: -12,\n marginBottom: -12,\n },\n }),\n)\n\ninterface Props {\n label?: string\n}\n\nexport default function FormDialog({ label }: Props): ReactElement {\n const classes = useStyles()\n const [open, setOpen] = React.useState(false)\n const { refresh } = useContext(Context)\n const { beeApi } = useContext(SettingsContext)\n const handleClickOpen = () => setOpen(true)\n const handleClose = () => setOpen(false)\n const { enqueueSnackbar } = useSnackbar()\n\n return (\n <Formik\n initialValues={initialFormValues}\n onSubmit={async (values: FormValues, actions: FormikHelpers<FormValues>) => {\n try {\n // This is really just a typeguard, the validation pretty much guarantees these will have the right values\n if (!values.depth || !values.amount) return\n\n if (!beeApi) return\n\n const amount = BigInt(values.amount)\n const depth = Number.parseInt(values.depth)\n const options = values.label ? { label: values.label } : undefined\n await beeApi.createPostageBatch(amount.toString(), depth, options)\n actions.resetForm()\n await refresh()\n handleClose()\n } catch (e) {\n enqueueSnackbar(`Error: ${e.message}`, { variant: 'error' })\n actions.setSubmitting(false)\n }\n }}\n validate={(values: FormValues) => {\n const errors: FormErrors = {}\n\n // Depth\n if (!values.depth) errors.depth = 'Required field'\n else {\n const depth = new BigNumber(values.depth)\n\n if (!depth.isInteger()) errors.depth = 'Depth must be an integer'\n else if (depth.isLessThan(16)) errors.depth = 'Minimal depth is 16'\n else if (depth.isGreaterThan(255)) errors.depth = 'Depth has to be at most 255'\n }\n\n // Amount\n if (!values.amount) errors.amount = 'Required field'\n else {\n const amount = new BigNumber(values.amount)\n\n if (!amount.isInteger()) errors.amount = 'Amount must be an integer'\n else if (amount.isLessThanOrEqualTo(0)) errors.amount = 'Amount must be greater than 0'\n }\n\n // Label\n if (values.label && !/^[0-9a-z]*$/i.test(values.label)) errors.label = 'Label must be an alphanumeric string'\n\n return errors\n }}\n >\n {({ submitForm, isValid, isSubmitting, values }) => (\n <Form>\n <Button variant=\"contained\" onClick={handleClickOpen}>\n {label || 'Buy Postage Stamp'}\n {isSubmitting && <CircularProgress size={24} className={classes.buttonProgress} />}\n </Button>\n <Dialog open={open} onClose={handleClose} aria-labelledby=\"form-dialog-title\">\n <DialogTitle id=\"form-dialog-title\">Purchase new postage stamp</DialogTitle>\n <DialogContent>\n <DialogContentText>\n Provide the depth, amount and optionally the label of the postage stamp. Please refer to the{' '}\n <a href=\"https://docs.ethswarm.org/docs/access-the-swarm/keep-your-data-alive\" target=\"blank\">\n official bee docs\n </a>{' '}\n to understand these values.\n </DialogContentText>\n <Field\n component={TextField}\n required\n name=\"depth\"\n autoFocus\n label=\"Depth\"\n fullWidth\n className={classes.field}\n />\n <Field component={TextField} required name=\"amount\" label=\"Amount\" fullWidth className={classes.field} />\n <Field component={TextField} name=\"label\" label=\"Label\" fullWidth className={classes.field} />\n </DialogContent>\n <DialogActions>\n <Button onClick={handleClose} variant=\"contained\">\n Cancel\n </Button>\n <div className={classes.wrapper}>\n <Button\n disabled={isSubmitting || !isValid || !values.amount || !values.depth}\n type=\"submit\"\n variant=\"contained\"\n onClick={submitForm}\n >\n Create\n {isSubmitting && <CircularProgress size={24} className={classes.buttonProgress} />}\n </Button>\n </div>\n </DialogActions>\n </Dialog>\n </Form>\n )}\n </Formik>\n )\n}\n","import React, { ReactElement } from 'react'\nimport { Button, ListItemIcon, Typography, Menu, MenuItem } from '@material-ui/core'\nimport { EnrichedPostageBatch } from '../../providers/Stamps'\n\ninterface Props {\n stamps: EnrichedPostageBatch[] | null\n selectedStamp: EnrichedPostageBatch | null\n setSelected: (stamp: EnrichedPostageBatch) => void\n}\n\nexport default function SimpleMenu({ stamps, selectedStamp, setSelected }: Props): ReactElement | null {\n const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null)\n\n if (!stamps) return null\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget)\n }\n\n const handleClose = () => setAnchorEl(null)\n\n return (\n <div>\n <Button variant=\"contained\" aria-haspopup=\"true\" onClick={handleClick}>\n Change\n </Button>\n <Menu anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>\n {stamps.map(stamp => (\n <MenuItem\n key={stamp.batchID}\n onClick={() => {\n setSelected(stamp)\n handleClose()\n }}\n selected={stamp.batchID === selectedStamp?.batchID}\n >\n <ListItemIcon>{stamp.usageText}</ListItemIcon>\n <Typography variant=\"body2\">{stamp.batchID.substr(0, 8)}[…]</Typography>\n </MenuItem>\n ))}\n </Menu>\n </div>\n )\n}\n","import { Button, CircularProgress, Container, Avatar, Chip, Typography } from '@material-ui/core'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport { DropzoneArea } from 'material-ui-dropzone'\nimport { useSnackbar } from 'notistack'\nimport { RotateCcw, Check } from 'react-feather'\nimport { ReactElement, useContext, useEffect, useState } from 'react'\nimport UploadSizeAlert from '../../components/AlertUploadSize'\nimport ClipboardCopy from '../../components/ClipboardCopy'\nimport { Context, EnrichedPostageBatch } from '../../providers/Stamps'\nimport { Context as SettingsContext } from '../../providers/Settings'\nimport CreatePostageStamp from '../stamps/CreatePostageStampModal'\nimport SelectStamp from './SelectStamp'\nimport ExpandableListItem from '../../components/ExpandableListItem'\nimport ExpandableListItemKey from '../../components/ExpandableListItemKey'\nimport ExpandableListItemNote from '../../components/ExpandableListItemNote'\nimport ExpandableListItemActions from '../../components/ExpandableListItemActions'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n content: { marginTop: theme.spacing(2) },\n loadingProgress: { textAlign: 'center', padding: '50px' },\n }),\n)\n\nconst MAX_FILE_SIZE = 1_000_000_000 // 1 gigabyte\n\nexport default function Files(): ReactElement {\n const classes = useStyles()\n const [dropzoneKey, setDropzoneKey] = useState(0)\n const [file, setFile] = useState<File | null>(null)\n const [uploadReference, setUploadReference] = useState('')\n const [isUploadingFile, setIsUploadingFile] = useState(false)\n\n const [selectedStamp, setSelectedStamp] = useState<EnrichedPostageBatch | null>(null)\n\n const { isLoading, error, stamps, refresh } = useContext(Context)\n const { beeApi } = useContext(SettingsContext)\n const { enqueueSnackbar } = useSnackbar()\n\n useEffect(() => {\n refresh()\n }, [])\n\n // Choose a postage stamp that has the lowest usage\n useEffect(() => {\n if (!selectedStamp && stamps && stamps.length > 0) {\n const stamp = stamps.reduce((prev, curr) => {\n if (curr.usage < prev.usage) return curr\n\n return prev\n }, stamps[0])\n\n setSelectedStamp(stamp)\n }\n }, [isLoading, error, stamps, selectedStamp])\n\n const uploadFile = () => {\n if (file === null || selectedStamp === null) return\n\n if (!beeApi) return\n\n setIsUploadingFile(true)\n beeApi\n .uploadFile(selectedStamp.batchID, file)\n .then(hash => setUploadReference(hash.reference))\n .catch(e => enqueueSnackbar(`Error uploading: ${e.message}`, { variant: 'error' }))\n .finally(() => setIsUploadingFile(false))\n }\n\n const uploadNew = () => {\n setTimeout(() => {\n setFile(null)\n setDropzoneKey(dropzoneKey + 1)\n setUploadReference('')\n }, 0)\n }\n\n const handleChange = (files?: File[]) => {\n setUploadReference('')\n\n if (files) {\n setFile(files[0])\n }\n }\n\n return (\n <>\n <DropzoneArea\n key={'dropzone-' + dropzoneKey}\n onChange={handleChange}\n filesLimit={1}\n maxFileSize={MAX_FILE_SIZE}\n />\n <div className={classes.content}>\n {/* We have file and can upload display stamp selection */}\n {file && !isUploadingFile && !uploadReference && (\n <>\n <ExpandableListItemNote>\n To upload this file to your node, you need a postage stamp. You can buy a new one or you can use an\n existing stamp (providing it’s sufficient for this file).\n </ExpandableListItemNote>\n {selectedStamp && (\n <ExpandableListItem\n label={\n <>\n Upload with Postage Stamp{' '}\n <Chip\n avatar={<Avatar>{selectedStamp.usageText}</Avatar>}\n label={<Typography variant=\"body2\">{selectedStamp.batchID.substr(0, 8)}[…]</Typography>}\n deleteIcon={<ClipboardCopy value={selectedStamp.batchID} />}\n onDelete={() => {} /* eslint-disable-line*/}\n variant=\"outlined\"\n />\n </>\n }\n value={<SelectStamp stamps={stamps} selectedStamp={selectedStamp} setSelected={setSelectedStamp} />}\n />\n )}\n {!selectedStamp && (\n <ExpandableListItemActions>\n <CreatePostageStamp />\n </ExpandableListItemActions>\n )}\n </>\n )}\n\n {/* We have file and can upload display upload button */}\n {file && !uploadReference && (\n <>\n <ExpandableListItemActions>\n <Button\n variant=\"contained\"\n disabled={!file && isUploadingFile && !selectedStamp}\n onClick={() => uploadFile()}\n startIcon={<Check size=\"1rem\" />}\n >\n Upload\n </Button>\n {isUploadingFile && (\n <Container className={classes.loadingProgress}>\n <CircularProgress />\n </Container>\n )}\n </ExpandableListItemActions>\n <UploadSizeAlert file={file} />\n </>\n )}\n\n {/* File has already been uploaded */}\n {uploadReference && (\n <>\n <ExpandableListItemKey label=\"Swarm Reference\" value={uploadReference} />\n <ExpandableListItemActions>\n <Button variant=\"contained\" onClick={uploadNew} startIcon={<RotateCcw size=\"1rem\" />}>\n Upload New File\n </Button>\n </ExpandableListItemActions>\n </>\n )}\n </div>\n </>\n )\n}\n","import { ReactElement, useContext } from 'react'\n\nimport Download from './Download'\nimport Upload from './Upload'\nimport TabsContainer from '../../components/TabsContainer'\nimport TroubleshootConnectionCard from '../../components/TroubleshootConnectionCard'\nimport { Context as BeeContext } from '../../providers/Bee'\n\nexport default function Files(): ReactElement {\n const { status } = useContext(BeeContext)\n\n if (!status.all) return <TroubleshootConnectionCard />\n\n return (\n <TabsContainer\n values={[\n {\n label: 'download',\n component: <Download />,\n },\n {\n label: 'upload',\n component: <Upload />,\n },\n ]}\n />\n )\n}\n","import { ReactElement, useState } from 'react'\nimport QRCode from 'qrcode.react'\nimport { IconButton, Dialog, DialogTitle } from '@material-ui/core'\nimport { FilterCenterFocusSharp } from '@material-ui/icons'\n\ninterface Props {\n value: string\n label: string\n}\n\nexport default function QRCodeModal(props: Props): ReactElement {\n const [open, setOpen] = useState(false)\n\n const handleOpen = () => {\n setOpen(true)\n }\n\n const handleClose = () => {\n setOpen(false)\n }\n\n return (\n <div>\n <IconButton color=\"primary\" size=\"small\" onClick={handleOpen}>\n <FilterCenterFocusSharp />\n </IconButton>\n <Dialog onClose={handleClose} aria-labelledby=\"simple-dialog-title\" open={open}>\n <div style={{ padding: '30px', textAlign: 'center' }}>\n <DialogTitle id=\"simple-dialog-title\">{props.label}</DialogTitle>\n <QRCode\n value={props.value}\n size={150}\n bgColor={'#ffffff'}\n fgColor={'#000000'}\n level={'L'}\n includeMargin={false}\n renderAs={'svg'}\n />\n </div>\n </Dialog>\n </div>\n )\n}\n","import { Typography } from '@material-ui/core/'\nimport QRCodeModal from './QRCodeModal'\nimport ClipboardCopy from './ClipboardCopy'\n\nimport Identicon from 'react-identicons'\nimport { ReactElement } from 'react'\n\ninterface Props {\n address: string | undefined\n hideBlockie?: boolean\n transaction?: boolean\n truncate?: boolean\n}\n\nexport default function EthereumAddress(props: Props): ReactElement {\n return (\n <Typography component=\"div\" variant=\"subtitle1\">\n {props.address ? (\n <div style={{ display: 'flex' }}>\n {props.hideBlockie ? null : (\n <div style={{ paddingTop: '5px', marginRight: '10px' }}>\n <Identicon size={20} string={props.address} />\n </div>\n )}\n <div>\n <a\n style={\n props.truncate\n ? {\n marginRight: '7px',\n maxWidth: '200px',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n display: 'block',\n }\n : { marginRight: '7px' }\n }\n href={`${process.env.REACT_APP_BLOCKCHAIN_EXPLORER_URL}/${props.transaction ? 'tx' : 'address'}/${\n props.address\n }`}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {props.address}\n </a>\n </div>\n <QRCodeModal value={props.address} label={'Ethereum Address'} />\n <ClipboardCopy value={props.address} />\n </div>\n ) : (\n '-'\n )}\n </Typography>\n )\n}\n","import { CircularProgress, Container } from '@material-ui/core'\nimport Button from '@material-ui/core/Button'\nimport Dialog from '@material-ui/core/Dialog'\nimport DialogActions from '@material-ui/core/DialogActions'\nimport DialogContent from '@material-ui/core/DialogContent'\nimport DialogContentText from '@material-ui/core/DialogContentText'\nimport DialogTitle from '@material-ui/core/DialogTitle'\nimport { useSnackbar } from 'notistack'\nimport { ReactElement, useState, useContext } from 'react'\nimport { Zap } from 'react-feather'\nimport { Context as SettingsContext } from '../providers/Settings'\nimport EthereumAddress from './EthereumAddress'\n\ninterface Props {\n peerId: string\n uncashedAmount: string\n}\n\nexport default function CheckoutModal({ peerId, uncashedAmount }: Props): ReactElement {\n const [open, setOpen] = useState<boolean>(false)\n const [loadingCashout, setLoadingCashout] = useState<boolean>(false)\n const { enqueueSnackbar } = useSnackbar()\n const { beeDebugApi } = useContext(SettingsContext)\n\n const handleClickOpen = () => {\n setOpen(true)\n }\n\n const handleClose = () => {\n setOpen(false)\n }\n\n const handleCashout = () => {\n if (!beeDebugApi) return\n\n if (peerId) {\n setLoadingCashout(true)\n beeDebugApi\n .cashoutLastCheque(peerId)\n .then(res => {\n setOpen(false)\n enqueueSnackbar(\n <span>\n Successfully cashed out cheque. Transaction\n <EthereumAddress hideBlockie transaction address={res} />\n </span>,\n { variant: 'success' },\n )\n })\n .catch((e: Error) => {\n enqueueSnackbar(<span>Error: {e.message}</span>, { variant: 'error' })\n })\n .finally(() => {\n setLoadingCashout(false)\n })\n } else {\n enqueueSnackbar(<span>Peer Id invalid</span>, { variant: 'error' })\n }\n }\n\n return (\n <div>\n <Button variant=\"contained\" onClick={handleClickOpen} startIcon={<Zap size=\"1rem\" />}>\n Cash out peer {peerId.substr(0, 8)}[…]\n </Button>\n <Dialog open={open} onClose={handleClose} aria-labelledby=\"form-dialog-title\">\n <DialogTitle id=\"form-dialog-title\">Cashout Cheque</DialogTitle>\n <DialogContent>\n <DialogContentText style={{ marginTop: '20px', overflowWrap: 'break-word' }}>\n {loadingCashout && (\n <>\n <span>\n Cashing out <strong>{uncashedAmount}</strong> from Peer <strong>{peerId}</strong>. Please wait...\n </span>\n <Container style={{ textAlign: 'center', padding: '50px' }}>\n <CircularProgress />\n </Container>\n </>\n )}\n {!loadingCashout && (\n <span>\n Are you sure you want to cashout <strong>{uncashedAmount} BZZ</strong> from Peer{' '}\n <strong>{peerId}</strong>?\n </span>\n )}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button onClick={handleClose} color=\"primary\">\n Cancel\n </Button>\n <Button onClick={handleCashout} color=\"primary\" disabled={loadingCashout}>\n Yes Cashout\n </Button>\n </DialogActions>\n </Dialog>\n </div>\n )\n}\n","import type { ReactElement } from 'react'\n\nimport ExpandableList from '../../components/ExpandableList'\nimport ExpandableListItem from '../../components/ExpandableListItem'\nimport ExpandableListItemActions from '../../components/ExpandableListItemActions'\nimport ExpandableListItemKey from '../../components/ExpandableListItemKey'\n\nimport CashoutModal from '../../components/CashoutModal'\nimport { Accounting } from '../../hooks/accounting'\nimport type { Token } from '../../models/Token'\n\ninterface Props {\n isLoadingUncashed: boolean\n totalUncashed: Token\n accounting: Accounting[] | null\n}\n\nexport default function PeerBalances({ accounting, isLoadingUncashed, totalUncashed }: Props): ReactElement | null {\n return (\n <ExpandableList\n label={`Peers (${accounting?.length || 0})`}\n info={`${totalUncashed.toFixedDecimal()} BZZ (uncashed)`}\n >\n <ExpandableListItem label=\"Uncashed Amount Total\" value={`${totalUncashed.toFixedDecimal()} BZZ`} />\n {accounting?.map(({ peer, balance, received, sent, uncashedAmount, total }) => (\n <ExpandableList\n key={peer}\n label={`Peer ${peer.substr(0, 8)}[…]`}\n level={1}\n info={`${uncashedAmount.toFixedDecimal()} BZZ (uncashed)`}\n >\n <ExpandableListItemKey label=\"Peer ID\" value={peer} />\n <ExpandableListItem label=\"Outstanding Balance\" value={`${balance.toFixedDecimal()} BZZ`} />\n <ExpandableListItem\n label=\"Settlements Sent / Received\"\n value={`-${sent.toFixedDecimal()} / ${received.toFixedDecimal()} BZZ`}\n />\n <ExpandableListItem label=\"Total\" value={`${total.toFixedDecimal()} BZZ`} />\n <ExpandableListItem\n label=\"Uncashed Amount\"\n value={isLoadingUncashed ? 'loading…' : `${uncashedAmount.toFixedDecimal()} BZZ`}\n />\n {uncashedAmount.toBigNumber.isGreaterThan('0') && (\n <ExpandableListItemActions>\n <CashoutModal uncashedAmount={uncashedAmount.toFixedDecimal()} peerId={peer} />\n </ExpandableListItemActions>\n )}\n </ExpandableList>\n ))}\n </ExpandableList>\n )\n}\n","import { LastCashoutActionResponse, BeeDebug } from '@ethersphere/bee-js'\nimport { useEffect, useState } from 'react'\nimport { Token } from '../models/Token'\nimport { makeRetriablePromise, unwrapPromiseSettlements } from '../utils'\nimport { Balance, Settlements, Settlement } from '../types'\n\ninterface UseAccountingHook {\n isLoadingUncashed: boolean\n totalUncashed: Token\n accounting: Accounting[] | null\n}\n\nexport interface Accounting {\n peer: string\n uncashedAmount: Token\n balance: Token\n received: Token\n sent: Token\n total: Token\n}\n\n/**\n * Merges the balances, settlements and uncashedAmounts arrays into single array which is sorted by uncashed amounts (if any)\n *\n * @param balances Balances for all peers\n * @param settlements Settlements for all peers which has some settlement\n * @param uncashedAmounts Array of getPeerLastCashout responses which is needed to calculate uncashed amount\n *\n * @returns\n */\nfunction mergeAccounting(\n balances: Balance[] | null,\n settlements?: Settlement[],\n uncashedAmounts?: LastCashoutActionResponse[],\n): Accounting[] | null {\n // Settlements or balances are still loading or there is an error -> return null\n if (!balances || !settlements) return null\n\n const accounting: Record<string, Accounting> = {}\n\n balances.forEach(\n // Some peers may not have settlement but all have balance (therefore initialize sent, received and uncashed to 0)\n ({ peer, balance }) =>\n (accounting[peer] = {\n peer,\n balance,\n sent: new Token('0'),\n received: new Token('0'),\n uncashedAmount: new Token('0'),\n total: balance,\n }),\n )\n\n settlements.forEach(\n ({ peer, sent, received }) =>\n (accounting[peer] = {\n ...accounting[peer],\n sent,\n received,\n total: new Token(accounting[peer].balance.toBigNumber.plus(received.toBigNumber).minus(sent.toBigNumber)),\n }),\n )\n\n // If there are no cheques (and hence last cashout actions)\n if (!uncashedAmounts) return Object.values(accounting).sort((a, b) => (a.peer < b.peer ? -1 : 1))\n\n uncashedAmounts?.forEach(({ peer, uncashedAmount }) => {\n accounting[peer].uncashedAmount = new Token(uncashedAmount)\n })\n\n // Return sorted by the uncashed amount first and then by the peer id\n return Object.values(accounting).sort((a, b) => {\n const diff = b.uncashedAmount.toBigNumber.minus(a.uncashedAmount.toBigNumber).toNumber()\n\n if (diff !== 0) return diff\n\n return a.peer < b.peer ? -1 : 1\n })\n}\n\nexport const useAccounting = (\n beeDebugApi: BeeDebug | null,\n settlements: Settlements | null,\n balances: Balance[] | null,\n): UseAccountingHook => {\n const [isLoadingUncashed, setIsloadingUncashed] = useState<boolean>(false)\n const [uncashedAmounts, setUncashedAmounts] = useState<LastCashoutActionResponse[] | undefined>(undefined)\n\n useEffect(() => {\n // We don't have any settlements loaded yet or we are already loading/have loaded the uncashed amounts\n if (isLoadingUncashed || !beeDebugApi || !settlements || uncashedAmounts) return\n\n setIsloadingUncashed(true)\n const promises = settlements.settlements\n .filter(({ received }) => received.toBigNumber.gt('0'))\n .map(({ peer }) => makeRetriablePromise(() => beeDebugApi.getLastCashoutAction(peer)))\n\n Promise.allSettled(promises).then(settlements => {\n const results = unwrapPromiseSettlements(settlements)\n setUncashedAmounts(results.fulfilled)\n setIsloadingUncashed(false)\n })\n }, [settlements, isLoadingUncashed, uncashedAmounts])\n\n const accounting = mergeAccounting(balances, settlements?.settlements, uncashedAmounts)\n\n let totalUncashed: Token = new Token('0')\n accounting?.forEach(\n ({ uncashedAmount }) => (totalUncashed = new Token(totalUncashed.toBigNumber.plus(uncashedAmount.toBigNumber))),\n )\n\n return {\n isLoadingUncashed,\n totalUncashed,\n accounting,\n }\n}\n","import { ReactElement, useContext } from 'react'\nimport { Upload } from 'react-feather'\nimport { Context as SettingsContext } from '../providers/Settings'\n\nimport WithdrawDepositModal from '../components/WithdrawDepositModal'\nimport { BigNumber } from 'bignumber.js'\n\nexport default function WithdrawModal(): ReactElement {\n const { beeDebugApi } = useContext(SettingsContext)\n\n return (\n <WithdrawDepositModal\n successMessage=\"Successful withdrawl.\"\n errorMessage=\"Error with withdrawing.\"\n dialogMessage=\"Specify the amount of BZZ you would like to withdraw from your node.\"\n label=\"Withdraw\"\n icon={<Upload size=\"1rem\" />}\n min={new BigNumber(0)}\n action={(amount: bigint) => {\n if (!beeDebugApi) throw new Error('Bee Debug URL is not valid')\n\n return beeDebugApi.withdrawTokens(amount.toString())\n }}\n />\n )\n}\n","import { ReactElement, useContext } from 'react'\n\nimport PeerBalances from './PeerBalances'\nimport TroubleshootConnectionCard from '../../components/TroubleshootConnectionCard'\nimport { Context as BeeContext } from '../../providers/Bee'\nimport { Context as SettingsContext } from '../../providers/Settings'\nimport { useAccounting } from '../../hooks/accounting'\nimport ExpandableList from '../../components/ExpandableList'\nimport ExpandableListItem from '../../components/ExpandableListItem'\nimport ExpandableListItemActions from '../../components/ExpandableListItemActions'\nimport ExpandableListItemKey from '../../components/ExpandableListItemKey'\nimport WithdrawModal from '../../containers/WithdrawModal'\nimport DepositModal from '../../containers/DepositModal'\n\nexport default function Accounting(): ReactElement {\n const { status, nodeAddresses, chequebookAddress, chequebookBalance, settlements, peerBalances } =\n useContext(BeeContext)\n const { beeDebugApi } = useContext(SettingsContext)\n\n const { accounting, totalUncashed, isLoadingUncashed } = useAccounting(beeDebugApi, settlements, peerBalances)\n\n if (!status.all) return <TroubleshootConnectionCard />\n\n return (\n <div>\n <ExpandableList label=\"Chequebook\" defaultOpen>\n <ExpandableListItem label=\"Total Balance\" value={`${chequebookBalance?.totalBalance.toFixedDecimal()} BZZ`} />\n <ExpandableListItem\n label=\"Available Uncommitted Balance\"\n value={`${chequebookBalance?.availableBalance.toFixedDecimal()} BZZ`}\n />\n <ExpandableListItem\n label=\"Total Cheques Amount Sent\"\n value={`${settlements?.totalSent.toFixedDecimal()} BZZ`}\n />\n <ExpandableListItem\n label=\"Total Cheques Amount Received\"\n value={`${settlements?.totalReceived.toFixedDecimal()} BZZ`}\n />\n <ExpandableListItemActions>\n <WithdrawModal />\n <DepositModal />\n </ExpandableListItemActions>\n </ExpandableList>\n <ExpandableList label=\"Blockchain\" defaultOpen>\n <ExpandableListItemKey label=\"Ethereum address\" value={nodeAddresses?.ethereum || ''} />\n <ExpandableListItemKey label=\"Chequebook contract address\" value={chequebookAddress?.chequebookAddress || ''} />\n </ExpandableList>\n <PeerBalances accounting={accounting} isLoadingUncashed={isLoadingUncashed} totalUncashed={totalUncashed} />\n </div>\n )\n}\n","import { ReactElement, useContext } from 'react'\nimport { Context as SettingsContext } from '../../providers/Settings'\nimport ExpandableList from '../../components/ExpandableList'\nimport ExpandableListItemInput from '../../components/ExpandableListItemInput'\n\nexport default function Settings(): ReactElement {\n const { apiUrl, apiDebugUrl, setApiUrl, setDebugApiUrl } = useContext(SettingsContext)\n\n return (\n <ExpandableList label=\"API Settings\" defaultOpen>\n <ExpandableListItemInput label=\"Bee API\" value={apiUrl} onConfirm={setApiUrl} />\n <ExpandableListItemInput label=\"Bee Debug API\" value={apiDebugUrl} onConfirm={setDebugApiUrl} />\n </ExpandableList>\n )\n}\n","import type { ReactElement } from 'react'\nimport { EnrichedPostageBatch } from '../../providers/Stamps'\nimport ExpandableList from '../../components/ExpandableList'\nimport ExpandableListItem from '../../components/ExpandableListItem'\nimport ExpandableListItemKey from '../../components/ExpandableListItemKey'\n\ninterface Props {\n postageStamps: EnrichedPostageBatch[] | null\n}\n\nfunction StampsTable({ postageStamps }: Props): ReactElement | null {\n if (postageStamps === null) return null\n\n return (\n <ExpandableList label=\"Postage Stamps\" defaultOpen>\n {postageStamps.map(({ batchID, usageText }) => (\n <ExpandableList key={batchID} label={`${batchID.substr(0, 8)}[…]`} level={1} info={`${usageText} used`}>\n <ExpandableListItemKey label=\"Batch ID\" value={batchID} />\n <ExpandableListItem label=\"Usage\" value={usageText} />\n </ExpandableList>\n ))}\n </ExpandableList>\n )\n}\n\nexport default StampsTable\n","import type { ReactElement } from 'react'\nimport { Switch } from 'react-router-dom'\n\nimport { Route } from 'react-router-dom'\n\nimport Info from './pages/info'\nimport Status from './pages/status'\nimport Files from './pages/files'\nimport Accounting from './pages/accounting'\nimport Settings from './pages/settings'\nimport Stamps from './pages/stamps'\n\nexport enum ROUTES {\n INFO = '/',\n FILES = '/files',\n ACCOUNTING = '/accounting',\n SETTINGS = '/settings',\n STAMPS = '/stamps',\n STATUS = '/status',\n}\n\nconst BaseRouter = (): ReactElement => (\n <Switch>\n <Route exact path={ROUTES.FILES} component={Files} />\n <Route exact path={ROUTES.ACCOUNTING} component={Accounting} />\n <Route exact path={ROUTES.SETTINGS} component={Settings} />\n <Route exact path={ROUTES.STAMPS} component={Stamps} />\n <Route exact path={ROUTES.STATUS} component={Status} />\n <Route path={ROUTES.INFO} component={Info} />\n </Switch>\n)\n\nexport default BaseRouter\n","import { ReactElement, useContext, useEffect } from 'react'\nimport { createStyles, makeStyles } from '@material-ui/core/styles'\nimport { Container, CircularProgress } from '@material-ui/core'\n\nimport StampsTable from './StampsTable'\nimport CreatePostageStampModal from './CreatePostageStampModal'\n\nimport { Context as StampsContext } from '../../providers/Stamps'\nimport TroubleshootConnectionCard from '../../components/TroubleshootConnectionCard'\nimport { Context as BeeContext } from '../../providers/Bee'\n\nconst useStyles = makeStyles(() =>\n createStyles({\n root: {\n width: '100%',\n display: 'grid',\n },\n actions: {\n display: 'flex',\n width: '100%',\n flex: '0 1 auto',\n flexWrap: 'wrap',\n alignItems: 'center',\n },\n }),\n)\n\nexport default function Accounting(): ReactElement {\n const classes = useStyles()\n const { stamps, isLoading, error, start, stop } = useContext(StampsContext)\n const { status } = useContext(BeeContext)\n\n if (!status.all) return <TroubleshootConnectionCard />\n\n useEffect(() => {\n start()\n\n return () => stop()\n }, [])\n\n return (\n <div className={classes.root}>\n {error && (\n <Container style={{ textAlign: 'center', padding: '50px' }}>\n Error loading postage stamps details: {error.message}\n </Container>\n )}\n {!error && (\n <>\n <div className={classes.actions}>\n <CreatePostageStampModal />\n <div style={{ height: '5px' }}>{isLoading && <CircularProgress />}</div>\n </div>\n <StampsTable postageStamps={stamps} />\n </>\n )}\n </div>\n )\n}\n","import { Component, ErrorInfo, ReactElement } from 'react'\n\ninterface Props {\n children: ReactElement\n}\n\ninterface State {\n error: Error | null\n}\n\nexport default class ErrorBoundary extends Component<Props, State> {\n constructor(props: Props) {\n super(props)\n this.state = { error: null }\n }\n\n static getDerivedStateFromError(error: Error): { error: Error } {\n // Update state so the next render will show the fallback UI.\n return { error }\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n // You can also log the error to an error reporting service\n console.error({ error, errorInfo }) // eslint-disable-line\n }\n\n render(): ReactElement {\n if (this.state.error) {\n // You can render any custom fallback UI\n return <h1>Something went wrong. Error: {this.state.error.message}</h1>\n }\n\n return this.props.children\n }\n}\n","import { ReactElement, useState, useContext } from 'react'\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles'\nimport { Alert, AlertTitle } from '@material-ui/lab'\nimport Collapse from '@material-ui/core/Collapse'\nimport IconButton from '@material-ui/core/IconButton'\nimport CloseIcon from '@material-ui/icons/Close'\nimport { Context } from '../providers/Bee'\nimport { SUPPORTED_BEE_VERSION_EXACT } from '@ethersphere/bee-js'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n width: '100%',\n marginBottom: theme.spacing(2),\n },\n }),\n)\n\nexport default function VersionAlert(): ReactElement | null {\n const classes = useStyles()\n const { isLoading, latestUserVersionExact } = useContext(Context)\n const [open, setOpen] = useState<boolean>(true)\n\n const isExactlySupportedBeeVersion = SUPPORTED_BEE_VERSION_EXACT === latestUserVersionExact\n\n if (isLoading || !latestUserVersionExact) return null\n\n return (\n <Collapse in={!isExactlySupportedBeeVersion && open}>\n <div className={classes.root}>\n <Alert\n severity=\"warning\"\n action={\n <IconButton\n aria-label=\"close\"\n color=\"inherit\"\n size=\"small\"\n onClick={() => {\n setOpen(false)\n }}\n >\n <CloseIcon fontSize=\"inherit\" />\n </IconButton>\n }\n >\n <AlertTitle>Warning</AlertTitle>\n Your Bee node version (<code>{latestUserVersionExact}</code>) does not exactly match the Bee version we tested\n the Bee Dashboard against (<code>{SUPPORTED_BEE_VERSION_EXACT}</code>). Please note that some functionality\n may not work properly.\n </Alert>\n </div>\n </Collapse>\n )\n}\n","import type { ReactElement, ReactNode } from 'react'\nimport { useLocation, matchPath } from 'react-router-dom'\n\nimport { createStyles, Theme, makeStyles, withStyles } from '@material-ui/core/styles'\nimport { ListItemText, ListItemIcon, ListItem } from '@material-ui/core'\n\nconst StyledListItem = withStyles((theme: Theme) => ({\n root: {\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n borderLeft: '4px solid rgba(0,0,0,0)',\n '&.Mui-selected, &.Mui-selected:hover': {\n borderLeft: `4px solid ${theme.palette.primary.main}`,\n backgroundColor: '#2c2c2c',\n color: '#f9f9f9',\n },\n },\n button: {\n '&:hover': {\n backgroundColor: '#2c2c2c',\n color: '#f9f9f9',\n\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n backgroundColor: '#2c2c2c',\n color: '#f9f9f9',\n },\n },\n },\n}))(ListItem)\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n icon: {\n color: 'inherit',\n },\n activeIcon: {\n color: theme.palette.primary.main,\n },\n }),\n)\n\ninterface Props {\n iconStart?: ReactNode\n iconEnd?: ReactNode\n path?: string\n label: ReactNode\n}\n\nexport default function SideBarItem({ iconStart, iconEnd, path, label }: Props): ReactElement {\n const classes = useStyles()\n const location = useLocation()\n const isSelected = Boolean(matchPath(location.pathname, { path, exact: true }))\n\n return (\n <StyledListItem button selected={isSelected} disableRipple>\n <ListItemIcon className={isSelected ? classes.activeIcon : classes.icon}>{iconStart}</ListItemIcon>\n <ListItemText primary={label} />\n <ListItemIcon className={isSelected ? classes.activeIcon : classes.icon}>{iconEnd}</ListItemIcon>\n </StyledListItem>\n )\n}\n","import { ReactElement, useContext } from 'react'\nimport { useLocation, matchPath } from 'react-router-dom'\nimport { ArrowRight } from 'react-feather'\n\nimport { createStyles, Theme, makeStyles } from '@material-ui/core/styles'\nimport { ListItemText, ListItemIcon, ListItem, Typography } from '@material-ui/core'\nimport { Context } from '../providers/Bee'\nimport StatusIcon from './StatusIcon'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n icon: {\n color: 'inherit',\n },\n iconSmall: {\n height: theme.spacing(2),\n },\n\n root: {\n height: theme.spacing(4),\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(4),\n color: '#f9f9f9',\n borderLeft: '0px solid rgba(0,0,0,0)',\n '&.Mui-selected, &.Mui-selected:hover': {\n borderLeft: `0px solid ${theme.palette.primary.main}`,\n backgroundColor: '#2c2c2c',\n },\n },\n rootError: {\n backgroundColor: 'rgba(255, 58, 82, 0.25)',\n },\n button: {\n '&:hover': {\n backgroundColor: '#2c2c2c',\n color: 'white',\n\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n backgroundColor: '#2c2c2c',\n color: 'white',\n },\n },\n },\n smallerText: {\n fontSize: '0.9rem',\n },\n }),\n)\n\ninterface Props {\n path?: string\n}\n\nexport default function SideBarItem({ path }: Props): ReactElement {\n const { status, isLoading } = useContext(Context)\n const classes = useStyles()\n const location = useLocation()\n const isSelected = Boolean(matchPath(location.pathname, { path, exact: true }))\n\n return (\n <ListItem\n button\n classes={{ root: `${classes.root} ${status.all ? '' : classes.rootError}`, button: classes.button }}\n selected={isSelected}\n disableRipple\n >\n <ListItemIcon style={{ marginLeft: '30px' }}>\n <StatusIcon isOk={status.all} isLoading={isLoading} />\n </ListItemIcon>\n <ListItemText\n primary={<Typography className={classes.smallerText}>{`Node ${status.all ? 'OK' : 'Error'}`}</Typography>}\n />\n <ListItemIcon className={classes.icon}>\n {status.all ? null : <ArrowRight className={classes.iconSmall} />}\n </ListItemIcon>\n </ListItem>\n )\n}\n","export default __webpack_public_path__ + \"static/media/logo.3d1155fe.svg\";","import type { ReactElement } from 'react'\nimport { Link } from 'react-router-dom'\n\nimport { createStyles, Theme, makeStyles } from '@material-ui/core/styles'\nimport { OpenInNewSharp } from '@material-ui/icons'\nimport { Divider, List, Drawer, Grid, Link as MUILink } from '@material-ui/core'\nimport { Home, FileText, DollarSign, Settings, Layers, BookOpen } from 'react-feather'\nimport { ROUTES } from '../routes'\nimport SideBarItem from './SideBarItem'\nimport SideBarStatus from './SideBarStatus'\n\nimport Logo from '../assets/logo.svg'\n\nconst navBarItems = [\n {\n label: 'Info',\n path: ROUTES.INFO,\n icon: Home,\n },\n {\n label: 'Files',\n path: ROUTES.FILES,\n icon: FileText,\n },\n {\n label: 'Stamps',\n path: ROUTES.STAMPS,\n icon: Layers,\n },\n {\n label: 'Accounting',\n path: ROUTES.ACCOUNTING,\n icon: DollarSign,\n },\n {\n label: 'Settings',\n path: ROUTES.SETTINGS,\n icon: Settings,\n },\n]\n\nconst drawerWidth = 300\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n flexWrap: 'nowrap',\n minHeight: '100vh',\n paddingTop: theme.spacing(8),\n paddingBottom: theme.spacing(8),\n },\n drawer: {\n width: drawerWidth,\n flexShrink: 0,\n },\n drawerPaper: {\n width: drawerWidth,\n backgroundColor: '#212121',\n },\n logo: {\n marginLeft: theme.spacing(8),\n marginRight: theme.spacing(8),\n },\n icon: {\n height: theme.spacing(4),\n },\n iconSmall: {\n height: theme.spacing(2),\n },\n divider: {\n backgroundColor: '#2c2c2c',\n marginLeft: theme.spacing(4),\n marginRight: theme.spacing(4),\n },\n link: {\n color: '#9f9f9f',\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'none',\n\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n textDecoration: 'none',\n },\n },\n },\n }),\n)\n\nexport default function SideBar(): ReactElement {\n const classes = useStyles()\n\n return (\n <Drawer className={classes.drawer} variant=\"permanent\" anchor=\"left\" classes={{ paper: classes.drawerPaper }}>\n <Grid container direction=\"column\" justifyContent=\"space-between\" className={classes.root}>\n <Grid className={classes.logo}>\n <Link to={ROUTES.INFO}>\n <img alt=\"swarm\" src={Logo} />\n </Link>\n </Grid>\n <Grid>\n <List>\n {navBarItems.map(p => (\n <Link to={p.path} key={p.path} className={classes.link}>\n <SideBarItem\n key={p.path}\n iconStart={<p.icon className={classes.icon} />}\n path={p.path}\n label={p.label}\n />\n </Link>\n ))}\n </List>\n <Divider className={classes.divider} />\n <List>\n <MUILink href={process.env.REACT_APP_BEE_DOCS_HOST} target=\"_blank\" className={classes.link}>\n <SideBarItem\n iconStart={<BookOpen className={classes.icon} />}\n iconEnd={<OpenInNewSharp className={classes.iconSmall} />}\n label={<span>Docs</span>}\n />\n </MUILink>\n </List>\n </Grid>\n <Grid>\n <Link to={ROUTES.STATUS} className={classes.link}>\n <SideBarStatus path={ROUTES.STATUS} />\n </Link>\n </Grid>\n </Grid>\n </Drawer>\n )\n}\n","import { useContext, ReactElement } from 'react'\nimport ErrorBoundary from '../components/ErrorBoundary'\nimport AlertVersion from '../components/AlertVersion'\nimport { Container, CircularProgress } from '@material-ui/core'\n\nimport { createStyles, Theme, makeStyles } from '@material-ui/core/styles'\n\nimport SideBar from '../components/SideBar'\n\nimport { Context } from '../providers/Bee'\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n content: {\n backgroundColor: theme.palette.background.default,\n minHeight: '100vh',\n },\n }),\n)\n\ninterface Props {\n children?: ReactElement\n}\n\nconst Dashboard = (props: Props): ReactElement => {\n const classes = useStyles()\n\n const { isLoading } = useContext(Context)\n\n return (\n <div style={{ display: 'flex' }}>\n <SideBar />\n <Container className={classes.content}>\n <ErrorBoundary>\n <>\n <AlertVersion />\n {isLoading ? (\n <div style={{ textAlign: 'center', width: '100%' }}>\n <CircularProgress />\n </div>\n ) : (\n props.children\n )}\n </>\n </ErrorBoundary>\n </Container>\n </div>\n )\n}\n\nexport default Dashboard\n","import { createMuiTheme, Theme } from '@material-ui/core/styles'\nimport { orange } from '@material-ui/core/colors'\n\ndeclare module '@material-ui/core/styles/createPalette' {\n interface TypeBackground {\n appBar: string\n }\n}\n\n// Overwriting default components styles\nconst componentsOverrides = (theme: Theme) => ({\n MuiListItem: {\n button: {\n '&:hover': {\n backgroundColor: '#fcf2e8',\n color: theme.palette.primary.main,\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n backgroundColor: '#fcf2e8',\n color: theme.palette.primary.main,\n },\n },\n },\n },\n MuiContainer: {\n root: { padding: theme.spacing(8) },\n maxWidthXs: { padding: theme.spacing(8) },\n maxWidthSm: { padding: theme.spacing(8) },\n maxWidthMd: { padding: theme.spacing(8) },\n maxWidthLg: { padding: theme.spacing(8) },\n maxWidthXl: { padding: theme.spacing(8) },\n },\n MuiButton: {\n startIcon: { marginLeft: theme.spacing(1) },\n endIcon: { marginRight: theme.spacing(1) },\n outlined: {\n border: 'none',\n borderRadius: theme.spacing(10),\n color: theme.palette.primary.main,\n backgroundColor: '#fcf2e8',\n },\n outlinedSizeSmall: {\n padding: theme.spacing(1),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n },\n },\n },\n outlinedSizeLarge: {\n padding: theme.spacing(4),\n borderRadius: 0,\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n },\n },\n },\n containedSizeLarge: {\n padding: theme.spacing(4),\n borderRadius: 0,\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n },\n },\n },\n containedSizeSmall: {\n padding: theme.spacing(1),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n borderRadius: 0,\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n },\n },\n },\n contained: {\n padding: theme.spacing(2),\n backgroundColor: 'white',\n boxShadow: 'none',\n borderRadius: 0,\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n // https://github.com/mui-org/material-ui/issues/22543\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n boxShadow: 'none',\n },\n },\n '&:focus': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n },\n '&:active': {\n backgroundColor: theme.palette.primary.main,\n color: 'white',\n },\n '&:disabled': {\n backgroundColor: 'white',\n },\n },\n },\n MuiTab: {\n root: {\n backgroundColor: theme.palette.background.paper,\n '&:hover': {\n backgroundColor: '#fcf2e8',\n color: theme.palette.primary.main,\n opacity: 1,\n },\n '&$selected': {\n fontWeight: theme.typography.fontWeightMedium,\n },\n },\n textColorInherit: {\n opacity: 0.5,\n },\n },\n MuiTabs: {\n root: {\n borderBottom: 'none',\n },\n indicator: {\n backgroundColor: 'transparent',\n },\n },\n})\n\nconst propsOverrides = {\n MuiTab: {\n disableRipple: true,\n },\n MuiButtonBase: {\n disableRipple: true,\n },\n}\n\nexport const theme = createMuiTheme({\n palette: {\n type: 'light',\n background: {\n default: '#efefef',\n },\n primary: {\n light: '#fcf2e8',\n main: '#dd7700',\n dark: orange[800],\n },\n secondary: {\n main: '#333333',\n },\n },\n typography: {\n fontFamily: ['Work Sans', 'Montserrat', 'Nunito', 'Roboto', '\"Helvetica Neue\"', 'Arial', 'sans-serif'].join(','),\n h1: {\n fontSize: '1.3rem',\n fontWeight: 500,\n },\n h2: {\n fontSize: '1rem',\n fontWeight: 500,\n },\n h3: {\n fontSize: '0.8rem',\n fontWeight: 500,\n },\n body2: {\n fontFamily: '\"IBM Plex Mono\", monospace',\n fontWeight: 500,\n fontSize: '1rem',\n },\n },\n})\n\ntheme.overrides = componentsOverrides(theme)\ntheme.props = propsOverrides\n","import { ReactElement } from 'react'\nimport { BrowserRouter as Router } from 'react-router-dom'\nimport './App.css'\n\nimport { ThemeProvider } from '@material-ui/core/styles'\nimport CssBaseline from '@material-ui/core/CssBaseline'\nimport { SnackbarProvider } from 'notistack'\n\nimport BaseRouter from './routes'\nimport Dashboard from './layout/Dashboard'\nimport { theme } from './theme'\nimport { Provider as StampsProvider } from './providers/Stamps'\nimport { Provider as PlatformProvider } from './providers/Platform'\nimport { Provider as BeeProvider } from './providers/Bee'\nimport { Provider as SettingsProvider } from './providers/Settings'\n\nconst App = (): ReactElement => (\n <div className=\"App\">\n <ThemeProvider theme={theme}>\n <SettingsProvider>\n <BeeProvider>\n <StampsProvider>\n <PlatformProvider>\n <SnackbarProvider>\n <Router>\n <>\n <CssBaseline />\n <Dashboard>\n <BaseRouter />\n </Dashboard>\n </>\n </Router>\n </SnackbarProvider>\n </PlatformProvider>\n </StampsProvider>\n </BeeProvider>\n </SettingsProvider>\n </ThemeProvider>\n </div>\n)\n\nexport default App\n","import { ReportHandler } from 'web-vitals'\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler): void => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry)\n getFID(onPerfEntry)\n getFCP(onPerfEntry)\n getLCP(onPerfEntry)\n getTTFB(onPerfEntry)\n })\n }\n}\n\nexport default reportWebVitals\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport './index.css'\nimport App from './App'\nimport reportWebVitals from './reportWebVitals'\n\nReactDOM.render(\n <React.StrictMode>\n <App />\n </React.StrictMode>,\n document.getElementById('root'),\n)\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals()\n"],"sourceRoot":""}