From 245ccfe5e4044c3c54ca64aa404f8a99d35f91ec Mon Sep 17 00:00:00 2001 From: EnzoVezzaro Date: Wed, 24 Aug 2022 06:22:57 -0400 Subject: [PATCH] fix reset pricing on tx execution --- src/components/Publish/Steps.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Publish/Steps.tsx b/src/components/Publish/Steps.tsx index c35d6a260..ece8d4607 100644 --- a/src/components/Publish/Steps.tsx +++ b/src/components/Publish/Steps.tsx @@ -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`) }