diff --git a/apps/maestro/src/features/CanonicalTokenDeployment/CanonicalTokenDeployment.state.ts b/apps/maestro/src/features/CanonicalTokenDeployment/CanonicalTokenDeployment.state.ts index d5de8b660..2cacfbb04 100644 --- a/apps/maestro/src/features/CanonicalTokenDeployment/CanonicalTokenDeployment.state.ts +++ b/apps/maestro/src/features/CanonicalTokenDeployment/CanonicalTokenDeployment.state.ts @@ -65,13 +65,15 @@ function useCanonicalTokenDeploymentState( } setState((draft) => { - if ( + const shouldUpdateStep = (partialInitialState.step !== undefined && !draft.step) || partialInitialState.tokenDetails?.tokenAddress !== - draft.tokenDetails.tokenAddress - ) { + draft.tokenDetails.tokenAddress; + + if (shouldUpdateStep) { draft.step = partialInitialState.step ?? draft.step; } + draft.tokenDetails = { ...draft.tokenDetails, ...partialInitialState.tokenDetails, diff --git a/apps/maestro/src/features/InterchainTokenDeployment/InterchainTokenDeployment.state.ts b/apps/maestro/src/features/InterchainTokenDeployment/InterchainTokenDeployment.state.ts index 7c13d395a..0be10aa2e 100644 --- a/apps/maestro/src/features/InterchainTokenDeployment/InterchainTokenDeployment.state.ts +++ b/apps/maestro/src/features/InterchainTokenDeployment/InterchainTokenDeployment.state.ts @@ -113,7 +113,15 @@ function useInterchainTokenDeploymentState( } setState((draft) => { - draft.step = partialInitialState.step ?? draft.step; + const shouldUpdateStep = + (partialInitialState.step !== undefined && !draft.step) || + partialInitialState.tokenDetails?.tokenAddress !== + draft.tokenDetails.tokenAddress; + + if (shouldUpdateStep) { + draft.step = partialInitialState.step ?? draft.step; + } + draft.tokenDetails = { ...draft.tokenDetails, ...partialInitialState.tokenDetails,