diff --git a/src/pages/files/UploadActionBar.tsx b/src/pages/files/UploadActionBar.tsx
index 1825f27..689937b 100644
--- a/src/pages/files/UploadActionBar.tsx
+++ b/src/pages/files/UploadActionBar.tsx
@@ -49,7 +49,17 @@ export function UploadActionBar({
- You need a postage stamp to upload.
+
+ You need a postage stamp to upload. Find out more in{' '}
+
+ this guide
+
+ .
+
>
)
}
diff --git a/src/pages/rpc/index.tsx b/src/pages/rpc/index.tsx
index 3800e2d..87d51f4 100644
--- a/src/pages/rpc/index.tsx
+++ b/src/pages/rpc/index.tsx
@@ -46,7 +46,7 @@ export default function Index(): ReactElement {
target="_blank"
rel="noreferrer"
>
- this guide.
+ this guide
.
diff --git a/src/pages/stamps/PostageStampCreation.tsx b/src/pages/stamps/PostageStampCreation.tsx
index 9caf2de..dc8210d 100644
--- a/src/pages/stamps/PostageStampCreation.tsx
+++ b/src/pages/stamps/PostageStampCreation.tsx
@@ -70,97 +70,115 @@ export function PostageStampCreation({ onFinished }: Props): ReactElement {
}
return (
- ) => {
- try {
- // This is really just a typeguard, the validation pretty much guarantees these will have the right values
- if (!values.depth || !values.amount) return
+ <>
+
+
+ To upload data to Swarm network, you will need to purchase a postage stamp. If you're not familiar with
+ this, please read{' '}
+
+ this guide
+
+ .
+
+
+ ) => {
+ try {
+ // This is really just a typeguard, the validation pretty much guarantees these will have the right values
+ if (!values.depth || !values.amount) return
- if (!beeDebugApi) return
+ if (!beeDebugApi) return
- 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)
- actions.resetForm()
- await refresh()
- onFinished()
- } catch (e) {
- enqueueSnackbar(`Error: ${(e as Error).message}`, { variant: 'error' })
- actions.setSubmitting(false)
- }
- }}
- validate={(values: FormValues) => {
- const errors: FormErrors = {}
+ 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)
+ actions.resetForm()
+ await refresh()
+ onFinished()
+ } catch (e) {
+ enqueueSnackbar(`Error: ${(e as Error).message}`, { variant: 'error' })
+ actions.setSubmitting(false)
+ }
+ }}
+ validate={(values: FormValues) => {
+ const errors: FormErrors = {}
- // Depth
- if (!values.depth) errors.depth = 'Required field'
- else {
- const depth = new BigNumber(values.depth)
+ // Depth
+ if (!values.depth) errors.depth = 'Required field'
+ else {
+ const depth = new BigNumber(values.depth)
- if (!depth.isInteger()) errors.depth = 'Depth must be an integer'
- else if (depth.isLessThan(17)) errors.depth = 'Minimal depth is 17'
- else if (depth.isGreaterThan(255)) errors.depth = 'Depth has to be at most 255'
- }
+ if (!depth.isInteger()) errors.depth = 'Depth must be an integer'
+ else if (depth.isLessThan(17)) errors.depth = 'Minimal depth is 17'
+ else if (depth.isGreaterThan(255)) errors.depth = 'Depth has to be at most 255'
+ }
- // Amount
- if (!values.amount) errors.amount = 'Required field'
- else {
- const amount = new BigNumber(values.amount)
+ // Amount
+ if (!values.amount) errors.amount = 'Required field'
+ else {
+ const amount = new BigNumber(values.amount)
- if (!amount.isInteger()) errors.amount = 'Amount must be an integer'
- else if (amount.isLessThanOrEqualTo(0)) errors.amount = 'Amount must be greater than 0'
- }
+ if (!amount.isInteger()) errors.amount = 'Amount must be an integer'
+ else if (amount.isLessThanOrEqualTo(0)) errors.amount = 'Amount must be greater than 0'
+ }
- return errors
- }}
- >
- {({ submitForm, isValid, isSubmitting, values, errors }) => (
-
- )}
-
+
+ Buy New Stamp
+
+
+ )}
+
+ >
)
}