Skip to content

Commit

Permalink
Add chain switching logic in EstablishEssentials component
Browse files Browse the repository at this point in the history
  • Loading branch information
Da-Colon committed Dec 18, 2024
1 parent 929838a commit 9f0017d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ export function EstablishEssentials(props: ICreationStepProps) {
},
});

useEffect(() => {
if (chain.id !== walletChainID) {
const chainId = getChainIdFromPrefix(addressPrefix);
switchChain({ chainId });
}
});

return (
<>
<StepWrapper
Expand Down

0 comments on commit 9f0017d

Please sign in to comment.