coinley-test 0.0.39 → 0.0.40

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.
package/dist/index.esm.js CHANGED
@@ -2016,7 +2016,7 @@ const CmcIds = {
2016
2016
  // ARB
2017
2017
  optimism: 11840,
2018
2018
  // OP
2019
- // Stablecoins
2019
+ // Major Stablecoins
2020
2020
  USDT: 825,
2021
2021
  USDC: 3408,
2022
2022
  BUSD: 4687,
@@ -2026,11 +2026,128 @@ const CmcIds = {
2026
2026
  USDP: 5992,
2027
2027
  USDD: 5994,
2028
2028
  FDUSD: 26081,
2029
- PYUSD: 28295
2029
+ PYUSD: 28295,
2030
+ // Popular ERC-20 Tokens
2031
+ WBTC: 3717,
2032
+ // Wrapped Bitcoin
2033
+ LINK: 1975,
2034
+ // Chainlink
2035
+ UNI: 7083,
2036
+ // Uniswap
2037
+ AAVE: 7278,
2038
+ // Aave
2039
+ COMP: 5692,
2040
+ // Compound
2041
+ YFI: 5864,
2042
+ // Yearn Finance
2043
+ MKR: 1518,
2044
+ // Maker
2045
+ SUSHI: 6758,
2046
+ // SushiSwap
2047
+ CRV: 6538,
2048
+ // Curve DAO Token
2049
+ SNX: 2586,
2050
+ // Synthetix
2051
+ UMA: 5617,
2052
+ // UMA
2053
+ BAL: 5728,
2054
+ // Balancer
2055
+ MANA: 1966,
2056
+ // Decentraland
2057
+ SAND: 6210,
2058
+ // The Sandbox
2059
+ APE: 18876,
2060
+ // ApeCoin
2061
+ LDO: 8e3,
2062
+ // Lido DAO
2063
+ GRT: 6719,
2064
+ // The Graph
2065
+ ENS: 13855,
2066
+ // Ethereum Name Service
2067
+ RPL: 2943,
2068
+ // Rocket Pool
2069
+ SHIB: 5994,
2070
+ // Shiba Inu (different from USDD)
2071
+ // Other Popular Tokens
2072
+ MATIC: 3890,
2073
+ // Polygon (same as polygon network)
2074
+ BNB: 1839,
2075
+ // Binance Coin
2076
+ ADA: 2010,
2077
+ // Cardano (same as cardano network)
2078
+ SOL: 5426,
2079
+ // Solana (same as solana network)
2080
+ DOT: 6636,
2081
+ // Polkadot
2082
+ AVAX: 5805,
2083
+ // Avalanche (same as avalanche network)
2084
+ TRX: 1958,
2085
+ // Tron (same as tron network)
2086
+ ALGO: 4030,
2087
+ // Algorand (same as algorand network)
2088
+ FTM: 3513,
2089
+ // Fantom (same as fantom network)
2090
+ ARB: 11841,
2091
+ // Arbitrum (same as arbitrum network)
2092
+ OP: 11840,
2093
+ // Optimism (same as optimism network)
2094
+ // Additional DeFi tokens
2095
+ "1INCH": 8104,
2096
+ // 1inch
2097
+ DYDX: 11156,
2098
+ // dYdX
2099
+ ICP: 8916,
2100
+ // Internet Computer
2101
+ FIL: 2280,
2102
+ // Filecoin
2103
+ CAKE: 7186,
2104
+ // PancakeSwap
2105
+ RUNE: 4157,
2106
+ // THORChain
2107
+ ALPHA: 7232,
2108
+ // Alpha Finance Lab
2109
+ BNT: 1727,
2110
+ // Bancor
2111
+ KNC: 1982,
2112
+ // Kyber Network Crystal
2113
+ ZRX: 1896,
2114
+ // 0x
2115
+ REN: 2539,
2116
+ // Ren
2117
+ LRC: 1934,
2118
+ // Loopring
2119
+ // Wrapped tokens
2120
+ WETH: 2396,
2121
+ // Wrapped Ether
2122
+ WMATIC: 3890,
2123
+ // Wrapped MATIC (same as MATIC)
2124
+ WBNB: 1839,
2125
+ // Wrapped BNB (same as BNB)
2126
+ // Additional stablecoins and pegged tokens
2127
+ UST: 7129,
2128
+ // TerraUSD (Classic)
2129
+ USTC: 7129,
2130
+ // TerraUSD Classic
2131
+ LUSD: 8115,
2132
+ // Liquity USD
2133
+ MIM: 9681,
2134
+ // Magic Internet Money
2135
+ FEI: 8642,
2136
+ // Fei USD
2137
+ TRIBE: 8741,
2138
+ // Tribe
2139
+ RAI: 8525,
2140
+ // Rai Reflex Index
2141
+ SUSD: 2927
2142
+ // sUSD (Synthetix USD)
2030
2143
  };
2031
2144
  const getCmcLogoUrl = (symbol) => {
2032
- const id = CmcIds[symbol == null ? void 0 : symbol.toLowerCase()];
2033
- return id ? `${CMC_LOGO_BASE_URL}/${id}.png` : null;
2145
+ if (!symbol) return null;
2146
+ const directId = CmcIds[symbol.toUpperCase()];
2147
+ if (directId) {
2148
+ return `${CMC_LOGO_BASE_URL}/${directId}.png`;
2149
+ }
2150
+ return null;
2034
2151
  };
2035
2152
  const NetworkLogos = {
2036
2153
  ethereum: getCmcLogoUrl("ethereum"),
@@ -2045,17 +2162,8 @@ const NetworkLogos = {
2045
2162
  arbitrum: getCmcLogoUrl("arbitrum"),
2046
2163
  optimism: getCmcLogoUrl("optimism")
2047
2164
  };
2048
- const TokenLogos = {
2049
- USDT: getCmcLogoUrl("USDT"),
2050
- USDC: getCmcLogoUrl("USDC"),
2051
- BUSD: getCmcLogoUrl("BUSD"),
2052
- DAI: getCmcLogoUrl("DAI"),
2053
- FRAX: getCmcLogoUrl("FRAX"),
2054
- TUSD: getCmcLogoUrl("TUSD"),
2055
- USDP: getCmcLogoUrl("USDP"),
2056
- USDD: getCmcLogoUrl("USDD"),
2057
- FDUSD: getCmcLogoUrl("FDUSD"),
2058
- PYUSD: getCmcLogoUrl("PYUSD")
2165
+ const getTokenLogoUrl = (symbol) => {
2166
+ return getCmcLogoUrl(symbol);
2059
2167
  };
2060
2168
  const ModernDropdown = ({
2061
2169
  options = [],
@@ -2844,11 +2952,12 @@ const EnhancedSimpleCoinleyPayment = ({
2844
2952
  };
2845
2953
  const renderTokenOption = (token) => {
2846
2954
  var _a2, _b2;
2955
+ const tokenLogoUrl = getTokenLogoUrl(token.symbol);
2847
2956
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-3", children: [
2848
- TokenLogos[token.symbol] ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2957
+ tokenLogoUrl ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2849
2958
  "img",
2850
2959
  {
2851
- src: TokenLogos[token.symbol],
2960
+ src: tokenLogoUrl,
2852
2961
  alt: token.symbol,
2853
2962
  className: "w-8 h-8 rounded-full",
2854
2963
  onError: (e) => {
@@ -2861,7 +2970,7 @@ const EnhancedSimpleCoinleyPayment = ({
2861
2970
  "div",
2862
2971
  {
2863
2972
  className: "w-8 h-8 rounded-full bg-gray-200 flex items-center justify-center",
2864
- style: { display: TokenLogos[token.symbol] ? "none" : "flex" },
2973
+ style: { display: tokenLogoUrl ? "none" : "flex" },
2865
2974
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-gray-600", children: (_a2 = token.symbol) == null ? void 0 : _a2.slice(0, 2) })
2866
2975
  }
2867
2976
  ),
@@ -2986,10 +3095,10 @@ const EnhancedSimpleCoinleyPayment = ({
2986
3095
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-gray-600", children: (_a = selectedNetwork.shortName) == null ? void 0 : _a.slice(0, 2).toUpperCase() })
2987
3096
  }
2988
3097
  ),
2989
- TokenLogos[selectedToken.symbol] ? /* @__PURE__ */ jsxRuntimeExports.jsx(
3098
+ getTokenLogoUrl(selectedToken.symbol) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2990
3099
  "img",
2991
3100
  {
2992
- src: TokenLogos[selectedToken.symbol],
3101
+ src: getTokenLogoUrl(selectedToken.symbol),
2993
3102
  alt: selectedToken.symbol,
2994
3103
  className: "w-8 h-8 rounded-full",
2995
3104
  onError: (e) => {
@@ -3002,7 +3111,7 @@ const EnhancedSimpleCoinleyPayment = ({
3002
3111
  "div",
3003
3112
  {
3004
3113
  className: "w-8 h-8 rounded-full bg-gray-200 flex items-center justify-center",
3005
- style: { display: TokenLogos[selectedToken.symbol] ? "none" : "flex" },
3114
+ style: { display: getTokenLogoUrl(selectedToken.symbol) ? "none" : "flex" },
3006
3115
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-gray-600", children: (_b = selectedToken.symbol) == null ? void 0 : _b.slice(0, 2) })
3007
3116
  }
3008
3117
  ),
@@ -3062,10 +3171,10 @@ const EnhancedSimpleCoinleyPayment = ({
3062
3171
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-semibold text-gray-700", children: "Currency:" }),
3063
3172
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-semibold text-[#7042D2] flex items-center", children: [
3064
3173
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "mr-2", children: [
3065
- TokenLogos[selectedToken.symbol] ? /* @__PURE__ */ jsxRuntimeExports.jsx(
3174
+ getTokenLogoUrl(selectedToken.symbol) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
3066
3175
  "img",
3067
3176
  {
3068
- src: TokenLogos[selectedToken.symbol],
3177
+ src: getTokenLogoUrl(selectedToken.symbol),
3069
3178
  alt: selectedToken.symbol,
3070
3179
  className: "w-5 h-5 rounded-full inline-block",
3071
3180
  onError: (e) => {
@@ -3078,7 +3187,7 @@ const EnhancedSimpleCoinleyPayment = ({
3078
3187
  "div",
3079
3188
  {
3080
3189
  className: "w-5 h-5 rounded-full bg-gray-200 inline-flex items-center justify-center",
3081
- style: { display: TokenLogos[selectedToken.symbol] ? "none" : "inline-flex" },
3190
+ style: { display: getTokenLogoUrl(selectedToken.symbol) ? "none" : "inline-flex" },
3082
3191
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-gray-600", children: (_c = selectedToken.symbol) == null ? void 0 : _c.slice(0, 2) })
3083
3192
  }
3084
3193
  )