Skip to content

Commit

Permalink
Update polygon ticker details
Browse files Browse the repository at this point in the history
  • Loading branch information
yashovardhan committed Oct 9, 2024
1 parent 9defd01 commit 485663e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 32 deletions.
8 changes: 4 additions & 4 deletions demo/react-app/src/config/chainConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const CHAIN_CONFIG = {
blockExplorerUrl: "https://polygonscan.com/",
chainId: "0x89",
displayName: "Polygon Mainnet",
ticker: "matic",
tickerName: "Matic",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
logo: "https://images.toruswallet.io/matic.svg",
chainNamespace: CHAIN_NAMESPACES.EIP155,
} as CustomChainConfig,
Expand All @@ -36,8 +36,8 @@ export const CHAIN_CONFIG = {
blockExplorerUrl: "https://amoy.polygonscan.com/",
chainId: "0x13882",
displayName: "Polygon Amoy Testnet",
ticker: "matic",
tickerName: "Matic",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
logo: "https://images.toruswallet.io/matic.svg",
chainNamespace: CHAIN_NAMESPACES.EIP155,
} as CustomChainConfig,
Expand Down
4 changes: 2 additions & 2 deletions demo/react-app/src/services/web3auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ export const Web3AuthProvider: FunctionComponent<IWeb3AuthState> = ({ children,
blockExplorerUrl: "https://polygonscan.com/",
chainId: "0x89",
displayName: "Polygon Mainnet",
ticker: "matic",
tickerName: "Matic",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
logo: "https://images.toruswallet.io/matic.svg",
chainNamespace: CHAIN_NAMESPACES.EIP155,
};
Expand Down
8 changes: 4 additions & 4 deletions demo/vite-react-app/src/config/chainConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const CHAIN_CONFIG = {
blockExplorerUrl: "https://polygonscan.com/",
chainId: "0x89",
displayName: "Polygon Mainnet",
ticker: "matic",
tickerName: "Matic",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
logo: "https://images.toruswallet.io/matic.svg",
chainNamespace: CHAIN_NAMESPACES.EIP155,
} as CustomChainConfig,
Expand All @@ -36,8 +36,8 @@ export const CHAIN_CONFIG = {
blockExplorerUrl: "https://amoy.polygonscan.com/",
chainId: "0x13882",
displayName: "Polygon Amoy Testnet",
ticker: "matic",
tickerName: "Matic",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
logo: "https://images.toruswallet.io/matic.svg",
chainNamespace: CHAIN_NAMESPACES.EIP155,
} as CustomChainConfig,
Expand Down
4 changes: 2 additions & 2 deletions demo/vite-react-app/src/services/web3auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ export const Web3AuthProvider: FunctionComponent<IWeb3AuthState> = ({ children,
blockExplorerUrl: "https://polygonscan.com/",
chainId: "0x89",
displayName: "Polygon Mainnet",
ticker: "matic",
tickerName: "Matic",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
logo: "https://images.toruswallet.io/matic.svg",
chainNamespace: CHAIN_NAMESPACES.EIP155,
};
Expand Down
13 changes: 6 additions & 7 deletions demo/vue-app-new/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ export const chainConfigs: Record<ChainNamespaceType, CustomChainConfig[]> = {
},
{
chainNamespace: CHAIN_NAMESPACES.EIP155,
rpcTarget: "https://rpc-mumbai.maticvigil.com",
blockExplorerUrl: "https://mumbai-explorer.matic.today",
logo: "https://cryptologos.cc/logos/polygon-matic-logo.png",
chainId: "0x13881",
displayName: "Polygon Mumbai Testnet",
ticker: "matic",
tickerName: "matic",
chainId: "0x13882",
rpcTarget: "https://rpc.ankr.com/polygon_amoy",
displayName: "Polygon Amoy Testnet",
blockExplorerUrl: "https://amoy.polygonscan.com/",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
},
],
[CHAIN_NAMESPACES.SOLANA]: [
Expand Down
20 changes: 11 additions & 9 deletions demo/vue-app/src/chains/matic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ import config from "../config";
import EthRpc from "../rpc/ethRpc.vue";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const polygonMumbaiConfig: any = {
const polygonAmoyConfig: any = {
chainNamespace: CHAIN_NAMESPACES.EIP155,
rpcTarget: "https://rpc-mumbai.maticvigil.com",
blockExplorerUrl: "https://mumbai-explorer.matic.today",
chainId: "0x13882", // hex of 80002, polygon testnet
rpcTarget: "https://rpc.ankr.com/polygon_amoy",
// Avoid using public rpcTarget in production.
// Use services like Infura, Quicknode etc
displayName: "Polygon Amoy Testnet",
blockExplorerUrl: "https://amoy.polygonscan.com/",
logo: "https://cryptologos.cc/logos/polygon-matic-logo.png",
chainId: "0x13881",
displayName: "Polygon Mumbai Testnet",
ticker: "matic",
tickerName: "matic",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -59,9 +61,9 @@ const ethereumChainConfig: any = {
};
const polygonWeb3AuthOptions: Web3AuthOptions = {
chainConfig: polygonMumbaiConfig,
chainConfig: polygonAmoyConfig,
clientId: config.clientId.testnet,
privateKeyProvider: new EthereumPrivateKeyProvider({ config: { chainConfig: polygonMumbaiConfig } }),
privateKeyProvider: new EthereumPrivateKeyProvider({ config: { chainConfig: polygonAmoyConfig } }),
enableLogging: true,
};
Expand Down
8 changes: 4 additions & 4 deletions packages/base/src/chain/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export const getEvmChainConfig = (chainId: number): CustomChainConfig | null =>
rpcTarget: "https://rpc.ankr.com/polygon",
displayName: "Polygon Mainnet",
blockExplorerUrl: "https://polygonscan.com",
ticker: "MATIC",
tickerName: "Polygon",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
};
}
if (chainId === 80002) {
Expand All @@ -72,8 +72,8 @@ export const getEvmChainConfig = (chainId: number): CustomChainConfig | null =>
rpcTarget: "https://rpc.ankr.com/polygon_amoy",
displayName: "Polygon Amoy Testnet",
blockExplorerUrl: "https://www.oklink.com/amoy",
ticker: "MATIC",
tickerName: "Polygon",
ticker: "POL",
tickerName: "Polygon Ecosystem Token",
decimals: 18,
};
}
Expand Down

0 comments on commit 485663e

Please sign in to comment.