@gearbox-protocol/ui-kit 3.14.0-next.65 → 3.14.0-next.67
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/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
- package/dist/cjs/components/breakpoint-provider.cjs +1 -0
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
- package/dist/cjs/components/composites/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/columns.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/cells/cells.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/cells/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/points-feature/points-feature.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/strategies-table.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/types/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/types/rewards-cell.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy-legacy.cjs +1 -0
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/compound-apy/index.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/apy-tooltip.cjs +1 -0
- package/dist/cjs/components/pool-apy-tooltip/index.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
- package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
- package/dist/cjs/components/token-symbol/index.cjs +1 -1
- package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/index.cjs +1 -0
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -0
- package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
- package/dist/cjs/hooks/use-media-query.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/types/common.cjs +1 -1
- package/dist/cjs/utils/apy-breakdown.cjs +1 -0
- package/dist/cjs/utils/bps.cjs +1 -0
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/token-icon-source.cjs +1 -0
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +132 -206
- package/dist/esm/components/block-sync/block-sync.js +5 -4
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +5 -4
- package/dist/esm/components/breakpoint-provider.js +67 -0
- package/dist/esm/components/checkbox/checkbox-labeled.js +3 -2
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +3 -2
- package/dist/esm/components/complex-input/complex-input.js +5 -4
- package/dist/esm/components/composites/index.js +86 -81
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +3 -2
- package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.js +3 -2
- package/dist/esm/components/composites/pool-table/columns.js +61 -60
- package/dist/esm/components/composites/strategies-table/columns.js +55 -86
- package/dist/esm/components/composites/strategies-table/components/cells/cells.js +150 -110
- package/dist/esm/components/composites/strategies-table/components/cells/index.js +7 -5
- package/dist/esm/components/composites/strategies-table/components/index.js +32 -30
- package/dist/esm/components/composites/strategies-table/components/points-feature/points-feature.js +35 -32
- package/dist/esm/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.js +91 -224
- package/dist/esm/components/composites/strategies-table/components/strategies-table.js +26 -24
- package/dist/esm/components/composites/strategies-table/index.js +36 -31
- package/dist/esm/components/composites/strategies-table/types/index.js +5 -1
- package/dist/esm/components/composites/strategies-table/types/rewards-cell.js +40 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +32 -189
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +5 -4
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmShell.js +26 -26
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.js +40 -38
- package/dist/esm/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.js +53 -47
- package/dist/esm/components/compound-apy/compound-apy-legacy.js +127 -0
- package/dist/esm/components/compound-apy/compound-apy.js +56 -245
- package/dist/esm/components/compound-apy/index.js +4 -2
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +25 -180
- package/dist/esm/components/index.js +805 -787
- package/dist/esm/components/markdown-viewer/markdown-viewer.js +5 -4
- package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +155 -0
- package/dist/esm/components/pool-apy-tooltip/index.js +4 -2
- package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +3 -3
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +3 -2
- package/dist/esm/components/token-icon/token-icon.js +72 -58
- package/dist/esm/components/token-symbol/index.js +2 -3
- package/dist/esm/components/token-symbol/token-symbol.js +41 -62
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +35 -192
- package/dist/esm/components/with-copy/with-copy.js +5 -4
- package/dist/esm/components/yield-breakdown-tooltip/index.js +4 -0
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +222 -0
- package/dist/esm/hooks/use-debounce-call.js +3 -2
- package/dist/esm/hooks/use-media-query.js +49 -16
- package/dist/esm/index.js +974 -946
- package/dist/esm/locale/en.json.js +9 -2
- package/dist/esm/types/common.js +1 -6
- package/dist/esm/utils/apy-breakdown.js +18 -0
- package/dist/esm/utils/bps.js +4 -0
- package/dist/esm/utils/index.js +105 -95
- package/dist/esm/utils/token-icon-source.js +48 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +44 -4
- package/dist/types/components/breakpoint-provider.d.ts +56 -0
- package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +1 -1
- package/dist/types/components/composites/strategies-table/components/cells/cells.d.ts +34 -3
- package/dist/types/components/composites/strategies-table/components/points-feature/points-feature.d.ts +14 -10
- package/dist/types/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.d.ts +10 -13
- package/dist/types/components/composites/strategies-table/index.d.ts +1 -1
- package/dist/types/components/composites/strategies-table/types/index.d.ts +1 -0
- package/dist/types/components/composites/strategies-table/types/rewards-cell.d.ts +48 -0
- package/dist/types/components/composites/strategies-table/types/rewards-tooltip.d.ts +37 -32
- package/dist/types/components/composites/strategies-table/types/table.d.ts +27 -12
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +3 -3
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmFailureResult.d.ts +4 -0
- package/dist/types/components/composites/tx-preview/confirm/result/TransactionConfirmSuccessResult.d.ts +5 -0
- package/dist/types/components/compound-apy/compound-apy-legacy.d.ts +109 -0
- package/dist/types/components/compound-apy/compound-apy.d.ts +18 -94
- package/dist/types/components/compound-apy/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/points-icon/index.d.ts +1 -1
- package/dist/types/components/points-icon/points-icon.d.ts +13 -2
- package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +20 -0
- package/dist/types/components/pool-apy-tooltip/index.d.ts +1 -0
- package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +18 -1
- package/dist/types/components/token-icon/token-icon.d.ts +11 -2
- package/dist/types/components/token-symbol/token-symbol.d.ts +4 -4
- package/dist/types/components/yield-breakdown-tooltip/index.d.ts +1 -0
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +32 -0
- package/dist/types/hooks/use-media-query.d.ts +5 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/locale/en.json.d.ts +10 -2
- package/dist/types/types/common.d.ts +5 -11
- package/dist/types/utils/apy-breakdown.d.ts +18 -0
- package/dist/types/utils/bps.d.ts +3 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/token-icon-source.d.ts +28 -0
- package/package.json +2 -2
|
@@ -67,6 +67,15 @@ const e = {
|
|
|
67
67
|
"components.apyParts.totalAPY": "Overall APY",
|
|
68
68
|
"components.apyParts.points": "{symbol} Incentive",
|
|
69
69
|
"components.apyParts.points.condition.crossDeposit": "For cross-chain deposits made via Omni",
|
|
70
|
+
"components.yieldBreakdown.title": "Yield Breakdown",
|
|
71
|
+
"components.yieldBreakdown.atLeverage": "at {leverage}× leverage",
|
|
72
|
+
"components.yieldBreakdown.baseYield": "Base Yield",
|
|
73
|
+
"components.yieldBreakdown.incentiveYield": "Incentive Yield",
|
|
74
|
+
"components.yieldBreakdown.borrowRate": "Borrow Rate",
|
|
75
|
+
"components.yieldBreakdown.baseRate": "Base Rate",
|
|
76
|
+
"components.yieldBreakdown.additionalRate": "Additional Rate",
|
|
77
|
+
"components.yieldBreakdown.netYield": "Net Yield",
|
|
78
|
+
"components.yieldBreakdown.points": "Points",
|
|
70
79
|
"components.openCopyButtons.copy": "Copy to clipboard",
|
|
71
80
|
"components.poolAssetsTable.asset": "Asset",
|
|
72
81
|
"components.poolAssetsTable.rate": "Effective rate",
|
|
@@ -121,8 +130,6 @@ const e = {
|
|
|
121
130
|
"components.rewardsTooltip.with.title": "With {leverage} Leverage",
|
|
122
131
|
"components.rewardsTooltip.with.borrowRate": "{symbol} borrow rate",
|
|
123
132
|
"components.rewardsTooltip.with.quotaRate": "Quota rate",
|
|
124
|
-
"components.rewardsTooltip.with.bonusAPY.title": "Target Bonuses Yield",
|
|
125
|
-
"components.rewardsTooltip.with.bonusAPY.tip": "Expected Bonuses APY is calculated by the Asset Issuer and represents the expected value to be paid out in points.",
|
|
126
133
|
"components.rewardsTooltip.with.extra": "+ Extra APR",
|
|
127
134
|
"components.rewardsTooltip.button": "Click to show rewards details",
|
|
128
135
|
"components.strategiesTable.head.name": "Strategy",
|
package/dist/esm/types/common.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function o(t) {
|
|
2
|
+
return t.totalApy ?? t.organicApy;
|
|
3
|
+
}
|
|
4
|
+
function r(t) {
|
|
5
|
+
return (t.rewards ?? []).flatMap((n) => n.kind === "token" ? [n] : []);
|
|
6
|
+
}
|
|
7
|
+
function e(t) {
|
|
8
|
+
return (t.rewards ?? []).flatMap((n) => n.kind === "point" ? n.points : []);
|
|
9
|
+
}
|
|
10
|
+
function i(t) {
|
|
11
|
+
return r(t).filter((n) => (n.supplyApr ?? 0) > 0);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
e as pointProgramsOf,
|
|
15
|
+
i as positiveTokenRewardsOf,
|
|
16
|
+
r as tokenRewardsOf,
|
|
17
|
+
o as totalApyOf
|
|
18
|
+
};
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,97 +1,107 @@
|
|
|
1
|
-
import { generateId as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
1
|
+
import { generateId as r, useFormFieldIds as t } from "./a11y.js";
|
|
2
|
+
import { pointProgramsOf as m, positiveTokenRewardsOf as n, tokenRewardsOf as i, totalApyOf as p } from "./apy-breakdown.js";
|
|
3
|
+
import { bnToInputView as l } from "./bn-to-input-view.js";
|
|
4
|
+
import { bnToPrettyView as T } from "./bn-to-pretty-view.js";
|
|
5
|
+
import { bpsToPercent as c } from "./bps.js";
|
|
6
|
+
import { cn as S, cn as d } from "./cn.js";
|
|
7
|
+
import { generateColorsFromBase as h, getCSSVariable as b, hexToRgba as A, hslToHex as I, resolveCSSColor as N } from "./colors.js";
|
|
8
|
+
import { copyToClipboard as P } from "./copy.js";
|
|
9
|
+
import { convertPercent as y, formatBytecodeSize as w, formatBytecodeVersion as L, formatTimestamp as C, shortenHash as F, significantTrunc as D } from "./format.js";
|
|
10
|
+
import { formatAssetAmount as V } from "./format-asset-amount.js";
|
|
11
|
+
import { formatMoney as M, formatMoneyAmount as R, formatPercentAmount as _, percentTemplate as E, percentageTemplate as H } from "./format-money.js";
|
|
12
|
+
import { FORMAT_CONSTANTS as Z, formatNumberWithSuffix as z, formatPrice as U, getAdaptiveDecimals as X, isBelowDisplayThreshold as q, isEffectivelyZero as j, toSignificantDigits as G } from "./format-number.js";
|
|
13
|
+
import { slippageTemplate as K } from "./format-slippage.js";
|
|
14
|
+
import { allLoaded as Y, loadingProgress as $, round5 as ee } from "./loading.js";
|
|
15
|
+
import { decimalsToStep as re, findClosestPoint as te, formatWithDecimals as ae, formatWithoutDecimals as me, splitInterval as ne, validateMinMax as ie } from "./math.js";
|
|
16
|
+
import { getNetworkIcon as fe } from "./network-icons.js";
|
|
17
|
+
import { bnToLiquidationPriceView as se, isPositiveFloat as Te, parseInputToBN as xe, parseSmallNumber as ce } from "./parse-input-to-bn.js";
|
|
18
|
+
import { pluralize as Se, selectPluralString as de } from "./plural.js";
|
|
19
|
+
import { getAvailableRanges as he } from "./ranges.js";
|
|
20
|
+
import { extractTextFromLabel as Ae, serializeValue as Ie } from "./react.js";
|
|
21
|
+
import { searchInString as ke } from "./search.js";
|
|
22
|
+
import { createTokenSearchFilter as ve, searchInToken as ye } from "./search-in-token.js";
|
|
23
|
+
import { shortSHA as Le } from "./short-sha.js";
|
|
24
|
+
import { isLongString as Fe, shortenString as De } from "./shorten-string.js";
|
|
25
|
+
import { negativeTokenTemplate as Ve, tokenTemplate as Be, tokenTemplateNumber as Me, tokenTemplateString as Re } from "./templates.js";
|
|
26
|
+
import { getTokenIcon as Ee, parseShareTokenUnderlying as He } from "./token-icon-source.js";
|
|
27
|
+
import { TTL_CONSTANTS as Ze, getTTLZones as ze, ttlFromTimestamp as Ue, ttlLeft as Xe, ttlLeftHuman as qe } from "./ttl.js";
|
|
28
|
+
import { openInNewWindow as Ge } from "./window.js";
|
|
29
|
+
import { Z_INDEX as Ke, Z_INDEX_VALUES as Qe } from "./z-index.js";
|
|
27
30
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
31
|
+
Z as FORMAT_CONSTANTS,
|
|
32
|
+
Ze as TTL_CONSTANTS,
|
|
33
|
+
Ke as Z_INDEX,
|
|
34
|
+
Qe as Z_INDEX_VALUES,
|
|
35
|
+
Y as allLoaded,
|
|
36
|
+
l as bnToInputView,
|
|
37
|
+
se as bnToLiquidationPriceView,
|
|
38
|
+
T as bnToPrettyView,
|
|
39
|
+
c as bpsToPercent,
|
|
40
|
+
S as cn,
|
|
41
|
+
y as convertPercent,
|
|
42
|
+
P as copyToClipboard,
|
|
43
|
+
ve as createTokenSearchFilter,
|
|
44
|
+
re as decimalsToStep,
|
|
45
|
+
d as default,
|
|
46
|
+
Ae as extractTextFromLabel,
|
|
47
|
+
te as findClosestPoint,
|
|
48
|
+
V as formatAssetAmount,
|
|
49
|
+
w as formatBytecodeSize,
|
|
50
|
+
L as formatBytecodeVersion,
|
|
51
|
+
M as formatMoney,
|
|
52
|
+
R as formatMoneyAmount,
|
|
53
|
+
z as formatNumberWithSuffix,
|
|
54
|
+
_ as formatPercentAmount,
|
|
55
|
+
U as formatPrice,
|
|
56
|
+
C as formatTimestamp,
|
|
57
|
+
ae as formatWithDecimals,
|
|
58
|
+
me as formatWithoutDecimals,
|
|
59
|
+
h as generateColorsFromBase,
|
|
60
|
+
r as generateId,
|
|
61
|
+
X as getAdaptiveDecimals,
|
|
62
|
+
he as getAvailableRanges,
|
|
63
|
+
b as getCSSVariable,
|
|
64
|
+
fe as getNetworkIcon,
|
|
65
|
+
ze as getTTLZones,
|
|
66
|
+
Ee as getTokenIcon,
|
|
67
|
+
A as hexToRgba,
|
|
68
|
+
I as hslToHex,
|
|
69
|
+
q as isBelowDisplayThreshold,
|
|
70
|
+
j as isEffectivelyZero,
|
|
71
|
+
Fe as isLongString,
|
|
72
|
+
Te as isPositiveFloat,
|
|
73
|
+
$ as loadingProgress,
|
|
74
|
+
Ve as negativeTokenTemplate,
|
|
75
|
+
Ge as openInNewWindow,
|
|
76
|
+
xe as parseInputToBN,
|
|
77
|
+
He as parseShareTokenUnderlying,
|
|
78
|
+
ce as parseSmallNumber,
|
|
79
|
+
E as percentTemplate,
|
|
80
|
+
H as percentageTemplate,
|
|
81
|
+
Se as pluralize,
|
|
82
|
+
m as pointProgramsOf,
|
|
83
|
+
n as positiveTokenRewardsOf,
|
|
84
|
+
N as resolveCSSColor,
|
|
85
|
+
ee as round5,
|
|
86
|
+
ke as searchInString,
|
|
87
|
+
ye as searchInToken,
|
|
88
|
+
de as selectPluralString,
|
|
89
|
+
Ie as serializeValue,
|
|
90
|
+
Le as shortSHA,
|
|
91
|
+
F as shortenHash,
|
|
92
|
+
De as shortenString,
|
|
93
|
+
D as significantTrunc,
|
|
94
|
+
K as slippageTemplate,
|
|
95
|
+
ne as splitInterval,
|
|
96
|
+
G as toSignificantDigits,
|
|
97
|
+
i as tokenRewardsOf,
|
|
98
|
+
Be as tokenTemplate,
|
|
99
|
+
Me as tokenTemplateNumber,
|
|
100
|
+
Re as tokenTemplateString,
|
|
101
|
+
p as totalApyOf,
|
|
102
|
+
Ue as ttlFromTimestamp,
|
|
103
|
+
Xe as ttlLeft,
|
|
104
|
+
qe as ttlLeftHuman,
|
|
105
|
+
t as useFormFieldIds,
|
|
106
|
+
ie as validateMinMax
|
|
97
107
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getStatic as s } from "./static.js";
|
|
2
|
+
const f = s("/tokens/templates/diesel.svg"), l = s("/logo/logo_symbol.png"), n = /V\d+$/, o = "_OLD", u = [
|
|
3
|
+
{ prefix: "farmd", requiresVersion: !1 },
|
|
4
|
+
{ prefix: "wd", requiresVersion: !1 },
|
|
5
|
+
{ prefix: "sd", requiresVersion: !0 },
|
|
6
|
+
{ prefix: "d", requiresVersion: !0 }
|
|
7
|
+
];
|
|
8
|
+
function c(e) {
|
|
9
|
+
for (const { prefix: i, requiresVersion: t } of u) {
|
|
10
|
+
if (!e.startsWith(i)) continue;
|
|
11
|
+
let r = e.slice(i.length);
|
|
12
|
+
if (r.endsWith(o) && (r = r.slice(0, -o.length)), n.test(r))
|
|
13
|
+
r = r.replace(n, "");
|
|
14
|
+
else if (t)
|
|
15
|
+
continue;
|
|
16
|
+
if (r) return r;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function d(e) {
|
|
20
|
+
return {
|
|
21
|
+
kind: "composite",
|
|
22
|
+
preset: "centered_foreground",
|
|
23
|
+
scaleFactor: 0.74,
|
|
24
|
+
layers: [
|
|
25
|
+
{
|
|
26
|
+
type: "url",
|
|
27
|
+
url: f
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: "symbol",
|
|
31
|
+
symbol: e
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function g(e) {
|
|
37
|
+
if (e === void 0) return;
|
|
38
|
+
const i = typeof e == "string" ? e : e.symbol;
|
|
39
|
+
if (!i) return;
|
|
40
|
+
if (i === "GEAR")
|
|
41
|
+
return { icon: l };
|
|
42
|
+
const t = c(i);
|
|
43
|
+
return t ? d(t) : i;
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
g as getTokenIcon,
|
|
47
|
+
c as parseShareTokenUnderlying
|
|
48
|
+
};
|