feat: add light node upgrade top up methods (#372)
* feat: add top up * chore: remove console.log * build: add pseudo-missing dependency * feat: add missing top up components * fix: crypto route * feat(wip): add gift wallet logic * fix: fix gift wallet flows * feat: simplify flow without fund step * feat: add loading screens * fix: remove alert * fix: prepend http if needed * fix: fix bug that was reintroduced with merge * refactor: rename minusEther to minusBaseUnits * fix: remove unused setStartedAt * build: remove unused dependency
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Button, ListItemIcon, Menu, MenuItem, Typography } from '@material-ui/core'
|
||||
import React, { ReactElement } from 'react'
|
||||
import { Button, ListItemIcon, Typography, Menu, MenuItem } from '@material-ui/core'
|
||||
import { EnrichedPostageBatch } from '../../providers/Stamps'
|
||||
|
||||
interface Props {
|
||||
@@ -35,7 +35,7 @@ export default function SimpleMenu({ stamps, selectedStamp, setSelected }: Props
|
||||
selected={stamp.batchID === selectedStamp?.batchID}
|
||||
>
|
||||
<ListItemIcon>{stamp.usageText}</ListItemIcon>
|
||||
<Typography variant="body2">{stamp.batchID.substr(0, 8)}[…]</Typography>
|
||||
<Typography variant="body2">{stamp.batchID.slice(0, 8)}[…]</Typography>
|
||||
</MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { DocumentationText } from '../../components/DocumentationText'
|
||||
import { HistoryHeader } from '../../components/HistoryHeader'
|
||||
import { ProgressIndicator } from '../../components/ProgressIndicator'
|
||||
import TroubleshootConnectionCard from '../../components/TroubleshootConnectionCard'
|
||||
import { META_FILE_NAME, PREVIEW_FILE_NAME } from '../../constants'
|
||||
import { CheckState, Context as BeeContext } from '../../providers/Bee'
|
||||
import { Context as IdentityContext, Identity } from '../../providers/Feeds'
|
||||
import { Context as FileContext } from '../../providers/File'
|
||||
@@ -21,7 +22,6 @@ import { PostageStampSelector } from '../stamps/PostageStampSelector'
|
||||
import { AssetPreview } from './AssetPreview'
|
||||
import { StampPreview } from './StampPreview'
|
||||
import { UploadActionBar } from './UploadActionBar'
|
||||
import { META_FILE_NAME, PREVIEW_FILE_NAME } from '../../constants'
|
||||
|
||||
export function Upload(): ReactElement {
|
||||
const [step, setStep] = useState(0)
|
||||
@@ -83,9 +83,9 @@ export function Upload(): ReactElement {
|
||||
// The website is in some directory, remove it
|
||||
if (idx.commonPrefix) {
|
||||
const substrStart = idx.commonPrefix.length
|
||||
indexDocument = idx.indexPath.substr(substrStart)
|
||||
indexDocument = idx.indexPath.slice(substrStart)
|
||||
fls = files.map(f => {
|
||||
const path = (f.path as string).substr(substrStart)
|
||||
const path = (f.path as string).slice(substrStart)
|
||||
|
||||
return packageFile(f, path)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user