mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
debug output for collected and transformed values
This commit is contained in:
parent
925cbcf173
commit
74f9c2202b
@ -70,7 +70,7 @@ export default function Advanced({
|
||||
onChange={onChange}
|
||||
/>
|
||||
<Coin
|
||||
name="price.tokensToMint"
|
||||
name="tokensToMint"
|
||||
symbol="OCEAN-CAV"
|
||||
value={tokensToMint.toString()}
|
||||
weight={`${weightOnDataToken}%`}
|
||||
|
@ -11,8 +11,7 @@ export default function Coin({
|
||||
value,
|
||||
weight,
|
||||
onChange,
|
||||
readOnly,
|
||||
field
|
||||
readOnly
|
||||
}: {
|
||||
symbol: string
|
||||
name: string
|
||||
@ -20,7 +19,6 @@ export default function Coin({
|
||||
weight: string
|
||||
onChange?: (event: ChangeEvent<HTMLInputElement>) => void
|
||||
readOnly?: boolean
|
||||
field?: any
|
||||
}): ReactElement {
|
||||
return (
|
||||
<div className={styles.coin}>
|
||||
@ -30,7 +28,6 @@ export default function Coin({
|
||||
|
||||
<div className={styles.data}>
|
||||
<InputElement
|
||||
{...field}
|
||||
value={value}
|
||||
name={name}
|
||||
type="number"
|
||||
|
@ -16,6 +16,7 @@ export default function PublishForm({
|
||||
const { ocean, account } = useOcean()
|
||||
const { publishStepText, isLoading } = usePublish()
|
||||
const {
|
||||
values,
|
||||
status,
|
||||
setStatus,
|
||||
isValid,
|
||||
@ -42,7 +43,6 @@ export default function PublishForm({
|
||||
{content.data.map((field: FormFieldProps) => (
|
||||
<Field key={field.name} {...field} component={Input} />
|
||||
))}
|
||||
|
||||
{isLoading ? (
|
||||
<Loader message={publishStepText} />
|
||||
) : (
|
||||
|
@ -82,6 +82,26 @@ export default function PublishPage({
|
||||
<Web3Feedback />
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div>
|
||||
<h5>Collected Form Values</h5>
|
||||
<pre>
|
||||
<code>{JSON.stringify(values, null, 2)}</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h5>Transformed Values</h5>
|
||||
<pre>
|
||||
<code>
|
||||
{JSON.stringify(
|
||||
transformPublishFormToMetadata(values),
|
||||
null,
|
||||
2
|
||||
)}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</Formik>
|
||||
|
Loading…
Reference in New Issue
Block a user