1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix reset pricing on tx execution

This commit is contained in:
EnzoVezzaro 2022-08-24 06:22:57 -04:00
parent f8a6edc3c6
commit 245ccfe5e4

View File

@ -30,9 +30,10 @@ export function Steps({
useEffect(() => {
if (!chainId) return
// Reset the pricing values on chainId change
// the user needs to update the pricing schema on network changes
if (values.pricing.price) {
// Reset the pricing values on chainId change:
// - the user needs to update the pricing schema on network changes
// - if the tx has been started, don't restore pricing values
if (values.pricing.price && values.feedback[1].status === 'pending') {
setFieldValue('pricing', initialValues.pricing)
router.push(`/publish/3`)
}