@hyperbridge/sdk 1.3.16 → 1.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3588,7 +3588,7 @@ var consensusStateIds = {
3588
3588
  ["EVM-56" /* BSC_MAINNET */]: "BSC0",
3589
3589
  ["EVM-42161" /* ARBITRUM_MAINNET */]: "ETH0",
3590
3590
  ["EVM-8453" /* BASE_MAINNET */]: "ETH0",
3591
- ["EVM-137" /* POLYGON_MAINNET */]: "ETH0",
3591
+ ["EVM-137" /* POLYGON_MAINNET */]: "POLY",
3592
3592
  ["EVM-130" /* UNICHAIN_MAINNET */]: "ETH0"
3593
3593
  };
3594
3594
  var coingeckoIds = {
@@ -3600,7 +3600,7 @@ var coingeckoIds = {
3600
3600
  ["EVM-56" /* BSC_MAINNET */]: "binance-smart-chain",
3601
3601
  ["EVM-42161" /* ARBITRUM_MAINNET */]: "arbitrum-one",
3602
3602
  ["EVM-8453" /* BASE_MAINNET */]: "base",
3603
- ["EVM-137" /* POLYGON_MAINNET */]: "matic-network",
3603
+ ["EVM-137" /* POLYGON_MAINNET */]: "polygon-pos",
3604
3604
  ["EVM-130" /* UNICHAIN_MAINNET */]: "ethereum"
3605
3605
  };
3606
3606
 
@@ -4514,7 +4514,7 @@ var dateStringtoTimestamp = (date) => {
4514
4514
  }
4515
4515
  return new Date(date).getTime();
4516
4516
  };
4517
- function mapTestnetToMainnet(identifier) {
4517
+ function mapToValidCoingeckoId(identifier) {
4518
4518
  identifier = identifier.toLowerCase();
4519
4519
  switch (identifier) {
4520
4520
  case "bnb":
@@ -4535,12 +4535,14 @@ function mapTestnetToMainnet(identifier) {
4535
4535
  return "dai";
4536
4536
  case "0xa801da100bf16d07f668f4a49e1f71fc54d05177".toLowerCase():
4537
4537
  return "dai";
4538
+ case "pol":
4539
+ return "polygon-ecosystem-token";
4538
4540
  default:
4539
4541
  return identifier;
4540
4542
  }
4541
4543
  }
4542
4544
  async function fetchPrice(identifier, chainId = 1, apiKey) {
4543
- const mappedIdentifier = mapTestnetToMainnet(identifier);
4545
+ const mappedIdentifier = mapToValidCoingeckoId(identifier);
4544
4546
  const network = new ChainConfigService().getCoingeckoId(`EVM-${chainId}`) || "ethereum";
4545
4547
  apiKey = apiKey || (typeof process !== "undefined" ? process?.env?.COINGECKO : void 0);
4546
4548
  const baseUrl = apiKey ? "https://pro-api.coingecko.com/api/v3" : "https://api.coingecko.com/api/v3";