@gearbox-protocol/permissionless-ui 1.26.10 → 1.26.11-next.1
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/hooks/use-hf.cjs +1 -1
- package/dist/cjs/hooks/use-liquidation/index.cjs +1 -1
- package/dist/cjs/types/common.cjs +1 -0
- package/dist/esm/hooks/use-hf.js +3 -3
- package/dist/esm/hooks/use-liquidation/index.js +38 -38
- package/dist/esm/types/common.js +1 -0
- package/dist/types/components/asset-line/asset-line.d.ts +4 -3
- package/dist/types/components/compound-apy/compound-apy.d.ts +3 -4
- package/dist/types/components/credit-session-status/credit-session-status.d.ts +1 -1
- package/dist/types/components/currency-button/currency-button.d.ts +2 -2
- package/dist/types/components/detailed-apy/detailed-apy.d.ts +5 -5
- package/dist/types/components/detailed-page-title/detailed-page-title.d.ts +2 -2
- package/dist/types/components/liquidation/liquidation-assets-table/liquidation-assets-table.d.ts +2 -2
- package/dist/types/components/liquidation/liquidation-graph/liquidation-graph.d.ts +5 -4
- package/dist/types/components/liquidation/liquidation-graph-tip/liquidation-graph-tip.d.ts +2 -2
- package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +3 -3
- package/dist/types/components/slider-token/slider-token.d.ts +2 -2
- package/dist/types/components/smart-number-input/balance-indicator.d.ts +2 -2
- package/dist/types/components/smart-number-input/smart-number-input.d.ts +2 -10
- package/dist/types/components/token-symbol/token-symbol.d.ts +2 -6
- package/dist/types/components/token-template/token-template.d.ts +2 -2
- package/dist/types/components/tokens-list-cell/tokens-list-cell.d.ts +2 -2
- package/dist/types/hooks/use-hf.d.ts +4 -3
- package/dist/types/hooks/use-liquidation/index.d.ts +9 -8
- package/dist/types/hooks/use-liquidation/types.d.ts +2 -2
- package/dist/types/hooks/use-liquidation/utils.d.ts +11 -10
- package/dist/types/types/common.d.ts +23 -0
- package/dist/types/utils/interface.d.ts +0 -9
- package/dist/types/utils/search-in-token.d.ts +4 -4
- package/dist/types/utils/templates.d.ts +6 -8
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@gearbox-protocol/sdk"),i=require("react");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@gearbox-protocol/sdk"),i=require("react");function F({assets:t,quotas:c,prices:u,liquidationThresholds:n,underlyingToken:o,debt:e,quotasInfo:a,allowZeroDebt:f=!1,tokensList:l}){return{hf:i.useMemo(()=>{try{return e===0n&&!f?0:s.CreditAccountDataUtils.calcHealthFactor({assets:t,quotas:c,prices:u,liquidationThresholds:n,underlyingToken:o,debt:e,quotasInfo:a,tokensList:l})}catch(r){return typeof r=="object"&&r!==null&&"reason"in r&&r.reason==="overflow"?Number.MAX_SAFE_INTEGER:0}},[t,c,u,n,o,e,a,f,l])}}exports.useHF=F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("@gearbox-protocol/sdk"),C=require("react"),e=require("./utils.cjs"),d=35;function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("@gearbox-protocol/sdk"),C=require("react"),e=require("./utils.cjs"),d=35;function N({xMin:t,xMax:i,yMin:s,yMax:a,xLabel:r,yLabel:n,assets:u,quotas:c,prices:L,liquidationThresholds:o,quotasInfo:E,underlyingTokenAddress:l,debt:_,tokensList:P}){return C.useMemo(()=>{const h=i-t,x=a-s,p=h/d,m=x/d,D=Array.from(Array(d)),I={...L};return D.flatMap((G,O)=>{const T=t+O*p,f=t+(O+1)*p;return r&&(I[r.address]=A.toBN(String((T+f)/2),A.PRICE_DECIMALS_POW)),D.map((F,S)=>{const U=s+S*m,X=s+(S+1)*m;return n&&(I[n.address]=A.toBN(String((U+X)/2),A.PRICE_DECIMALS_POW)),{x:T,xEnd:f,y:U,yEnd:X,value:A.CreditAccountDataUtils.calcHealthFactor({assets:u,quotas:c,prices:I,liquidationThresholds:o,underlyingToken:l,debt:_,quotasInfo:E,tokensList:P})}})})},[t,i,s,a,r,n,u,c,L,o,l,_,E,P])}function R({prices:t}){const[i,s]=C.useState({}),a=C.useMemo(()=>({...t,...i}),[t,i]),r=C.useCallback((n,u)=>{s({...i,[u]:n})},[i]);return[a,r]}function v({assets:t,liquidationThresholds:i,quotas:s,quotasInfo:a,tokensList:r,prices:n}){const[u]=e.useFixedAssets({assets:t,liquidationThresholds:i,quotas:s,quotasInfo:a}),[c,L]=e.usePriceInNumber({asset:u[0],tokensList:r,prices:n}),[o,E]=e.usePriceInNumber({asset:u[1],tokensList:r,prices:n}),l=e.useAxis({currentPrice:c,token:L}),_=e.useAxis({currentPrice:o,token:E});return{xAxis:l,yAxis:_,currentPoint:[c||e.DEFAULT_AXIS_MAX/2,o||e.DEFAULT_AXIS_MAX/2],fixedBalances:u}}exports.CELL_BAD=e.CELL_BAD;exports.CELL_CURRENT=e.CELL_CURRENT;exports.CELL_GOOD=e.CELL_GOOD;exports.CELL_HOVERED=e.CELL_HOVERED;exports.CELL_LIQUIDATION=e.CELL_LIQUIDATION;exports.CELL_OK=e.CELL_OK;exports.DEFAULT_AXIS_MAX=e.DEFAULT_AXIS_MAX;exports.DEFAULT_AXIS_MIN=e.DEFAULT_AXIS_MIN;exports.formatAxisLabel=e.formatAxisLabel;exports.formatAxisTipLabel=e.formatAxisTipLabel;exports.formatAxisTipPrice=e.formatAxisTipPrice;exports.getCellClass=e.getCellClass;exports.isPointInCell=e.isPointInCell;exports.useAxis=e.useAxis;exports.useFixedAssets=e.useFixedAssets;exports.useIsAxisInRelativeUnits=e.useIsAxisInRelativeUnits;exports.useLiquidationGraphActivePrice=e.useLiquidationGraphActivePrice;exports.useLiquidationGraphCurrentActiveValue=e.useLiquidationGraphCurrentActiveValue;exports.usePriceInNumber=e.usePriceInNumber;exports.useWithLiquidationGraphActivePrices=e.useWithLiquidationGraphActivePrices;exports.useEditPriceManually=R;exports.useLiquidationGraphParams=v;exports.useLiquidationHeatmap=N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/esm/hooks/use-hf.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreditAccountDataUtils as l } from "@gearbox-protocol/sdk";
|
|
2
2
|
import { useMemo as p } from "react";
|
|
3
|
-
function
|
|
3
|
+
function i({
|
|
4
4
|
assets: e,
|
|
5
5
|
quotas: c,
|
|
6
6
|
prices: n,
|
|
@@ -39,5 +39,5 @@ function _({
|
|
|
39
39
|
]) };
|
|
40
40
|
}
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
i as useHF
|
|
43
43
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { toBN as v, PRICE_DECIMALS_POW as R,
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { useFixedAssets as
|
|
4
|
-
import { CELL_BAD as J, CELL_CURRENT as Z, CELL_GOOD as $, CELL_HOVERED as b, CELL_LIQUIDATION as j, CELL_OK as M, DEFAULT_AXIS_MIN as tt, formatAxisLabel as et, formatAxisTipLabel as rt, formatAxisTipPrice as it, getCellClass as
|
|
1
|
+
import { toBN as v, PRICE_DECIMALS_POW as R, CreditAccountDataUtils as T } from "@gearbox-protocol/sdk";
|
|
2
|
+
import { useMemo as x, useState as F, useCallback as Y } from "react";
|
|
3
|
+
import { useFixedAssets as g, usePriceInNumber as S, useAxis as U, DEFAULT_AXIS_MAX as X } from "./utils.js";
|
|
4
|
+
import { CELL_BAD as J, CELL_CURRENT as Z, CELL_GOOD as $, CELL_HOVERED as b, CELL_LIQUIDATION as j, CELL_OK as M, DEFAULT_AXIS_MIN as tt, formatAxisLabel as et, formatAxisTipLabel as rt, formatAxisTipPrice as it, getCellClass as st, isPointInCell as nt, useIsAxisInRelativeUnits as ct, useLiquidationGraphActivePrice as ot, useLiquidationGraphCurrentActiveValue as at, useWithLiquidationGraphActivePrices as ut } from "./utils.js";
|
|
5
5
|
const m = 35;
|
|
6
|
-
function
|
|
6
|
+
function y({
|
|
7
7
|
xMin: t,
|
|
8
8
|
xMax: e,
|
|
9
9
|
yMin: r,
|
|
10
10
|
yMax: c,
|
|
11
11
|
xLabel: i,
|
|
12
|
-
yLabel:
|
|
13
|
-
assets:
|
|
12
|
+
yLabel: s,
|
|
13
|
+
assets: n,
|
|
14
14
|
quotas: o,
|
|
15
15
|
prices: u,
|
|
16
16
|
liquidationThresholds: a,
|
|
17
17
|
quotasInfo: A,
|
|
18
18
|
underlyingTokenAddress: p,
|
|
19
19
|
debt: E,
|
|
20
|
-
tokensList:
|
|
20
|
+
tokensList: L
|
|
21
21
|
}) {
|
|
22
|
-
return
|
|
23
|
-
const
|
|
22
|
+
return x(() => {
|
|
23
|
+
const G = e - t, N = c - r, d = G / m, C = N / m, P = Array.from(Array(m)), l = { ...u };
|
|
24
24
|
return P.flatMap((B, _) => {
|
|
25
25
|
const f = t + _ * d, I = t + (_ + 1) * d;
|
|
26
|
-
return i && (
|
|
26
|
+
return i && (l[i.address] = v(
|
|
27
27
|
String((f + I) / 2),
|
|
28
28
|
R
|
|
29
29
|
)), P.map((H, D) => {
|
|
30
30
|
const O = r + D * C, h = r + (D + 1) * C;
|
|
31
|
-
return
|
|
31
|
+
return s && (l[s.address] = v(
|
|
32
32
|
String((O + h) / 2),
|
|
33
33
|
R
|
|
34
34
|
)), {
|
|
@@ -36,15 +36,15 @@ function W({
|
|
|
36
36
|
xEnd: I,
|
|
37
37
|
y: O,
|
|
38
38
|
yEnd: h,
|
|
39
|
-
value:
|
|
40
|
-
assets:
|
|
39
|
+
value: T.calcHealthFactor({
|
|
40
|
+
assets: n,
|
|
41
41
|
quotas: o,
|
|
42
|
-
prices:
|
|
42
|
+
prices: l,
|
|
43
43
|
liquidationThresholds: a,
|
|
44
44
|
underlyingToken: p,
|
|
45
45
|
debt: E,
|
|
46
46
|
quotasInfo: A,
|
|
47
|
-
tokensList:
|
|
47
|
+
tokensList: L
|
|
48
48
|
})
|
|
49
49
|
};
|
|
50
50
|
});
|
|
@@ -55,24 +55,24 @@ function W({
|
|
|
55
55
|
r,
|
|
56
56
|
c,
|
|
57
57
|
i,
|
|
58
|
-
n,
|
|
59
58
|
s,
|
|
59
|
+
n,
|
|
60
60
|
o,
|
|
61
61
|
u,
|
|
62
62
|
a,
|
|
63
63
|
p,
|
|
64
64
|
E,
|
|
65
65
|
A,
|
|
66
|
-
|
|
66
|
+
L
|
|
67
67
|
]);
|
|
68
68
|
}
|
|
69
69
|
function K({ prices: t }) {
|
|
70
|
-
const [e, r] =
|
|
70
|
+
const [e, r] = F({}), c = x(
|
|
71
71
|
() => ({ ...t, ...e }),
|
|
72
72
|
[t, e]
|
|
73
|
-
), i =
|
|
74
|
-
(
|
|
75
|
-
r({ ...e, [
|
|
73
|
+
), i = Y(
|
|
74
|
+
(s, n) => {
|
|
75
|
+
r({ ...e, [n]: s });
|
|
76
76
|
},
|
|
77
77
|
[e]
|
|
78
78
|
);
|
|
@@ -84,30 +84,30 @@ function Q({
|
|
|
84
84
|
quotas: r,
|
|
85
85
|
quotasInfo: c,
|
|
86
86
|
tokensList: i,
|
|
87
|
-
prices:
|
|
87
|
+
prices: s
|
|
88
88
|
}) {
|
|
89
|
-
const [
|
|
89
|
+
const [n] = g({
|
|
90
90
|
assets: t,
|
|
91
91
|
liquidationThresholds: e,
|
|
92
92
|
quotas: r,
|
|
93
93
|
quotasInfo: c
|
|
94
94
|
}), [o, u] = S({
|
|
95
|
-
asset:
|
|
95
|
+
asset: n[0],
|
|
96
96
|
tokensList: i,
|
|
97
|
-
prices:
|
|
97
|
+
prices: s
|
|
98
98
|
}), [a, A] = S({
|
|
99
|
-
asset:
|
|
99
|
+
asset: n[1],
|
|
100
100
|
tokensList: i,
|
|
101
|
-
prices:
|
|
102
|
-
}), p =
|
|
101
|
+
prices: s
|
|
102
|
+
}), p = U({ currentPrice: o, token: u }), E = U({ currentPrice: a, token: A });
|
|
103
103
|
return {
|
|
104
104
|
xAxis: p,
|
|
105
105
|
yAxis: E,
|
|
106
106
|
currentPoint: [
|
|
107
|
-
o ||
|
|
108
|
-
a ||
|
|
107
|
+
o || X / 2,
|
|
108
|
+
a || X / 2
|
|
109
109
|
],
|
|
110
|
-
fixedBalances:
|
|
110
|
+
fixedBalances: n
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
export {
|
|
@@ -117,21 +117,21 @@ export {
|
|
|
117
117
|
b as CELL_HOVERED,
|
|
118
118
|
j as CELL_LIQUIDATION,
|
|
119
119
|
M as CELL_OK,
|
|
120
|
-
|
|
120
|
+
X as DEFAULT_AXIS_MAX,
|
|
121
121
|
tt as DEFAULT_AXIS_MIN,
|
|
122
122
|
et as formatAxisLabel,
|
|
123
123
|
rt as formatAxisTipLabel,
|
|
124
124
|
it as formatAxisTipPrice,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
st as getCellClass,
|
|
126
|
+
nt as isPointInCell,
|
|
127
|
+
U as useAxis,
|
|
128
128
|
K as useEditPriceManually,
|
|
129
|
-
|
|
129
|
+
g as useFixedAssets,
|
|
130
130
|
ct as useIsAxisInRelativeUnits,
|
|
131
131
|
ot as useLiquidationGraphActivePrice,
|
|
132
132
|
at as useLiquidationGraphCurrentActiveValue,
|
|
133
133
|
Q as useLiquidationGraphParams,
|
|
134
|
-
|
|
134
|
+
y as useLiquidationHeatmap,
|
|
135
135
|
S as usePriceInNumber,
|
|
136
136
|
ut as useWithLiquidationGraphActivePrices
|
|
137
137
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { NetworkType
|
|
1
|
+
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
|
+
import { TokenMetaInfo } from '../../types/common';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
type Sizes = "default" | "sm" | "md" | "lg";
|
|
4
5
|
/**
|
|
@@ -16,7 +17,7 @@ export interface AssetLineBaseProps {
|
|
|
16
17
|
* AssetLineProps — props for AssetLine component.
|
|
17
18
|
*/
|
|
18
19
|
export interface AssetLineProps extends AssetLineBaseProps {
|
|
19
|
-
token:
|
|
20
|
+
token: TokenMetaInfo | undefined;
|
|
20
21
|
tokenLabel?: string;
|
|
21
22
|
tokenDescription?: React.ReactNode;
|
|
22
23
|
chainId?: number;
|
|
@@ -42,7 +43,7 @@ export interface AssetLineProps extends AssetLineBaseProps {
|
|
|
42
43
|
* token lists, asset rows, portfolio tables, asset selection lists.
|
|
43
44
|
*
|
|
44
45
|
* Props:
|
|
45
|
-
* - `token` — token data object (
|
|
46
|
+
* - `token` — token data object (TokenMetaInfo).
|
|
46
47
|
* - `tokenLabel` — custom label for token (overrides token.title).
|
|
47
48
|
* - `tokenDescription` — additional description displayed below token symbol.
|
|
48
49
|
* - `chainId` — chain ID for token network.
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { PoolAPYPointsTip } from '../pool-apy-tooltip';
|
|
3
2
|
import { LocaleKeys } from '../../locale';
|
|
4
|
-
import {
|
|
3
|
+
import { TokenMetaInfo } from '../../types/common';
|
|
5
4
|
/**
|
|
6
5
|
* For GEAR token, use the logo symbol instead of the standard token icon.
|
|
7
6
|
* The standard gear.svg has a white background circle that looks bad on dark themes.
|
|
8
7
|
*/
|
|
9
|
-
export declare function getRewardTokenSymbol(token:
|
|
8
|
+
export declare function getRewardTokenSymbol(token: TokenMetaInfo | undefined, rewardTokenSymbol: string | undefined): (string | {
|
|
10
9
|
icon: string;
|
|
11
10
|
}) | undefined;
|
|
12
11
|
export interface PoolBaseAPY {
|
|
@@ -78,7 +77,7 @@ export interface CompoundAPYProps {
|
|
|
78
77
|
/**
|
|
79
78
|
* Token list for displaying token symbols in tooltips
|
|
80
79
|
*/
|
|
81
|
-
tokensList?: Record<string,
|
|
80
|
+
tokensList?: Record<string, TokenMetaInfo>;
|
|
82
81
|
/**
|
|
83
82
|
* Number of decimal places
|
|
84
83
|
* @default 2
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreditSessionStatus as CreditSessionStatusType } from '@gearbox-protocol/sdk';
|
|
2
1
|
import type * as React from "react";
|
|
2
|
+
export type CreditSessionStatusType = "active" | "closed" | "repaid" | "liquidated" | "liquidateExpired" | "liquidatePaused";
|
|
3
3
|
export interface CreditSessionStatusProps {
|
|
4
4
|
status: CreditSessionStatusType;
|
|
5
5
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import {
|
|
3
|
+
import { TokenFullData } from '../../types/common';
|
|
4
4
|
import type * as React from "react";
|
|
5
5
|
declare const blockVariants: (props?: ({
|
|
6
6
|
size?: "xs" | "sm" | "md" | null | undefined;
|
|
@@ -11,7 +11,7 @@ export interface CurrencyButtonProps extends VariantProps<typeof blockVariants>
|
|
|
11
11
|
/** Max length for symbol display. @default 13 */
|
|
12
12
|
maxLength?: number;
|
|
13
13
|
/** Token to display. */
|
|
14
|
-
token?:
|
|
14
|
+
token?: Omit<TokenFullData, "address">;
|
|
15
15
|
/** When true, button does not respond to click. */
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
/** Called when button is clicked to open token select. When set and not disabled, block is clickable. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExtraRewardApy, TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { JSX } from 'react';
|
|
3
2
|
import { Address } from 'viem';
|
|
3
|
+
import { ExtraRewardApyData, TokenMetaInfo } from '../../types/common';
|
|
4
4
|
export type PoolBaseAPY = {
|
|
5
5
|
type: "supplyAPY";
|
|
6
6
|
apy: number;
|
|
@@ -12,12 +12,12 @@ export interface DetailedApyProps {
|
|
|
12
12
|
totalAPY: number;
|
|
13
13
|
totalAPYLoading?: boolean;
|
|
14
14
|
baseAPY: Array<PoolBaseAPY>;
|
|
15
|
-
extraAPY: Array<
|
|
16
|
-
tokensList: Record<Address,
|
|
15
|
+
extraAPY: Array<ExtraRewardApyData>;
|
|
16
|
+
tokensList: Record<Address, TokenMetaInfo> | undefined;
|
|
17
17
|
}
|
|
18
18
|
interface PoolRewardsIconProps {
|
|
19
|
-
reward:
|
|
20
|
-
tokensList: Record<Address,
|
|
19
|
+
reward: ExtraRewardApyData;
|
|
20
|
+
tokensList: Record<Address, TokenMetaInfo> | undefined;
|
|
21
21
|
size?: number;
|
|
22
22
|
margin?: string;
|
|
23
23
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { ExplorerLink } from '../explorer-links-dropdown';
|
|
2
|
+
import { TokenMetaInfo } from '../../types/common';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
export type { ExplorerLink } from '../explorer-links-dropdown';
|
|
5
5
|
export interface DetailedPageTitleProps {
|
|
6
6
|
/** Main title text or node */
|
|
7
7
|
title: React.ReactNode;
|
|
8
8
|
/** Token data for the icon (symbol used for TokenIcon) */
|
|
9
|
-
token?:
|
|
9
|
+
token?: TokenMetaInfo;
|
|
10
10
|
/** Text to copy when the copy button is clicked; copy button is hidden when omitted */
|
|
11
11
|
toCopy?: string;
|
|
12
12
|
/** Explorer links for the dropdown; dropdown is hidden when empty or omitted */
|
package/dist/types/components/liquidation/liquidation-assets-table/liquidation-assets-table.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { Address } from 'viem';
|
|
3
2
|
import { UseLiquidationGraphParamsReturnType } from '../../../hooks/use-liquidation';
|
|
3
|
+
import { TokenMetaInfo } from '../../../types/common';
|
|
4
4
|
import type * as React from "react";
|
|
5
5
|
export interface LiquidationModellingAssetsTableProps {
|
|
6
|
-
tokensList: Record<Address,
|
|
6
|
+
tokensList: Record<Address, TokenMetaInfo>;
|
|
7
7
|
graphParams: UseLiquidationGraphParamsReturnType;
|
|
8
8
|
data: Array<{
|
|
9
9
|
token: Address;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { Asset
|
|
1
|
+
import { Asset } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
3
|
import { UseLiquidationGraphParamsReturnType } from '../../../hooks/use-liquidation';
|
|
4
|
+
import { LiquidationThresholds, QuotasInfoList, TokenFullData } from '../../../types/common';
|
|
4
5
|
import type * as React from "react";
|
|
5
6
|
export interface LiquidationGraphProps {
|
|
6
7
|
graphParams: UseLiquidationGraphParamsReturnType;
|
|
7
8
|
assets: Array<Asset>;
|
|
8
|
-
liquidationThresholds:
|
|
9
|
+
liquidationThresholds: LiquidationThresholds;
|
|
9
10
|
quotas: Record<Address, Asset>;
|
|
10
|
-
quotasInfo:
|
|
11
|
+
quotasInfo: QuotasInfoList;
|
|
11
12
|
underlyingToken: Address;
|
|
12
13
|
debt: bigint;
|
|
13
|
-
tokensList: Record<Address,
|
|
14
|
+
tokensList: Record<Address, TokenFullData>;
|
|
14
15
|
prices: Record<Address, bigint>;
|
|
15
16
|
width?: number;
|
|
16
17
|
height?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { AxisParams } from '../../../hooks/use-liquidation';
|
|
2
|
+
import { TokenFullData } from '../../../types/common';
|
|
3
3
|
import type * as React from "react";
|
|
4
4
|
export interface LiquidationGraphTipProps {
|
|
5
5
|
activePointX: number | undefined;
|
|
@@ -7,7 +7,7 @@ export interface LiquidationGraphTipProps {
|
|
|
7
7
|
xAxis: AxisParams | undefined;
|
|
8
8
|
yAxis: AxisParams | undefined;
|
|
9
9
|
hf: number;
|
|
10
|
-
underlyingToken:
|
|
10
|
+
underlyingToken: TokenFullData | undefined;
|
|
11
11
|
maxLabelLength?: number;
|
|
12
12
|
}
|
|
13
13
|
export declare function LiquidationGraphTip({ activePointX, activePointY, xAxis, yAxis, hf, underlyingToken, maxLabelLength, }: LiquidationGraphTipProps): React.ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExtraRewardApy, TokenData } from '@gearbox-protocol/sdk';
|
|
2
1
|
import { PoolBaseAPY } from '../compound-apy/compound-apy';
|
|
3
2
|
import { LocaleKeys } from '../../locale';
|
|
3
|
+
import { ExtraRewardApyData, TokenMetaInfo } from '../../types/common';
|
|
4
4
|
import type * as React from "react";
|
|
5
5
|
export interface PoolAPYPointsTip {
|
|
6
6
|
reward?: {
|
|
@@ -35,11 +35,11 @@ export interface PoolAPYTooltipProps {
|
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
totalAPY?: number;
|
|
37
37
|
baseAPY?: Array<PoolBaseAPY>;
|
|
38
|
-
extraAPY?: Array<
|
|
38
|
+
extraAPY?: Array<ExtraRewardApyData>;
|
|
39
39
|
points?: Array<PoolAPYPointsTip>;
|
|
40
40
|
apy7DAgo?: APY7DAgoData;
|
|
41
41
|
externalAPY?: ExternalAPYData;
|
|
42
|
-
tokensList?: Record<string,
|
|
42
|
+
tokensList?: Record<string, TokenMetaInfo>;
|
|
43
43
|
className?: string;
|
|
44
44
|
}
|
|
45
45
|
export declare function PoolAPYTooltip({ children, totalAPY, baseAPY, extraAPY, points, apy7DAgo, externalAPY, tokensList, className, }: PoolAPYTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TokenFullData } from '../../types/common';
|
|
2
2
|
export interface SliderTokenProps {
|
|
3
3
|
from: number;
|
|
4
4
|
to: number;
|
|
5
|
-
token:
|
|
5
|
+
token: TokenFullData;
|
|
6
6
|
step: number;
|
|
7
7
|
markerStep: number;
|
|
8
8
|
value: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TokenFullData } from '../../types/common';
|
|
2
2
|
import type * as React from "react";
|
|
3
3
|
/** Size variant matching A (SmartNumberInputSize). */
|
|
4
4
|
export type BalanceIndicatorSize = "sm" | "md";
|
|
@@ -6,7 +6,7 @@ export interface BalanceIndicatorProps {
|
|
|
6
6
|
/** Label before balance (e.g. "Balance"). */
|
|
7
7
|
title?: React.ReactNode;
|
|
8
8
|
/** Token for formatting amount. */
|
|
9
|
-
token:
|
|
9
|
+
token: Omit<TokenFullData, "address"> | undefined;
|
|
10
10
|
/** Max amount to display (formatted via TokenTemplate). */
|
|
11
11
|
maxAmount?: bigint;
|
|
12
12
|
/** When true, balance row is non-interactive. */
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
2
|
+
import { TokenFullData } from '../../types/common';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
/** A-matching SmartNumberInput size for layout (styles.tsx). */
|
|
4
5
|
export type SmartNumberInputSize = "sm" | "md";
|
|
5
|
-
/**
|
|
6
|
-
* Token data for legacy API compatibility
|
|
7
|
-
* Uses generic type to accept any TokenData-like object
|
|
8
|
-
*/
|
|
9
|
-
export interface TokenDataLike {
|
|
10
|
-
symbol: string;
|
|
11
|
-
title: string;
|
|
12
|
-
decimals?: number;
|
|
13
|
-
}
|
|
14
6
|
export interface SmartNumberInputProps {
|
|
15
7
|
/** Current amount value as string. */
|
|
16
8
|
amount: string;
|
|
17
9
|
/** Token data (from interface). */
|
|
18
|
-
token:
|
|
10
|
+
token: Omit<TokenFullData, "address"> | undefined;
|
|
19
11
|
/** Label for the input. */
|
|
20
12
|
label?: React.ReactNode;
|
|
21
13
|
/** Max button label (e.g. "Balance"). */
|
|
@@ -2,19 +2,15 @@ import { NetworkType } from '@gearbox-protocol/sdk';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { default as React } from 'react';
|
|
4
4
|
import { TokenIconProps } from '../token-icon';
|
|
5
|
+
import { TokenMetaInfo } from '../../types/common';
|
|
5
6
|
declare const tokenSymbolVariants: (props?: ({
|
|
6
7
|
marginSize?: "sm" | "lg" | "md" | null | undefined;
|
|
7
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
type PartialTokenData = {
|
|
9
|
-
symbol: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
icon?: string;
|
|
12
|
-
};
|
|
13
9
|
export interface TokenSymbolProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof tokenSymbolVariants> {
|
|
14
10
|
/**
|
|
15
11
|
* Token data object or symbol string
|
|
16
12
|
*/
|
|
17
|
-
token?:
|
|
13
|
+
token?: TokenMetaInfo | string;
|
|
18
14
|
/**
|
|
19
15
|
* Optional override title to display
|
|
20
16
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { TokenFullData } from '../../types/common';
|
|
1
2
|
import { ParseSmallNumberResult } from '../../utils';
|
|
2
3
|
import { negativeTokenTemplate, tokenTemplateString } from '../../utils/templates';
|
|
3
|
-
import { TokenDataLike } from '..';
|
|
4
4
|
import { FormattedNumberStringProps } from '../formatted-number';
|
|
5
5
|
import type * as React from "react";
|
|
6
6
|
export interface TokenTemplateProps extends Omit<FormattedNumberStringProps, "value"> {
|
|
7
7
|
value: bigint | string | number | undefined;
|
|
8
|
-
token:
|
|
8
|
+
token: Omit<TokenFullData, "address"> | undefined;
|
|
9
9
|
precision?: number;
|
|
10
10
|
maxLength?: number;
|
|
11
11
|
formatter?: (amount: bigint | string | number | undefined, decimals: number, precision?: number) => string | ParseSmallNumberResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TokenFullData } from '../../types/common';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Display mode for the tokens list
|
|
@@ -46,7 +46,7 @@ export interface TokensListCellProps {
|
|
|
46
46
|
/**
|
|
47
47
|
* Token data dictionary keyed by address
|
|
48
48
|
*/
|
|
49
|
-
tokensList: Record<`0x${string}`,
|
|
49
|
+
tokensList: Record<`0x${string}`, TokenFullData>;
|
|
50
50
|
/**
|
|
51
51
|
* Maximum number of tokens to display before showing "+N"
|
|
52
52
|
* @default 3
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Asset
|
|
1
|
+
import { Asset } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
|
+
import { QuotasInfoList, TokenFullData } from '../types/common';
|
|
3
4
|
export interface UseHFProps {
|
|
4
5
|
quotas: Record<Address, Asset>;
|
|
5
|
-
quotasInfo:
|
|
6
|
+
quotasInfo: QuotasInfoList;
|
|
6
7
|
assets: Array<Asset>;
|
|
7
8
|
prices: Record<Address, bigint>;
|
|
8
9
|
liquidationThresholds: Record<Address, bigint>;
|
|
9
10
|
underlyingToken: Address;
|
|
10
11
|
debt: bigint;
|
|
11
|
-
tokensList: Record<Address,
|
|
12
|
+
tokensList: Record<Address, TokenFullData>;
|
|
12
13
|
allowZeroDebt?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare function useHF({ assets, quotas, prices, liquidationThresholds, underlyingToken, debt, quotasInfo, allowZeroDebt, tokensList, }: UseHFProps): {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Asset
|
|
1
|
+
import { Asset } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { Cell } from 'reactochart/ColorHeatmap';
|
|
3
3
|
import { Address } from 'viem';
|
|
4
|
+
import { LiquidationThresholds, QuotasInfoList, TokenFullData } from '../../types/common';
|
|
4
5
|
import { AxisParams, Point } from './types';
|
|
5
6
|
export type { AxisOrder, AxisParams, Point as LiquidationPoint } from './types';
|
|
6
7
|
export type { Cell } from './utils';
|
|
@@ -10,16 +11,16 @@ interface UseLiquidationHeatmapProps {
|
|
|
10
11
|
xMax: number;
|
|
11
12
|
yMin: number;
|
|
12
13
|
yMax: number;
|
|
13
|
-
xLabel?:
|
|
14
|
-
yLabel?:
|
|
14
|
+
xLabel?: TokenFullData;
|
|
15
|
+
yLabel?: TokenFullData;
|
|
15
16
|
assets: Array<Asset>;
|
|
16
17
|
quotas: Record<Address, Asset>;
|
|
17
18
|
prices: Record<Address, bigint>;
|
|
18
19
|
liquidationThresholds: Record<Address, bigint>;
|
|
19
20
|
underlyingTokenAddress: Address;
|
|
20
21
|
debt: bigint;
|
|
21
|
-
quotasInfo:
|
|
22
|
-
tokensList: Record<Address,
|
|
22
|
+
quotasInfo: QuotasInfoList;
|
|
23
|
+
tokensList: Record<Address, TokenFullData>;
|
|
23
24
|
}
|
|
24
25
|
export declare function useLiquidationHeatmap({ xMin, xMax, yMin, yMax, xLabel, yLabel, assets, quotas, prices, liquidationThresholds, quotasInfo, underlyingTokenAddress, debt, tokensList, }: UseLiquidationHeatmapProps): Cell[];
|
|
25
26
|
interface UseEditPriceManuallyProps {
|
|
@@ -34,10 +35,10 @@ export interface UseLiquidationGraphParamsReturnType {
|
|
|
34
35
|
}
|
|
35
36
|
export interface UseLiquidationGraphParamsProps {
|
|
36
37
|
assets: Array<Asset>;
|
|
37
|
-
liquidationThresholds:
|
|
38
|
+
liquidationThresholds: LiquidationThresholds;
|
|
38
39
|
quotas: Record<Address, Asset>;
|
|
39
|
-
quotasInfo:
|
|
40
|
-
tokensList: Record<Address,
|
|
40
|
+
quotasInfo: QuotasInfoList;
|
|
41
|
+
tokensList: Record<Address, TokenFullData>;
|
|
41
42
|
prices: Record<Address, bigint>;
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TokenFullData } from '../../types/common';
|
|
2
2
|
export interface Coordinates {
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
@@ -8,7 +8,7 @@ export interface AxisParams {
|
|
|
8
8
|
min: number;
|
|
9
9
|
max: number;
|
|
10
10
|
minHf: number;
|
|
11
|
-
label:
|
|
11
|
+
label: TokenFullData;
|
|
12
12
|
order: AxisOrder;
|
|
13
13
|
nextOrder: () => void;
|
|
14
14
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Asset
|
|
1
|
+
import { Asset } from '@gearbox-protocol/sdk';
|
|
2
2
|
import { Cell as ReactochartCell } from 'reactochart/ColorHeatmap';
|
|
3
3
|
import { Address } from 'viem';
|
|
4
|
+
import { LiquidationThresholds, QuotasInfoList, TokenFullData } from '../../types/common';
|
|
4
5
|
import { AxisOrder, AxisParams, Point } from './types';
|
|
5
6
|
export interface Cell extends ReactochartCell {
|
|
6
7
|
x: number;
|
|
@@ -17,37 +18,37 @@ export declare const CELL_BAD = "rct-chart__heatmap-cell--bad";
|
|
|
17
18
|
export declare const CELL_LIQUIDATION = "rct-chart__heatmap-cell--liquidation";
|
|
18
19
|
interface UseAxisProps {
|
|
19
20
|
currentPrice: number | undefined;
|
|
20
|
-
token:
|
|
21
|
+
token: TokenFullData | undefined;
|
|
21
22
|
}
|
|
22
23
|
export declare const DEFAULT_AXIS_MIN = 0;
|
|
23
24
|
export declare const DEFAULT_AXIS_MAX = 1;
|
|
24
25
|
export declare function useAxis({ token, currentPrice, }: UseAxisProps): AxisParams | undefined;
|
|
25
26
|
interface UseFixedAssetsProps {
|
|
26
27
|
assets: Array<Asset>;
|
|
27
|
-
liquidationThresholds:
|
|
28
|
+
liquidationThresholds: LiquidationThresholds;
|
|
28
29
|
quotas: Record<Address, Asset>;
|
|
29
|
-
quotasInfo:
|
|
30
|
+
quotasInfo: QuotasInfoList;
|
|
30
31
|
at?: number;
|
|
31
32
|
length?: number;
|
|
32
33
|
}
|
|
33
34
|
export declare function useFixedAssets({ assets, liquidationThresholds, quotas, quotasInfo, at, length, }: UseFixedAssetsProps): [Asset[], Asset[]];
|
|
34
35
|
interface UsePriceInNumberProps {
|
|
35
36
|
asset: Asset | undefined;
|
|
36
|
-
tokensList: Record<Address,
|
|
37
|
+
tokensList: Record<Address, TokenFullData>;
|
|
37
38
|
prices: Record<Address, bigint>;
|
|
38
39
|
}
|
|
39
40
|
type UsePriceInNumberReturnType = [
|
|
40
41
|
price: number | undefined,
|
|
41
|
-
token:
|
|
42
|
+
token: TokenFullData | undefined
|
|
42
43
|
];
|
|
43
44
|
export declare function usePriceInNumber({ asset, tokensList, prices, }: UsePriceInNumberProps): UsePriceInNumberReturnType;
|
|
44
|
-
export declare function useIsAxisInRelativeUnits(axis:
|
|
45
|
+
export declare function useIsAxisInRelativeUnits(axis: TokenFullData | undefined, underlying: TokenFullData | undefined): boolean;
|
|
45
46
|
/**
|
|
46
47
|
* Format price value for liquidation graph tooltip
|
|
47
48
|
* Re-exports formatPrice from utils with liquidation-specific defaults
|
|
48
49
|
*/
|
|
49
50
|
export declare function formatAxisTipPrice(v: number): string;
|
|
50
|
-
export declare function formatAxisTipLabel(token:
|
|
51
|
+
export declare function formatAxisTipLabel(token: TokenFullData | undefined, underlyingToken: TokenFullData | undefined, order: AxisOrder | undefined): string;
|
|
51
52
|
export declare function formatAxisLabel(underlyingPrice: bigint | undefined, isRelative: boolean, order?: AxisOrder): (l?: number) => string;
|
|
52
53
|
export declare function useLiquidationGraphActivePrice(activePoint: number, underlyingPrice: bigint | undefined, isRelative: boolean, order?: AxisOrder): number;
|
|
53
54
|
export declare function useLiquidationGraphCurrentActiveValue(): {
|
|
@@ -59,8 +60,8 @@ export declare function useLiquidationGraphCurrentActiveValue(): {
|
|
|
59
60
|
handleMouseLeave: () => void;
|
|
60
61
|
};
|
|
61
62
|
interface UseWithActivePricesProps {
|
|
62
|
-
xLabel:
|
|
63
|
-
yLabel:
|
|
63
|
+
xLabel: TokenFullData | undefined;
|
|
64
|
+
yLabel: TokenFullData | undefined;
|
|
64
65
|
activePoint: [number | undefined, number | undefined] | null;
|
|
65
66
|
prices: Record<Address, bigint>;
|
|
66
67
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
export type TokenMetaInfo = {
|
|
3
|
+
symbol: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
};
|
|
8
|
+
export type TokenFullData = TokenMetaInfo & {
|
|
9
|
+
decimals: number;
|
|
10
|
+
address: Address;
|
|
11
|
+
};
|
|
12
|
+
export interface ExtraRewardApyData {
|
|
13
|
+
apy: number;
|
|
14
|
+
rewardToken: Address;
|
|
15
|
+
rewardTokenSymbol: string;
|
|
16
|
+
endTimestamp?: number;
|
|
17
|
+
token?: Address;
|
|
18
|
+
}
|
|
19
|
+
export type LiquidationThresholds = Record<Address, bigint>;
|
|
20
|
+
export type QuotasInfoList = Record<Address, {
|
|
21
|
+
token: Address;
|
|
22
|
+
isActive: boolean;
|
|
23
|
+
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type
|
|
1
|
+
import { TokenFullData } from '../types/common';
|
|
2
|
+
type TokenDataSlice = Pick<TokenFullData, "title" | "symbol" | "name" | "address">;
|
|
3
3
|
/**
|
|
4
4
|
* Searches for a match in token data (name, symbol, title, or address)
|
|
5
5
|
*
|
|
@@ -21,7 +21,7 @@ type PartialTokenData = Partial<Pick<TokenData, "title" | "symbol" | "name" | "a
|
|
|
21
21
|
* searchInToken(token, "btc") // false
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
export declare function searchInToken(token:
|
|
24
|
+
export declare function searchInToken(token: TokenDataSlice | undefined, search: string): boolean;
|
|
25
25
|
/**
|
|
26
26
|
* Creates a filter function for tokens based on search string
|
|
27
27
|
*
|
|
@@ -39,5 +39,5 @@ export declare function searchInToken(token: PartialTokenData | undefined, searc
|
|
|
39
39
|
* // [{ title: "Ethereum", symbol: "ETH" }]
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export declare function createTokenSearchFilter(search: string): (token:
|
|
42
|
+
export declare function createTokenSearchFilter(search: string): (token: TokenDataSlice | undefined) => boolean;
|
|
43
43
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TokenFullData } from '../types/common';
|
|
2
2
|
import type * as React from "react";
|
|
3
|
+
type TokenDataSlice = Pick<TokenFullData, "title" | "decimals" | "symbol">;
|
|
3
4
|
/**
|
|
4
5
|
* Formats a percentage value and returns it as a React element
|
|
5
6
|
* Use this when your value is already in percent form (e.g., 2.81 for 2.81%)
|
|
@@ -15,9 +16,6 @@ import type * as React from "react";
|
|
|
15
16
|
* ```
|
|
16
17
|
*/
|
|
17
18
|
export declare function percentageTemplate(value: number, decimals?: number): React.ReactElement;
|
|
18
|
-
type PartialTokenData = Pick<TokenData, "title" | "decimals"> & {
|
|
19
|
-
symbol?: string;
|
|
20
|
-
};
|
|
21
19
|
/**
|
|
22
20
|
* Formats a token amount with symbol
|
|
23
21
|
*
|
|
@@ -38,7 +36,7 @@ type PartialTokenData = Pick<TokenData, "title" | "decimals"> & {
|
|
|
38
36
|
* // "1.00 Very..." (truncated to 10 chars)
|
|
39
37
|
* ```
|
|
40
38
|
*/
|
|
41
|
-
export declare function tokenTemplate(value: bigint | string | number | undefined, token:
|
|
39
|
+
export declare function tokenTemplate(value: bigint | string | number | undefined, token: TokenDataSlice | undefined, precision?: number, spaceSymbol?: string, maxLength?: number): string;
|
|
42
40
|
/**
|
|
43
41
|
* Formats a token amount and returns it as a string with token title
|
|
44
42
|
* Use this when you need a formatted number string with token name (not a React element)
|
|
@@ -60,7 +58,7 @@ export declare function tokenTemplate(value: bigint | string | number | undefine
|
|
|
60
58
|
* // "< 0.01 ETH"
|
|
61
59
|
* ```
|
|
62
60
|
*/
|
|
63
|
-
export declare function tokenTemplateNumber(value: number | undefined, token:
|
|
61
|
+
export declare function tokenTemplateNumber(value: number | undefined, token: TokenDataSlice | undefined, precision?: number): string;
|
|
64
62
|
/**
|
|
65
63
|
* Formats a token amount as string, handling negative values correctly
|
|
66
64
|
*
|
|
@@ -78,7 +76,7 @@ export declare function tokenTemplateNumber(value: number | undefined, token: Pa
|
|
|
78
76
|
* // "1.00 USDC"
|
|
79
77
|
* ```
|
|
80
78
|
*/
|
|
81
|
-
export declare function negativeTokenTemplate(value: bigint | string | number | undefined, token:
|
|
79
|
+
export declare function negativeTokenTemplate(value: bigint | string | number | undefined, token: TokenDataSlice | undefined, precision?: number, spaceSymbol?: string): string;
|
|
82
80
|
/**
|
|
83
81
|
* Formats a token amount as string (non-React version of tokenTemplate)
|
|
84
82
|
*
|
|
@@ -96,5 +94,5 @@ export declare function negativeTokenTemplate(value: bigint | string | number |
|
|
|
96
94
|
* // "1.00 USDC"
|
|
97
95
|
* ```
|
|
98
96
|
*/
|
|
99
|
-
export declare function tokenTemplateString(value: bigint | string | number | undefined, token:
|
|
97
|
+
export declare function tokenTemplateString(value: bigint | string | number | undefined, token: TokenDataSlice | undefined, precision?: number, spaceSymbol?: string): string;
|
|
100
98
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/permissionless-ui",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.11-next.1",
|
|
4
4
|
"description": "Internal UI components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"tailwindcss-animate": "^1.0.7"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@gearbox-protocol/sdk": "
|
|
95
|
+
"@gearbox-protocol/sdk": "v13.0.0-beta.2",
|
|
96
96
|
"@tanstack/react-query": "^5.64.1",
|
|
97
97
|
"@types/react": "^18 || ^19",
|
|
98
98
|
"@types/react-dom": "^18 || ^19",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"@commitlint/cli": "^20.1.0",
|
|
131
131
|
"@commitlint/config-conventional": "^20.0.0",
|
|
132
132
|
"@gearbox-protocol/biome-config": "^1.0.2",
|
|
133
|
-
"@gearbox-protocol/sdk": "
|
|
133
|
+
"@gearbox-protocol/sdk": "v13.0.0-beta.2",
|
|
134
134
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
135
135
|
"@storybook/addon-a11y": "^10.0.8",
|
|
136
136
|
"@storybook/addon-docs": "^10.0.8",
|