Skip to content

Commit

Permalink
Merge pull request #506 from lidofinance/fix/not-critical-fixes
Browse files Browse the repository at this point in the history
fix: fix not critical fixes
  • Loading branch information
itaven authored Oct 16, 2024
2 parents 800c5de + 9ad87d2 commit fa89a41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion features/wsteth/shared/wallet/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,16 @@ export const Wallet: WalletComponentType = memo((props) => {
const { chainName, isMatchDappChainAndWalletChain } = useDappChain();

if (isDappActive && !isMatchDappChainAndWalletChain(chainId)) {
const switchToEthereum =
config.defaultChain === CHAINS.Mainnet
? 'Ethereum'
: capitalizeFirstLetter(CHAINS[config.defaultChain]);

const switchToOptimism =
config.supportedChains.indexOf(CHAINS.Optimism) > -1
? capitalizeFirstLetter(OPTIMISM)
: 'Optimism Sepolia';
const error = `Wrong network. Please switch to ${chainName === OPTIMISM ? switchToOptimism : capitalizeFirstLetter(CHAINS[config.defaultChain])} in your wallet to wrap/unwrap.`;
const error = `Wrong network. Please switch to ${chainName === OPTIMISM ? switchToOptimism : switchToEthereum} in your wallet to wrap/unwrap.`;
return <Fallback error={error} {...props} />;
}

Expand Down
4 changes: 3 additions & 1 deletion shared/components/layout/header/components/header-wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ const HeaderWallet: FC = () => {
chainName = 'Optimism Sepolia';
}

const testNet = chainId !== legacySDKCHAINS.Mainnet;
const testNet = !(
chainId === legacySDKCHAINS.Mainnet || chainId === CHAINS.Optimism
);
const showNet = testNet && isDappActive;
const queryTheme = router?.query?.theme;

Expand Down

0 comments on commit fa89a41

Please sign in to comment.