Skip to content

Commit

Permalink
feat(qa): more accurate check for l2 banners
Browse files Browse the repository at this point in the history
  • Loading branch information
solidovic committed Jul 24, 2024
1 parent a7ad507 commit a8fbf22
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions features/stake/stake-form/wallet/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ export const Wallet: WalletComponentType = memo((props) => {
const { config } = useConfig();
const { isL2Chain, isDappActive } = useDappStatus();

// Display L2 banners only for defaultChain=Mainnet
// Display L2 banners only if defaultChain=Mainnet
// Or via QA helpers override
const showL2Chain = overrideWithQAMockBoolean(
isL2Chain && config.defaultChain === CHAINS.Mainnet,
config.defaultChain === CHAINS.Mainnet,
'mock-qa-helpers-show-l2-banners-on-testnet',
);

if (showL2Chain) {
if (isL2Chain && showL2Chain) {
return <L2Fallback {...props} />;
}

Expand Down
6 changes: 3 additions & 3 deletions features/withdrawals/claim/wallet/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ export const ClaimWallet: WalletComponentType = memo((props) => {
const { config } = useConfig();
const { isL2Chain, isDappActive } = useDappStatus();

// Display L2 banners only for defaultChain=Mainnet
// Display L2 banners only if defaultChain=Mainnet
// Or via QA helpers override
const showL2Chain = overrideWithQAMockBoolean(
isL2Chain && config.defaultChain === CHAINS.Mainnet,
config.defaultChain === CHAINS.Mainnet,
'mock-qa-helpers-show-l2-banners-on-testnet',
);

if (showL2Chain) {
if (isL2Chain && showL2Chain) {
return <L2Fallback {...props} />;
}

Expand Down
6 changes: 3 additions & 3 deletions features/withdrawals/request/wallet/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ export const RequestWallet: WalletComponentType = memo((props) => {
const { config } = useConfig();
const { isL2Chain, isDappActive } = useDappStatus();

// Display L2 banners only for defaultChain=Mainnet
// Display L2 banners only if defaultChain=Mainnet
// Or via QA helpers override
const showL2Chain = overrideWithQAMockBoolean(
isL2Chain && config.defaultChain === CHAINS.Mainnet,
config.defaultChain === CHAINS.Mainnet,
'mock-qa-helpers-show-l2-banners-on-testnet',
);

if (showL2Chain) {
if (isL2Chain && showL2Chain) {
return <L2Fallback {...props} />;
}

Expand Down
6 changes: 3 additions & 3 deletions features/wsteth/shared/wallet/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ export const Wallet: WalletComponentType = memo((props) => {
const { config } = useConfig();
const { isL2Chain, isDappActive } = useDappStatus();

// Display L2 banners only for defaultChain=Mainnet
// Display L2 banners only if defaultChain=Mainnet
// Or via QA helpers override
const showL2Chain = overrideWithQAMockBoolean(
isL2Chain && config.defaultChain === CHAINS.Mainnet,
config.defaultChain === CHAINS.Mainnet,
'mock-qa-helpers-show-l2-banners-on-testnet',
);

if (showL2Chain) {
if (isL2Chain && showL2Chain) {
return <L2Fallback {...props} />;
}

Expand Down

0 comments on commit a8fbf22

Please sign in to comment.