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: correct some configuration for Metis #11499

Merged
merged 1 commit into from
Mar 15, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ function useCreateParamsCallback(
const seed = Math.random().toString()
const tokenType = token!.schema === SchemaType.Native ? 0 : 1
const tokenAddress = token!.schema === SchemaType.Native ? NATIVE_TOKEN_ADDRESS : token!.address
if (!tokenAddress) return null
if (!tokenAddress) {
if (process.env.NODE_ENV === 'development' && !NATIVE_TOKEN_ADDRESS) {
console.error(
'Not native token address for chain %s. Do you forget to configure it in token.json file?',
token!.chainId,
)
}
return null
}

const paramsObj: ParamsObjType = {
publicKey,
Expand Down
2 changes: 2 additions & 0 deletions packages/web3-constants/evm/token.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"Aurora": "0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",
"Astar": "0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",
"Scroll": "0x5300000000000000000000000000000000000004",
"Metis": "0x420000000000000000000000000000000000000A",
"X1": "0x049a970485cf54904a6da1e1cea2ac18c9b8fb9f",
"X1_Testnet": "0x049a970485cf54904a6da1e1cea2ac18c9b8fb9f"
},
Expand Down Expand Up @@ -316,6 +317,7 @@
"Conflux": "0x0000000000000000000000000000000000000000",
"Astar": "0x0000000000000000000000000000000000000000",
"Scroll": "0x0000000000000000000000000000000000000000",
"Metis": "0x0000000000000000000000000000000000000000",
"X1": "0x0000000000000000000000000000000000000000",
"X1_Testnet": "0x0000000000000000000000000000000000000000"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-shared/evm/src/constants/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@
"name": "Metis",
"symbol": "METIS",
"decimals": 18,
"logoURL": "https://imagedelivery.net/PCnTHRkdRhGodr0AWBAvMA/Assets/blockchains/metis/info/logo.png/quality=85"
"logoURL": "https://bridge.metis.io/static/media/logo.f1bdb422692299f1b236d7144106b7af.svg"
},
"defaultGasLimit": "90000",
"minGasLimit": "21000",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-shared/evm/src/constants/descriptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const NETWORK_DESCRIPTORS: ReadonlyArray<NetworkDescriptor<ChainId, Netwo
type: NetworkType.Metis,
icon: new URL('../assets/metis.svg', import.meta.url).href,
iconColor: 'rgb(36, 150, 238)',
name: 'Metis Andromeda',
name: 'Metis',
isMainnet: true,
averageBlockDelay: 10,
},
Expand Down