Skip to content

Commit

Permalink
Merge branch 'master' into evaldofelipe/improve-ci-test
Browse files Browse the repository at this point in the history
  • Loading branch information
evaldofelipe authored Sep 25, 2023
2 parents ff92515 + 33e3c05 commit 950ea56
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions src/utils/NetworkUtils.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,6 @@
import { PublicNetworks } from "@uma/common";
import { utils as sdkUtils } from "@across-protocol/sdk-v2";

export function getNetworkName(networkId: number | string): string {
try {
const networkName = PublicNetworks[Number(networkId)].name;
return networkName.charAt(0).toUpperCase() + networkName.slice(1);
} catch (error) {
if (Number(networkId) == 666) {
return "Hardhat1";
}
if (Number(networkId) == 1337) {
return "Hardhat2";
}
if (Number(networkId) == 421613) {
return "ArbitrumGoerli";
}
if (Number(networkId) == 324) {
return "ZkSync";
}
if (Number(networkId) == 280) {
return "ZkSync-Goerli";
}
if (Number(networkId) == 8453) {
return "Base";
}
if (Number(networkId) == 84531) {
return "BaseGoerli";
}
return "unknown";
}
}
export const { getNetworkName } = sdkUtils;

export function getNativeTokenSymbol(chainId: number | string): string {
if (chainId.toString() === "137" || chainId.toString() === "80001") {
Expand Down

0 comments on commit 950ea56

Please sign in to comment.