Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(linea): enable token detection for Linea mainnet and testnet #20698

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions shared/modules/network.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export function isTokenDetectionEnabledForNetwork(chainId: string | undefined) {
case CHAIN_IDS.BSC:
case CHAIN_IDS.POLYGON:
case CHAIN_IDS.AVALANCHE:
case CHAIN_IDS.LINEA_GOERLI:
case CHAIN_IDS.LINEA_MAINNET:
case CHAIN_IDS.AURORA:
return true;
default:
Expand Down
8 changes: 7 additions & 1 deletion ui/selectors/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,10 @@ export const getTokenDetectionSupportNetworkByChainId = (state) => {
return POLYGON_DISPLAY_NAME;
case CHAIN_IDS.AVALANCHE:
return AVALANCHE_DISPLAY_NAME;
case CHAIN_IDS.LINEA_GOERLI:
return LINEA_GOERLI_DISPLAY_NAME;
case CHAIN_IDS.LINEA_MAINNET:
return LINEA_MAINNET_DISPLAY_NAME;
case CHAIN_IDS.AURORA:
return AURORA_DISPLAY_NAME;
default:
Expand All @@ -1435,7 +1439,7 @@ export const getTokenDetectionSupportNetworkByChainId = (state) => {
};
/**
* To check if the chainId supports token detection,
* currently it returns true for Ethereum Mainnet, Polygon, BSC, Avalanche and Aurora
* currently it returns true for Ethereum Mainnet, BSC, Polygon, Avalanche, Linea and Aurora
*
* @param {*} state
* @returns Boolean
Expand All @@ -1447,6 +1451,8 @@ export function getIsDynamicTokenListAvailable(state) {
CHAIN_IDS.BSC,
CHAIN_IDS.POLYGON,
CHAIN_IDS.AVALANCHE,
CHAIN_IDS.LINEA_GOERLI,
CHAIN_IDS.LINEA_MAINNET,
CHAIN_IDS.AURORA,
].includes(chainId);
}
Expand Down
Loading