@gearbox-protocol/ui-kit 4.0.0-next.85 → 4.0.0-next.86
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../utils/internal/static.cjs"),e=d.getStatic("/tokens/default.svg"),r=d.getStatic("/logo/logo_symbol.png");function u(t){return t.replaceAll("/","").replaceAll(" ","").toLowerCase()}const w={"crvusdfrax-f":"crvusdfrax","crvusdusdc-f":"crvusdusdc","crvusdusdt-f":"crvusdusdt","cvxcrvusdfrax-f":"cvxcrvusdfrax","cvxcrvusdusdc-f":"cvxcrvusdusdc","cvxcrvusdusdt-f":"cvxcrvusdusdt","stkcvxcrvusdfrax-f":"stkcvxcrvusdfrax","stkcvxcrvusdusdc-f":"stkcvxcrvusdusdc","stkcvxcrvusdusdt-f":"stkcvxcrvusdusdt","wdwsteth[cp0xlrt]":"wdwsteth","wdwsteth[pzeth]":"wdwsteth","wdwsteth[re7lrt]":"wdwsteth","wdwsteth[rsteth]":"wdwsteth","wdwsteth[steaklrt]":"wdwsteth",wdiusd:"iusd",wdrseth:"rseth","dwbtc-v3-0":"dwbtcv3","dwethv3-cp0x":"dwethv3",fweth:"weth",fwsteth:"wsteth",kpkfrxusd:"frxusd",kpkweth:"weth",kpkwsteth:"wsteth",stkrlusdusdc:"rlusdusdc",syusd:"yusd",xtz:"wxtz","cyb-cbbtc":"cbbtc","cyb-tbtc":"tbtc","cyb-wbtc":"wbtc",re7tbtc:"tbtc",re7usdc:"usdc"};function v(t){const s=typeof t=="string"?t:t?.symbol;if(!s)return e;if(s==="GEAR")return r;const c=u(s);return c?d.getStatic(`/tokens/${w[c]??c}.svg`):e}exports.getTokenIconUrl=v;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { getStatic as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import { getStatic as d } from "../../utils/internal/static.js";
|
|
2
|
+
const r = d("/tokens/default.svg"), u = d("/logo/logo_symbol.png");
|
|
3
|
+
function e(t) {
|
|
4
|
+
return t.replaceAll("/", "").replaceAll(" ", "").toLowerCase();
|
|
5
5
|
}
|
|
6
|
-
const
|
|
6
|
+
const w = {
|
|
7
|
+
// Curve factory pools, on the base pool's icon.
|
|
7
8
|
"crvusdfrax-f": "crvusdfrax",
|
|
8
9
|
"crvusdusdc-f": "crvusdusdc",
|
|
9
10
|
"crvusdusdt-f": "crvusdusdt",
|
|
@@ -12,15 +13,43 @@ const o = {
|
|
|
12
13
|
"cvxcrvusdusdt-f": "cvxcrvusdusdt",
|
|
13
14
|
"stkcvxcrvusdfrax-f": "stkcvxcrvusdfrax",
|
|
14
15
|
"stkcvxcrvusdusdc-f": "stkcvxcrvusdusdc",
|
|
15
|
-
"stkcvxcrvusdusdt-f": "stkcvxcrvusdusdt"
|
|
16
|
+
"stkcvxcrvusdusdt-f": "stkcvxcrvusdusdt",
|
|
17
|
+
// Mellow withdrawal phantoms. The SDK reports all of them as one `wdwstETH`;
|
|
18
|
+
// only the backend tells the vaults apart, and the icon never did.
|
|
19
|
+
"wdwsteth[cp0xlrt]": "wdwsteth",
|
|
20
|
+
"wdwsteth[pzeth]": "wdwsteth",
|
|
21
|
+
"wdwsteth[re7lrt]": "wdwsteth",
|
|
22
|
+
"wdwsteth[rsteth]": "wdwsteth",
|
|
23
|
+
"wdwsteth[steaklrt]": "wdwsteth",
|
|
24
|
+
// Withdrawal phantoms of a single asset.
|
|
25
|
+
wdiusd: "iusd",
|
|
26
|
+
wdrseth: "rseth",
|
|
27
|
+
// Curator variants of a pool share token.
|
|
28
|
+
"dwbtc-v3-0": "dwbtcv3",
|
|
29
|
+
"dwethv3-cp0x": "dwethv3",
|
|
30
|
+
// Wrappers and staked versions, on the asset they hold.
|
|
31
|
+
fweth: "weth",
|
|
32
|
+
fwsteth: "wsteth",
|
|
33
|
+
kpkfrxusd: "frxusd",
|
|
34
|
+
kpkweth: "weth",
|
|
35
|
+
kpkwsteth: "wsteth",
|
|
36
|
+
stkrlusdusdc: "rlusdusdc",
|
|
37
|
+
syusd: "yusd",
|
|
38
|
+
xtz: "wxtz",
|
|
39
|
+
// Curated vaults, on their underlying.
|
|
40
|
+
"cyb-cbbtc": "cbbtc",
|
|
41
|
+
"cyb-tbtc": "tbtc",
|
|
42
|
+
"cyb-wbtc": "wbtc",
|
|
43
|
+
re7tbtc: "tbtc",
|
|
44
|
+
re7usdc: "usdc"
|
|
16
45
|
};
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
if (!
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
return
|
|
46
|
+
function f(t) {
|
|
47
|
+
const s = typeof t == "string" ? t : t?.symbol;
|
|
48
|
+
if (!s) return r;
|
|
49
|
+
if (s === "GEAR") return u;
|
|
50
|
+
const c = e(s);
|
|
51
|
+
return c ? d(`/tokens/${w[c] ?? c}.svg`) : r;
|
|
23
52
|
}
|
|
24
53
|
export {
|
|
25
|
-
|
|
54
|
+
f as getTokenIconUrl
|
|
26
55
|
};
|