fix: remove expired stamps (#463)
* fix: increase waitUntilStampUsable timeout * fix: wait for stamp to exist after buying
This commit is contained in:
@@ -9,7 +9,13 @@ import { SwarmTextInput } from '../../components/SwarmTextInput'
|
||||
import { Context as BeeContext } from '../../providers/Bee'
|
||||
import { Context as SettingsContext } from '../../providers/Settings'
|
||||
import { Context as StampsContext } from '../../providers/Stamps'
|
||||
import { calculateStampPrice, convertAmountToSeconds, convertDepthToBytes, secondsToTimeString } from '../../utils'
|
||||
import {
|
||||
calculateStampPrice,
|
||||
convertAmountToSeconds,
|
||||
convertDepthToBytes,
|
||||
secondsToTimeString,
|
||||
waitUntilStampExists,
|
||||
} from '../../utils'
|
||||
import { getHumanReadableFileSize } from '../../utils/file'
|
||||
|
||||
interface FormValues {
|
||||
@@ -97,7 +103,8 @@ export function PostageStampCreation({ onFinished }: Props): ReactElement {
|
||||
const amount = BigInt(values.amount)
|
||||
const depth = Number.parseInt(values.depth)
|
||||
const options = values.label ? { label: values.label } : undefined
|
||||
await beeDebugApi.createPostageBatch(amount.toString(), depth, options)
|
||||
const batchId = await beeDebugApi.createPostageBatch(amount.toString(), depth, options)
|
||||
await waitUntilStampExists(batchId, beeDebugApi)
|
||||
actions.resetForm()
|
||||
await refresh()
|
||||
onFinished()
|
||||
|
||||
Reference in New Issue
Block a user