1
0
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:
Matthias Kretschmann 2020-08-03 11:57:36 +02:00
parent 925cbcf173
commit 74f9c2202b
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 23 additions and 6 deletions

View File

@ -70,7 +70,7 @@ export default function Advanced({
onChange={onChange}
/>
<Coin
name="price.tokensToMint"
name="tokensToMint"
symbol="OCEAN-CAV"
value={tokensToMint.toString()}
weight={`${weightOnDataToken}%`}

View File

@ -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"

View File

@ -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} />
) : (

View File

@ -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>