mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
fix txCount on 'Create tokens & pricing' in publish (#1187)
* fix txCount on 'Create tokens & pricing' in publish * fix description on submit step in publish
This commit is contained in:
parent
bea8635a53
commit
8d852323ad
@ -1,6 +1,6 @@
|
|||||||
import { ReactElement, useEffect } from 'react'
|
import { ReactElement, useEffect } from 'react'
|
||||||
import { useFormikContext } from 'formik'
|
import { useFormikContext } from 'formik'
|
||||||
import { wizardSteps } from './_constants'
|
import { wizardSteps, initialPublishFeedback } from './_constants'
|
||||||
import { useWeb3 } from '@context/Web3'
|
import { useWeb3 } from '@context/Web3'
|
||||||
import { FormPublishData, PublishFeedback } from './_types'
|
import { FormPublishData, PublishFeedback } from './_types'
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ export function Steps({
|
|||||||
'a single transaction',
|
'a single transaction',
|
||||||
'a single transaction, after an initial approve transaction'
|
'a single transaction, after an initial approve transaction'
|
||||||
)
|
)
|
||||||
: feedback['1'].description
|
: initialPublishFeedback['1'].description
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, [values.pricing.type, setFieldValue])
|
}, [values.pricing.type, setFieldValue])
|
||||||
|
@ -63,7 +63,15 @@ export default function PublishPage({
|
|||||||
...prevState,
|
...prevState,
|
||||||
'1': {
|
'1': {
|
||||||
...prevState['1'],
|
...prevState['1'],
|
||||||
status: 'active'
|
status: 'active',
|
||||||
|
txCount: values.pricing.type === 'dynamic' ? 2 : 1,
|
||||||
|
description:
|
||||||
|
values.pricing.type === 'dynamic'
|
||||||
|
? prevState['1'].description.replace(
|
||||||
|
'a single transaction',
|
||||||
|
'a single transaction, after an initial approve transaction'
|
||||||
|
)
|
||||||
|
: prevState['1'].description
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@ -102,7 +110,14 @@ export default function PublishPage({
|
|||||||
'1': {
|
'1': {
|
||||||
...prevState['1'],
|
...prevState['1'],
|
||||||
status: 'error',
|
status: 'error',
|
||||||
errorMessage: error.message
|
errorMessage: error.message,
|
||||||
|
description:
|
||||||
|
values.pricing.type === 'dynamic'
|
||||||
|
? prevState['1'].description.replace(
|
||||||
|
'a single transaction',
|
||||||
|
'a single transaction, after an initial approve transaction'
|
||||||
|
)
|
||||||
|
: prevState['1'].description
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user