Skip to content

Commit

Permalink
Merge branch 'main' into env/testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
alanrsoares committed Jan 17, 2024
2 parents 9487119 + c10add0 commit ccfe01e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ccfe01e

Please sign in to comment.