@velora-dex/widget 0.6.1-dev.5 → 0.7.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/components/ui/drawer.js +1 -1
- package/dist/components/ui/tooltip.js +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/widget/AppHeader/AppHeader.d.ts.map +1 -1
- package/dist/components/widget/AppHeader/AppHeader.js +45 -41
- package/dist/components/widget/AppHeader/AppHeader.js.map +1 -1
- package/dist/components/widget/AppHeader/TradeModeSwitcher.d.ts +3 -1
- package/dist/components/widget/AppHeader/TradeModeSwitcher.d.ts.map +1 -1
- package/dist/components/widget/AppHeader/TradeModeSwitcher.js +69 -34
- package/dist/components/widget/AppHeader/TradeModeSwitcher.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/LimitOrderDetails.d.ts.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/LimitOrderDetails.js +77 -67
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/LimitOrderDetails.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/utils.d.ts +3 -0
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/utils.d.ts.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/utils.js +71 -23
- package/dist/components/widget/LimitOrderItem/LimitOrderDetails/utils.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderListItem.d.ts +2 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderListItem.d.ts.map +1 -1
- package/dist/components/widget/LimitOrderItem/LimitOrderListItem.js +123 -110
- package/dist/components/widget/LimitOrderItem/LimitOrderListItem.js.map +1 -1
- package/dist/components/widget/LimitOrderItem/utils.d.ts +2 -0
- package/dist/components/widget/LimitOrderItem/utils.d.ts.map +1 -1
- package/dist/components/widget/LimitOrderItem/utils.js +4 -1
- package/dist/components/widget/LimitOrderItem/utils.js.map +1 -1
- package/dist/components/widget/SwapRate/SwapRate.d.ts +2 -1
- package/dist/components/widget/SwapRate/SwapRate.d.ts.map +1 -1
- package/dist/components/widget/SwapRate/SwapRate.js +25 -37
- package/dist/components/widget/SwapRate/SwapRate.js.map +1 -1
- package/dist/components/widget/SwapRate/SwapRateWithTooltip.d.ts +3 -0
- package/dist/components/widget/SwapRate/SwapRateWithTooltip.d.ts.map +1 -0
- package/dist/components/widget/SwapRate/SwapRateWithTooltip.js +42 -0
- package/dist/components/widget/SwapRate/SwapRateWithTooltip.js.map +1 -0
- package/dist/components/widget/SwapRate/utils.d.ts +3 -0
- package/dist/components/widget/SwapRate/utils.d.ts.map +1 -0
- package/dist/components/widget/SwapRate/utils.js +26 -0
- package/dist/components/widget/SwapRate/utils.js.map +1 -0
- package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.d.ts.map +1 -1
- package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.js +20 -27
- package/dist/components/widget/SwapRateWithPriceImpactRow/SwapRateWithPriceImpactRow.js.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/logger.d.ts +2 -2
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +8 -2
- package/dist/core/logger.js.map +1 -1
- package/dist/core/screen/hooks/useRunOnMount.d.ts +10 -0
- package/dist/core/screen/hooks/useRunOnMount.d.ts.map +1 -1
- package/dist/core/screen/hooks/useRunOnMount.js +6 -1
- package/dist/core/screen/hooks/useRunOnMount.js.map +1 -1
- package/dist/external/.pnpm/{vaul@1.1.2_patch_hash_07b36ba5def3805dde9d543a880ba9e4caf55e5eb58e544faaa2c186846bf3c1__7f2d7d5ed11750fbec42b3f5689c802d → vaul@1.1.2_patch_hash_07b36ba5def3805dde9d543a880ba9e4caf55e5eb58e544faaa2c186846bf3c1__6feb48fe37bd41e9af5c8e81d5a6f4e1}/external/vaul/dist/index.js +1 -1
- package/dist/external/.pnpm/{vaul@1.1.2_patch_hash_07b36ba5def3805dde9d543a880ba9e4caf55e5eb58e544faaa2c186846bf3c1__7f2d7d5ed11750fbec42b3f5689c802d → vaul@1.1.2_patch_hash_07b36ba5def3805dde9d543a880ba9e4caf55e5eb58e544faaa2c186846bf3c1__6feb48fe37bd41e9af5c8e81d5a6f4e1}/external/vaul/dist/index.js.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/utils.js +1 -1
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useMarketFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useTwapFlow.js.map +1 -1
- package/dist/lib/utils/logger.d.ts +7 -4
- package/dist/lib/utils/logger.d.ts.map +1 -1
- package/dist/lib/utils/logger.js +70 -33
- package/dist/lib/utils/logger.js.map +1 -1
- package/dist/lib/utils/twap.d.ts +5 -0
- package/dist/lib/utils/twap.d.ts.map +1 -1
- package/dist/lib/utils/twap.js +8 -1
- package/dist/lib/utils/twap.js.map +1 -1
- package/dist/lib/web3/wagmi/isInsideSafeIframe.js +11 -11
- package/dist/lib/web3/wagmi/isInsideSafeIframe.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/utils/transferAmountsFromReceipt.js +14 -14
- package/dist/tokens/utils/transferAmountsFromReceipt.js.map +1 -1
- package/dist/transactions/queries/ensureTxReceipt.js +8 -8
- package/dist/transactions/queries/ensureTxReceipt.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LimitOrderItem, LimitOrderItemExtra, RequiredLimitOrderItemExtra } from '../types';
|
|
2
2
|
import { DetailWithValue } from '../../Details/types';
|
|
3
3
|
import { PayReceiveInfoProps } from '../../PayReceiveInfo/types';
|
|
4
|
+
import { DeltaAuctionWithTwapOrder } from '../../../../hooks/swap/prices/delta/orders/types';
|
|
4
5
|
export declare function constructSubmitDateDetail({ createdAt, }: {
|
|
5
6
|
createdAt: string | number;
|
|
6
7
|
}): DetailWithValue;
|
|
@@ -10,6 +11,8 @@ export declare function constructExpiresInDetail({ deadline, }: {
|
|
|
10
11
|
export declare function constructOrderRateDetail({ extra, }: {
|
|
11
12
|
extra: LimitOrderItemExtra;
|
|
12
13
|
}): DetailWithValue;
|
|
14
|
+
export declare function constructTwapDurationDetail(order: DeltaAuctionWithTwapOrder): DetailWithValue;
|
|
15
|
+
export declare function constructTwapSplitsDetail(order: DeltaAuctionWithTwapOrder): DetailWithValue;
|
|
13
16
|
export declare function constructOrderStatusDetail(order: LimitOrderItem): DetailWithValue;
|
|
14
17
|
export declare function constructOrderTypeDetail(order: LimitOrderItem): DetailWithValue;
|
|
15
18
|
export declare function constructPayReceiveInfoProps({ extra, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/LimitOrderItem/LimitOrderDetails/utils.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/widget/LimitOrderItem/LimitOrderDetails/utils.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAItE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAKxF,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,GACV,EAAE;IACD,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B,GAAG,eAAe,CAKlB;AAMD,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,eAAe,CAOlB;AAOD,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,GACN,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAC;CAC5B,GAAG,eAAe,CAKlB;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,yBAAyB,GAC/B,eAAe,CAuCjB;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,yBAAyB,GAC/B,eAAe,CAoBjB;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,cAAc,GACpB,eAAe,CAKjB;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,cAAc,GACpB,eAAe,CAKjB;AAQD,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,GACN,EAAE;IACD,KAAK,EAAE,2BAA2B,CAAC;CACpC,GAAG,mBAAmB,CAsCtB"}
|
|
@@ -1,63 +1,111 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import "../../../../lib/constants/time.js";
|
|
2
|
+
import { getTwapAuctionDeadlines as e } from "../../../../lib/utils/twap.js";
|
|
3
|
+
import { formatTokenAmount as t } from "../../../../lib/utils/formatTokenBalance.js";
|
|
4
|
+
import { Duration as n } from "../../Duration/Duration.js";
|
|
5
|
+
import { Rate as r, StatusBadge as i, TimeTillExpiry as a } from "../LimitOrderListItem.js";
|
|
6
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import l from "dayjs";
|
|
5
8
|
//#region src/components/widget/LimitOrderItem/LimitOrderDetails/utils.tsx
|
|
6
|
-
function
|
|
9
|
+
function u({ createdAt: e }) {
|
|
7
10
|
return {
|
|
8
11
|
title: "Submit Date",
|
|
9
|
-
value:
|
|
12
|
+
value: l(e).format("DD MMM YYYY h:mm A")
|
|
10
13
|
};
|
|
11
14
|
}
|
|
12
|
-
var
|
|
13
|
-
function
|
|
15
|
+
var d = { root: "dark:text-contrast-6" };
|
|
16
|
+
function f({ deadline: e }) {
|
|
14
17
|
return {
|
|
15
18
|
title: "Expires in",
|
|
16
|
-
value: /* @__PURE__ */
|
|
19
|
+
value: /* @__PURE__ */ s(a, {
|
|
17
20
|
deadline: e,
|
|
18
|
-
classes:
|
|
21
|
+
classes: d
|
|
19
22
|
})
|
|
20
23
|
};
|
|
21
24
|
}
|
|
22
|
-
var
|
|
25
|
+
var p = {
|
|
23
26
|
left: "dark:text-contrast-6",
|
|
24
27
|
right: "dark:text-contrast-6"
|
|
25
28
|
};
|
|
26
|
-
function
|
|
29
|
+
function m({ extra: e }) {
|
|
27
30
|
return {
|
|
28
31
|
title: "Order Rate",
|
|
29
|
-
value: /* @__PURE__ */
|
|
32
|
+
value: /* @__PURE__ */ s(r, {
|
|
30
33
|
extra: e,
|
|
31
|
-
classes:
|
|
34
|
+
classes: p
|
|
32
35
|
})
|
|
33
36
|
};
|
|
34
37
|
}
|
|
35
|
-
function
|
|
38
|
+
function h(t) {
|
|
39
|
+
let { endsInMs: r, durationMs: i } = e(t), l = (/* @__PURE__ */ new Date()).getTime(), u = r > l, d = u && r - l <= 6e4;
|
|
40
|
+
return {
|
|
41
|
+
title: "Order Duration",
|
|
42
|
+
value: /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(n, {
|
|
43
|
+
timeMs: i,
|
|
44
|
+
classes: { root: "inline-flex" }
|
|
45
|
+
}), u && /* @__PURE__ */ c(o, { children: [" ", /* @__PURE__ */ c("span", {
|
|
46
|
+
className: "text-contrast-5 dark:text-contrast-5",
|
|
47
|
+
children: [
|
|
48
|
+
"(ends in",
|
|
49
|
+
" ",
|
|
50
|
+
/* @__PURE__ */ s(a, {
|
|
51
|
+
showSeconds: d,
|
|
52
|
+
deadline: r / 1e3,
|
|
53
|
+
classes: { root: "inline-flex text-xs text-contrast-5 dark:text-contrast-5" }
|
|
54
|
+
}),
|
|
55
|
+
")"
|
|
56
|
+
]
|
|
57
|
+
})] })] })
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function g(e) {
|
|
61
|
+
return {
|
|
62
|
+
title: "Order Splits",
|
|
63
|
+
value: /* @__PURE__ */ c(o, { children: [
|
|
64
|
+
e.order.numSlices,
|
|
65
|
+
" Parts",
|
|
66
|
+
" ",
|
|
67
|
+
/* @__PURE__ */ c("span", {
|
|
68
|
+
className: "text-contrast-5 dark:text-contrast-5",
|
|
69
|
+
children: [
|
|
70
|
+
"(once every",
|
|
71
|
+
" ",
|
|
72
|
+
/* @__PURE__ */ s(n, {
|
|
73
|
+
timeMs: e.order.interval * 1e3,
|
|
74
|
+
showSeconds: !0,
|
|
75
|
+
classes: { root: "inline-flex text-xs text-contrast-5 dark:text-contrast-5" }
|
|
76
|
+
}),
|
|
77
|
+
")"
|
|
78
|
+
]
|
|
79
|
+
})
|
|
80
|
+
] })
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function _(e) {
|
|
36
84
|
return {
|
|
37
85
|
title: "Order Status",
|
|
38
|
-
value: /* @__PURE__ */ i
|
|
86
|
+
value: /* @__PURE__ */ s(i, { status: e.status })
|
|
39
87
|
};
|
|
40
88
|
}
|
|
41
|
-
function
|
|
89
|
+
function v(e) {
|
|
42
90
|
return {
|
|
43
91
|
title: "Order Type",
|
|
44
92
|
value: e.type
|
|
45
93
|
};
|
|
46
94
|
}
|
|
47
|
-
var
|
|
95
|
+
var y = {
|
|
48
96
|
amount: "dark:text-contrast-9",
|
|
49
97
|
symbol: "dark:text-contrast-9",
|
|
50
98
|
logo: "size-[18px]"
|
|
51
99
|
};
|
|
52
|
-
function
|
|
53
|
-
let { srcToken: n, destToken: r, srcAmountUnit: i, destAmountUnit: a } =
|
|
100
|
+
function b({ extra: e }) {
|
|
101
|
+
let { srcToken: n, destToken: r, srcAmountUnit: i, destAmountUnit: a } = e, o = t(i), s = t(a), c = {
|
|
54
102
|
address: n.address,
|
|
55
103
|
symbol: n.symbol,
|
|
56
104
|
chainId: n.network,
|
|
57
105
|
img: n.img,
|
|
58
106
|
amount: o,
|
|
59
107
|
amountPosition: "right",
|
|
60
|
-
classes:
|
|
108
|
+
classes: y,
|
|
61
109
|
showNetworkIcon: !0
|
|
62
110
|
}, l = {
|
|
63
111
|
address: r.address,
|
|
@@ -66,7 +114,7 @@ function m({ extra: t }) {
|
|
|
66
114
|
img: r.img,
|
|
67
115
|
amount: s,
|
|
68
116
|
amountPosition: "right",
|
|
69
|
-
classes:
|
|
117
|
+
classes: y,
|
|
70
118
|
showNetworkIcon: !0
|
|
71
119
|
};
|
|
72
120
|
return {
|
|
@@ -81,6 +129,6 @@ function m({ extra: t }) {
|
|
|
81
129
|
};
|
|
82
130
|
}
|
|
83
131
|
//#endregion
|
|
84
|
-
export {
|
|
132
|
+
export { f as constructExpiresInDetail, m as constructOrderRateDetail, _ as constructOrderStatusDetail, v as constructOrderTypeDetail, b as constructPayReceiveInfoProps, u as constructSubmitDateDetail, h as constructTwapDurationDetail, g as constructTwapSplitsDetail };
|
|
85
133
|
|
|
86
134
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["dayjs","LimitOrderItem","LimitOrderItemExtra","RequiredLimitOrderItemExtra","DetailWithValue","PayReceiveInfoProps","Rate","StatusBadge","TimeTillExpiry","formatTokenAmount","TokenBadgeProps","constructSubmitDateDetail","createdAt","title","value","format","timeTillExpiryClasses","root","constructExpiresInDetail","deadline","rateClasses","left","right","constructOrderRateDetail","extra","
|
|
1
|
+
{"version":3,"file":"utils.js","names":["dayjs","LimitOrderItem","LimitOrderItemExtra","RequiredLimitOrderItemExtra","DetailWithValue","PayReceiveInfoProps","Rate","StatusBadge","TimeTillExpiry","formatTokenAmount","TokenBadgeProps","DeltaAuctionWithTwapOrder","Duration","getTwapAuctionDeadlines","ONE_MINUTE_MS","constructSubmitDateDetail","createdAt","title","value","format","timeTillExpiryClasses","root","constructExpiresInDetail","deadline","rateClasses","left","right","constructOrderRateDetail","extra","constructTwapDurationDetail","order","endsInMs","durationMs","now","Date","getTime","isFuture","showSecondsInExpiry","constructTwapSplitsDetail","numSlices","interval","constructOrderStatusDetail","status","constructOrderTypeDetail","type","tokenBadgeClasses","amount","symbol","logo","constructPayReceiveInfoProps","srcToken","destToken","srcAmountUnit","destAmountUnit","formattedSrcAmount","formattedDestAmount","topTokenBadgeProps","address","chainId","network","img","amountPosition","const","classes","showNetworkIcon","bottomTokenBadgeProps","topToken","tokenBadgeProps","label","bottomToken"],"sources":["../../../../../src/components/widget/LimitOrderItem/LimitOrderDetails/utils.tsx"],"sourcesContent":["import dayjs from \"dayjs\";\nimport type {\n LimitOrderItem,\n LimitOrderItemExtra,\n RequiredLimitOrderItemExtra,\n} from \"../types\";\nimport type { DetailWithValue } from \"../../Details/types\";\nimport type { PayReceiveInfoProps } from \"../../PayReceiveInfo/types\";\nimport { Rate, StatusBadge, TimeTillExpiry } from \"../LimitOrderListItem\";\nimport { formatTokenAmount } from \"@/lib/utils/formatTokenBalance\";\nimport type { TokenBadgeProps } from \"../../TokenBadge/types\";\nimport type { DeltaAuctionWithTwapOrder } from \"@/hooks/swap/prices/delta/orders/types\";\nimport { Duration } from \"../../Duration/Duration\";\nimport { getTwapAuctionDeadlines } from \"@/lib/utils/twap\";\nimport { ONE_MINUTE_MS } from \"@/lib/constants/time\";\n\nexport function constructSubmitDateDetail({\n createdAt,\n}: {\n createdAt: string | number;\n}): DetailWithValue {\n return {\n title: \"Submit Date\",\n value: dayjs(createdAt).format(\"DD MMM YYYY h:mm A\"),\n };\n}\n\nconst timeTillExpiryClasses = {\n root: \"dark:text-contrast-6\",\n};\n\nexport function constructExpiresInDetail({\n deadline,\n}: {\n deadline: number;\n}): DetailWithValue {\n return {\n title: \"Expires in\",\n value: (\n <TimeTillExpiry deadline={deadline} classes={timeTillExpiryClasses} />\n ),\n };\n}\n\nconst rateClasses = {\n left: \"dark:text-contrast-6\",\n right: \"dark:text-contrast-6\",\n};\n\nexport function constructOrderRateDetail({\n extra,\n}: {\n extra: LimitOrderItemExtra;\n}): DetailWithValue {\n return {\n title: \"Order Rate\",\n value: <Rate extra={extra} classes={rateClasses} />,\n };\n}\n\nexport function constructTwapDurationDetail(\n order: DeltaAuctionWithTwapOrder\n): DetailWithValue {\n const { endsInMs, durationMs } = getTwapAuctionDeadlines(order);\n\n const now = new Date().getTime();\n const isFuture = endsInMs > now;\n\n // if less than 1 min to end,\n // show seconds instead of \"(ends in -)\"\n const showSecondsInExpiry = isFuture && endsInMs - now <= ONE_MINUTE_MS;\n\n return {\n title: \"Order Duration\",\n value: (\n <>\n <Duration\n timeMs={durationMs}\n classes={{\n root: \"inline-flex\",\n }}\n />\n {isFuture && (\n <>\n {\" \"}\n <span className=\"text-contrast-5 dark:text-contrast-5\">\n (ends in{\" \"}\n <TimeTillExpiry\n showSeconds={showSecondsInExpiry}\n deadline={endsInMs / 1000}\n classes={{\n root: \"inline-flex text-xs text-contrast-5 dark:text-contrast-5\",\n }}\n />\n )\n </span>\n </>\n )}\n </>\n ),\n };\n}\n\nexport function constructTwapSplitsDetail(\n order: DeltaAuctionWithTwapOrder\n): DetailWithValue {\n return {\n title: \"Order Splits\",\n value: (\n <>\n {order.order.numSlices} Parts{\" \"}\n <span className=\"text-contrast-5 dark:text-contrast-5\">\n (once every{\" \"}\n <Duration\n timeMs={order.order.interval * 1000}\n showSeconds\n classes={{\n root: \"inline-flex text-xs text-contrast-5 dark:text-contrast-5\",\n }}\n />\n )\n </span>\n </>\n ),\n };\n}\n\nexport function constructOrderStatusDetail(\n order: LimitOrderItem\n): DetailWithValue {\n return {\n title: \"Order Status\",\n value: <StatusBadge status={order.status} />,\n };\n}\n\nexport function constructOrderTypeDetail(\n order: LimitOrderItem\n): DetailWithValue {\n return {\n title: \"Order Type\",\n value: order.type,\n };\n}\n\nconst tokenBadgeClasses = {\n amount: \"dark:text-contrast-9\",\n symbol: \"dark:text-contrast-9\",\n logo: \"size-[18px]\",\n};\n\nexport function constructPayReceiveInfoProps({\n extra,\n}: {\n extra: RequiredLimitOrderItemExtra;\n}): PayReceiveInfoProps {\n const { srcToken, destToken, srcAmountUnit, destAmountUnit } = extra;\n\n const formattedSrcAmount = formatTokenAmount(srcAmountUnit);\n const formattedDestAmount = formatTokenAmount(destAmountUnit);\n\n const topTokenBadgeProps: TokenBadgeProps = {\n address: srcToken.address,\n symbol: srcToken.symbol,\n chainId: srcToken.network,\n img: srcToken.img,\n amount: formattedSrcAmount,\n amountPosition: \"right\" as const,\n classes: tokenBadgeClasses,\n showNetworkIcon: true,\n };\n\n const bottomTokenBadgeProps: TokenBadgeProps = {\n address: destToken.address,\n symbol: destToken.symbol,\n chainId: destToken.network,\n img: destToken.img,\n amount: formattedDestAmount,\n amountPosition: \"right\" as const,\n classes: tokenBadgeClasses,\n showNetworkIcon: true,\n };\n\n return {\n topToken: {\n tokenBadgeProps: topTokenBadgeProps,\n label: \"Pay\",\n },\n bottomToken: {\n tokenBadgeProps: bottomTokenBadgeProps,\n label: \"Receive\",\n },\n };\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgBe,EAA0B,EACxCC,gBAGkB;AAClB,QAAO;EACLC,OAAO;EACPC,OAAOlB,EAAMgB,EAAU,CAACG,OAAO,qBAAoB;EACpD;;AAGH,IAAMC,IAAwB,EAC5BC,MAAM,wBACP;AAED,SAAgBC,EAAyB,EACvCC,eAGkB;AAClB,QAAO;EACLN,OAAO;EACPC,OACE,kBAAC,GAAD;GAA0BK;GAAU,SAASH;GAAsB,CAAA;EAEtE;;AAGH,IAAMI,IAAc;CAClBC,MAAM;CACNC,OAAO;CACR;AAED,SAAgBC,EAAyB,EACvCC,YAGkB;AAClB,QAAO;EACLX,OAAO;EACPC,OAAO,kBAAC,GAAD;GAAaU;GAAO,SAASJ;GAAY,CAAA;EACjD;;AAGH,SAAgBK,EACdC,GACiB;CACjB,IAAM,EAAEC,aAAUC,kBAAenB,EAAwBiB,EAAM,EAEzDG,qBAAM,IAAIC,MAAM,EAACC,SAAS,EAC1BC,IAAWL,IAAWE,GAItBI,IAAsBD,KAAYL,IAAWE,KAAAA;AAEnD,QAAO;EACLhB,OAAO;EACPC,OACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;GACE,QAAQc;GACR,SAAS,EACPX,MAAM,eACP;GAAC,CAAA,EAEHe,KACC,kBAAA,GAAA,EAAA,UAAA,CACG,KACD,kBAAC,QAAD;GAAM,WAAU;aAAhB;IAAsD;IAC3C;IACT,kBAAC,GAAD;KACE,aAAaC;KACb,UAAUN,IAAW;KACrB,SAAS,EACPV,MAAM,4DACP;KAAC,CAAA;;IAGA;KAET,EAAA,CAAA,CACH,EAAA,CAAA;EAEH;;AAGH,SAAgBiB,EACdR,GACiB;AACjB,QAAO;EACLb,OAAO;EACPC,OACE,kBAAA,GAAA,EAAA,UAAA;GACGY,EAAMA,MAAMS;GAAU;GAAO;GAC9B,kBAAC,QAAD;IAAM,WAAU;cAAhB;KAAsD;KACxC;KACZ,kBAAC,GAAD;MACE,QAAQT,EAAMA,MAAMU,WAAW;MAC/B,aAAA;MACA,SAAS,EACPnB,MAAM,4DACP;MAAC,CAAA;;KAGA;;GACR,EAAA,CAAA;EAEH;;AAGH,SAAgBoB,EACdX,GACiB;AACjB,QAAO;EACLb,OAAO;EACPC,OAAO,kBAAC,GAAD,EAAa,QAAQY,EAAMY,QAAO,CAAA;EAC1C;;AAGH,SAAgBC,EACdb,GACiB;AACjB,QAAO;EACLb,OAAO;EACPC,OAAOY,EAAMc;EACd;;AAGH,IAAMC,IAAoB;CACxBC,QAAQ;CACRC,QAAQ;CACRC,MAAM;CACP;AAED,SAAgBC,EAA6B,EAC3CrB,YAGsB;CACtB,IAAM,EAAEsB,aAAUC,cAAWC,kBAAeC,sBAAmBzB,GAEzD0B,IAAqB7C,EAAkB2C,EAAc,EACrDG,IAAsB9C,EAAkB4C,EAAe,EAEvDG,IAAsC;EAC1CC,SAASP,EAASO;EAClBV,QAAQG,EAASH;EACjBW,SAASR,EAASS;EAClBC,KAAKV,EAASU;EACdd,QAAQQ;EACRO,gBAAgB;EAChBE,SAASlB;EACTmB,iBAAiB;EAClB,EAEKC,IAAyC;EAC7CR,SAASN,EAAUM;EACnBV,QAAQI,EAAUJ;EAClBW,SAASP,EAAUQ;EACnBC,KAAKT,EAAUS;EACfd,QAAQS;EACRM,gBAAgB;EAChBE,SAASlB;EACTmB,iBAAiB;EAClB;AAED,QAAO;EACLE,UAAU;GACRC,iBAAiBX;GACjBY,OAAO;GACR;EACDC,aAAa;GACXF,iBAAiBF;GACjBG,OAAO;GACT;EACD"}
|
|
@@ -9,8 +9,9 @@ export declare const TradeAndNetwork: ({ extra, chainId, }: Pick<LimitOrderItem,
|
|
|
9
9
|
export declare const Rate: ({ extra, classes, }: {
|
|
10
10
|
extra: Omit<LimitOrderItemExtra, "visualItemType">;
|
|
11
11
|
} & WithClasses<"root" | "left" | "right">) => import("react/jsx-runtime").JSX.Element | "-";
|
|
12
|
-
export declare const StatusBadge: ({ status }: {
|
|
12
|
+
export declare const StatusBadge: ({ status, extraLabel, }: {
|
|
13
13
|
status: DeltaAuctionStatus;
|
|
14
|
+
extraLabel?: React.ReactNode;
|
|
14
15
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export declare const TimeTillExpiry: ({ deadline, classes, showSeconds, }: {
|
|
16
17
|
deadline: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimitOrderListItem.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/LimitOrderItem/LimitOrderListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"LimitOrderListItem.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/LimitOrderItem/LimitOrderListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAWnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAQ1D,eAAO,MAAM,mBAAmB,GAAI,uBAGjC;IACD,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;CAC5C,4CAUA,CAAC;AAMF,eAAO,MAAM,eAAe,GAAI,qBAG7B,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC,4CAU3C,CAAC;AAwDF,eAAO,MAAM,IAAI,GAAI,qBAGlB;IAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAA;CAAE,GAAG,WAAW,CACrE,MAAM,GAAG,MAAM,GAAG,OAAO,CAC1B,kDAiBA,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,yBAGzB;IACD,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,4CAmBA,CAAC;AA6BF,eAAO,MAAM,cAAc,GAAI,qCAI5B;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,WAAW,CAAC,MAAM,CAAC,4CAOtB,CAAC"}
|
|
@@ -1,137 +1,139 @@
|
|
|
1
1
|
import { cn as e } from "../../../lib/utils/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { getTwapAuctionDeadlines as t } from "../../../lib/utils/twap.js";
|
|
3
|
+
import { DeltaOrderStatusChecker as n, getDisplayedOrderStatus as r, isTwapAuction as i } from "../../../hooks/swap/prices/delta/orders/utils.js";
|
|
4
|
+
import { useDateNow as a } from "../../../lib/utils/useDateNow.js";
|
|
5
|
+
import { NetworkWithIcon as o } from "../NetworkWithIcon/NetworkWithIcon.js";
|
|
6
|
+
import { TokenBadge as s } from "../TokenBadge/TokenBadge.js";
|
|
7
|
+
import { calcRate as c } from "../../../lib/utils/rate.js";
|
|
8
|
+
import { twapSliceInfo as l } from "./utils.js";
|
|
9
|
+
import { formatTokenAmount as u } from "../../../lib/utils/formatTokenBalance.js";
|
|
10
|
+
import { Duration as d } from "../Duration/Duration.js";
|
|
11
|
+
import { c as f } from "react-compiler-runtime";
|
|
12
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
11
13
|
//#region src/components/widget/LimitOrderItem/LimitOrderListItem.tsx
|
|
12
|
-
var
|
|
13
|
-
let t =
|
|
14
|
+
var g = "-", _ = (e) => {
|
|
15
|
+
let t = f(10), { auction: n, onClick: r } = e, i;
|
|
14
16
|
t[0] !== n || t[1] !== r ? (i = () => r(n), t[0] = n, t[1] = r, t[2] = i) : i = t[2];
|
|
15
17
|
let a, o;
|
|
16
|
-
t[3] === n ? (a = t[4], o = t[5]) : (a = /* @__PURE__ */
|
|
18
|
+
t[3] === n ? (a = t[4], o = t[5]) : (a = /* @__PURE__ */ m(x, { ...n }), o = /* @__PURE__ */ m(E, { ...n }), t[3] = n, t[4] = a, t[5] = o);
|
|
17
19
|
let s;
|
|
18
|
-
return t[6] !== i || t[7] !== a || t[8] !== o ? (s = /* @__PURE__ */
|
|
20
|
+
return t[6] !== i || t[7] !== a || t[8] !== o ? (s = /* @__PURE__ */ h("div", {
|
|
19
21
|
className: "bg-white dark:bg-contrast-3 p-4 rounded-sm cursor-pointer",
|
|
20
22
|
onClick: i,
|
|
21
23
|
children: [a, o]
|
|
22
24
|
}), t[6] = i, t[7] = a, t[8] = o, t[9] = s) : s = t[9], s;
|
|
23
|
-
},
|
|
25
|
+
}, v = {
|
|
24
26
|
logo: "size-[16px]",
|
|
25
27
|
root: "z-1"
|
|
26
|
-
},
|
|
28
|
+
}, y = {
|
|
27
29
|
logo: "size-[16px]",
|
|
28
30
|
root: "-ml-1"
|
|
29
|
-
},
|
|
31
|
+
}, b = {
|
|
30
32
|
root: "gap-2",
|
|
31
33
|
name: "dark:text-contrast-7"
|
|
32
|
-
},
|
|
33
|
-
let t =
|
|
34
|
-
t[0] === n ?
|
|
35
|
-
let
|
|
36
|
-
t[2] ===
|
|
37
|
-
networkId:
|
|
38
|
-
classes:
|
|
39
|
-
}), t[2] =
|
|
34
|
+
}, x = (e) => {
|
|
35
|
+
let t = f(7), { extra: n, chainId: r } = e, i;
|
|
36
|
+
t[0] === n ? i = t[1] : (i = /* @__PURE__ */ m(S, { ...n }), t[0] = n, t[1] = i);
|
|
37
|
+
let a = r, s;
|
|
38
|
+
t[2] === a ? s = t[3] : (s = /* @__PURE__ */ m(o, {
|
|
39
|
+
networkId: a,
|
|
40
|
+
classes: b
|
|
41
|
+
}), t[2] = a, t[3] = s);
|
|
40
42
|
let c;
|
|
41
|
-
return t[4] !==
|
|
43
|
+
return t[4] !== i || t[5] !== s ? (c = /* @__PURE__ */ h("div", {
|
|
42
44
|
className: "flex items-center justify-between pb-4",
|
|
43
|
-
children: [
|
|
44
|
-
}), t[4] =
|
|
45
|
-
},
|
|
46
|
-
let t =
|
|
47
|
-
if (!n || !r || !i || !
|
|
48
|
-
let
|
|
49
|
-
t[0] === i ?
|
|
50
|
-
let
|
|
51
|
-
t[2] ===
|
|
52
|
-
let
|
|
53
|
-
t[4] !== n.address || t[5] !== n.img || t[6] !== n.network ? (
|
|
45
|
+
children: [i, s]
|
|
46
|
+
}), t[4] = i, t[5] = s, t[6] = c) : c = t[6], c;
|
|
47
|
+
}, S = (e) => {
|
|
48
|
+
let t = f(29), { srcToken: n, destToken: r, srcAmountUnit: i, destAmountUnit: a, visualItemType: o } = e;
|
|
49
|
+
if (!n || !r || !i || !a) return g;
|
|
50
|
+
let c;
|
|
51
|
+
t[0] === i ? c = t[1] : (c = u(i), t[0] = i, t[1] = c);
|
|
52
|
+
let l = c, d;
|
|
53
|
+
t[2] === a ? d = t[3] : (d = u(a), t[2] = a, t[3] = d);
|
|
54
|
+
let p = d, _;
|
|
55
|
+
t[4] !== n.address || t[5] !== n.img || t[6] !== n.network ? (_ = /* @__PURE__ */ m(s, {
|
|
54
56
|
address: n.address,
|
|
55
57
|
chainId: n.network,
|
|
56
58
|
img: n.img,
|
|
57
|
-
classes:
|
|
58
|
-
}), t[4] = n.address, t[5] = n.img, t[6] = n.network, t[7] =
|
|
59
|
+
classes: v
|
|
60
|
+
}), t[4] = n.address, t[5] = n.img, t[6] = n.network, t[7] = _) : _ = t[7];
|
|
59
61
|
let b;
|
|
60
|
-
t[8] !== r.address || t[9] !== r.img || t[10] !== r.network ? (b = /* @__PURE__ */
|
|
62
|
+
t[8] !== r.address || t[9] !== r.img || t[10] !== r.network ? (b = /* @__PURE__ */ m(s, {
|
|
61
63
|
address: r.address,
|
|
62
64
|
img: r.img,
|
|
63
65
|
chainId: r.network,
|
|
64
|
-
classes:
|
|
66
|
+
classes: y
|
|
65
67
|
}), t[8] = r.address, t[9] = r.img, t[10] = r.network, t[11] = b) : b = t[11];
|
|
66
68
|
let x;
|
|
67
|
-
t[12] !==
|
|
69
|
+
t[12] !== _ || t[13] !== b ? (x = /* @__PURE__ */ h("div", {
|
|
68
70
|
className: "flex items-center",
|
|
69
|
-
children: [
|
|
70
|
-
}), t[12] =
|
|
71
|
+
children: [_, b]
|
|
72
|
+
}), t[12] = _, t[13] = b, t[14] = x) : x = t[14];
|
|
71
73
|
let S = x, C;
|
|
72
|
-
t[15] ===
|
|
74
|
+
t[15] === o ? C = t[16] : (C = /* @__PURE__ */ m("div", {
|
|
73
75
|
className: "text-xs font-medium text-contrast-5",
|
|
74
|
-
children:
|
|
75
|
-
}), t[15] =
|
|
76
|
+
children: o
|
|
77
|
+
}), t[15] = o, t[16] = C);
|
|
76
78
|
let w;
|
|
77
|
-
t[17] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */
|
|
79
|
+
t[17] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ m("span", {
|
|
78
80
|
className: "mx-1",
|
|
79
81
|
children: "→"
|
|
80
82
|
}), t[17] = w) : w = t[17];
|
|
81
83
|
let T;
|
|
82
|
-
t[18] !== r.symbol || t[19] !==
|
|
84
|
+
t[18] !== r.symbol || t[19] !== p || t[20] !== l || t[21] !== n.symbol ? (T = /* @__PURE__ */ h("div", {
|
|
83
85
|
className: "text-sm font-medium dark:text-contrast-9",
|
|
84
86
|
children: [
|
|
85
87
|
n.symbol,
|
|
86
88
|
" ",
|
|
87
|
-
|
|
89
|
+
l,
|
|
88
90
|
w,
|
|
89
91
|
r.symbol,
|
|
90
92
|
" ",
|
|
91
|
-
|
|
93
|
+
p
|
|
92
94
|
]
|
|
93
|
-
}), t[18] = r.symbol, t[19] =
|
|
95
|
+
}), t[18] = r.symbol, t[19] = p, t[20] = l, t[21] = n.symbol, t[22] = T) : T = t[22];
|
|
94
96
|
let E;
|
|
95
|
-
t[23] !== C || t[24] !== T ? (E = /* @__PURE__ */
|
|
97
|
+
t[23] !== C || t[24] !== T ? (E = /* @__PURE__ */ h("div", {
|
|
96
98
|
className: "ml-2 flex flex-col",
|
|
97
99
|
children: [C, T]
|
|
98
100
|
}), t[23] = C, t[24] = T, t[25] = E) : E = t[25];
|
|
99
101
|
let D = E, O;
|
|
100
|
-
return t[26] !== S || t[27] !== D ? (O = /* @__PURE__ */
|
|
102
|
+
return t[26] !== S || t[27] !== D ? (O = /* @__PURE__ */ h("div", {
|
|
101
103
|
className: "flex items-center",
|
|
102
104
|
children: [S, D]
|
|
103
105
|
}), t[26] = S, t[27] = D, t[28] = O) : O = t[28], O;
|
|
104
|
-
},
|
|
105
|
-
let n =
|
|
106
|
-
if (!a || !
|
|
107
|
-
let
|
|
108
|
-
if (n[0] !==
|
|
109
|
-
|
|
106
|
+
}, C = (t) => {
|
|
107
|
+
let n = f(16), { extra: r, classes: i } = t, { srcToken: a, destToken: o, srcAmountUnit: s, destAmountUnit: l } = r;
|
|
108
|
+
if (!a || !o || !s || !l) return g;
|
|
109
|
+
let d, p;
|
|
110
|
+
if (n[0] !== l || n[1] !== s) {
|
|
111
|
+
p = Symbol.for("react.early_return_sentinel");
|
|
110
112
|
bb0: {
|
|
111
|
-
let e =
|
|
113
|
+
let e = c(s, l)?.rateFormatted;
|
|
112
114
|
if (!e) {
|
|
113
|
-
|
|
115
|
+
p = g;
|
|
114
116
|
break bb0;
|
|
115
117
|
}
|
|
116
|
-
|
|
118
|
+
d = u(e);
|
|
117
119
|
}
|
|
118
|
-
n[0] =
|
|
119
|
-
} else
|
|
120
|
-
if (
|
|
121
|
-
let _ = `${
|
|
120
|
+
n[0] = l, n[1] = s, n[2] = d, n[3] = p;
|
|
121
|
+
} else d = n[2], p = n[3];
|
|
122
|
+
if (p !== Symbol.for("react.early_return_sentinel")) return p;
|
|
123
|
+
let _ = `${d} ${o.symbol}`, v = `per ${a.symbol}`, y = i?.root, b;
|
|
122
124
|
n[4] === y ? b = n[5] : (b = e("text-xs", y), n[4] = y, n[5] = b);
|
|
123
125
|
let x = i?.left, S;
|
|
124
|
-
n[6] !== _ || n[7] !== x ? (S = /* @__PURE__ */
|
|
126
|
+
n[6] !== _ || n[7] !== x ? (S = /* @__PURE__ */ m("span", {
|
|
125
127
|
className: x,
|
|
126
128
|
children: _
|
|
127
129
|
}), n[6] = _, n[7] = x, n[8] = S) : S = n[8];
|
|
128
130
|
let C = i?.right, w;
|
|
129
|
-
n[9] !== v || n[10] !== C ? (w = /* @__PURE__ */
|
|
131
|
+
n[9] !== v || n[10] !== C ? (w = /* @__PURE__ */ m("span", {
|
|
130
132
|
className: C,
|
|
131
133
|
children: v
|
|
132
134
|
}), n[9] = v, n[10] = C, n[11] = w) : w = n[11];
|
|
133
135
|
let T;
|
|
134
|
-
return n[12] !== b || n[13] !== S || n[14] !== w ? (T = /* @__PURE__ */
|
|
136
|
+
return n[12] !== b || n[13] !== S || n[14] !== w ? (T = /* @__PURE__ */ h("div", {
|
|
135
137
|
className: b,
|
|
136
138
|
children: [
|
|
137
139
|
S,
|
|
@@ -139,57 +141,68 @@ var f = "-", p = (e) => {
|
|
|
139
141
|
w
|
|
140
142
|
]
|
|
141
143
|
}), n[12] = b, n[13] = S, n[14] = w, n[15] = T) : T = n[15], T;
|
|
142
|
-
},
|
|
143
|
-
let i =
|
|
144
|
+
}, w = (t) => {
|
|
145
|
+
let i = f(10), { status: a, extraLabel: o } = t, s;
|
|
144
146
|
if (i[0] !== a) {
|
|
145
|
-
let
|
|
146
|
-
|
|
147
|
-
"text-secondary-shamrock-green-2 bg-[#00976733]":
|
|
147
|
+
let t = n.success.has(a), r = n.failed.has(a), o = n.pending.has(a) || n.executing.has(a);
|
|
148
|
+
s = e("text-[10px] p-0.5 px-2 rounded-lg w-max", {
|
|
149
|
+
"text-secondary-shamrock-green-2 bg-[#00976733]": t,
|
|
148
150
|
"text-secondary-radical-red-1 bg-[#FF3B301A]": r,
|
|
149
|
-
"text-secondary-orange-peel-1 bg-[#FF950033]":
|
|
150
|
-
}), i[0] = a, i[1] =
|
|
151
|
-
} else
|
|
152
|
-
let s;
|
|
153
|
-
i[2] === a ? s = i[3] : (s = n(a), i[2] = a, i[3] = s);
|
|
151
|
+
"text-secondary-orange-peel-1 bg-[#FF950033]": o
|
|
152
|
+
}), i[0] = a, i[1] = s;
|
|
153
|
+
} else s = i[1];
|
|
154
154
|
let c;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
i[2] === a ? c = i[3] : (c = r(a), i[2] = a, i[3] = c);
|
|
156
|
+
let l;
|
|
157
|
+
i[4] === o ? l = i[5] : (l = o && /* @__PURE__ */ h(p, { children: [" ", o] }), i[4] = o, i[5] = l);
|
|
158
|
+
let u;
|
|
159
|
+
return i[6] !== s || i[7] !== c || i[8] !== l ? (u = /* @__PURE__ */ h("div", {
|
|
160
|
+
className: s,
|
|
161
|
+
children: [c, l]
|
|
162
|
+
}), i[6] = s, i[7] = c, i[8] = l, i[9] = u) : u = i[9], u;
|
|
163
|
+
}, T = {
|
|
160
164
|
left: "dark:text-contrast-7",
|
|
161
165
|
right: "text-contrast-5"
|
|
162
|
-
},
|
|
163
|
-
let
|
|
164
|
-
|
|
165
|
-
let
|
|
166
|
-
|
|
166
|
+
}, E = (e) => {
|
|
167
|
+
let r = f(24), a;
|
|
168
|
+
r[0] === e.status ? a = r[1] : (a = n.pending.has(e.status) || n.executing.has(e.status), r[0] = e.status, r[1] = a);
|
|
169
|
+
let o = a, s;
|
|
170
|
+
r[2] === e ? s = r[3] : (s = i(e), r[2] = e, r[3] = s);
|
|
171
|
+
let c = s, u;
|
|
172
|
+
r[4] !== c || r[5] !== e ? (u = c ? l(e) : void 0, r[4] = c, r[5] = e, r[6] = u) : u = r[6];
|
|
173
|
+
let d = u, p;
|
|
174
|
+
r[7] !== c || r[8] !== e ? (p = c ? t(e).endsInMs / 1e3 : e.order.deadline, r[7] = c, r[8] = e, r[9] = p) : p = r[9];
|
|
175
|
+
let g = p, _;
|
|
176
|
+
r[10] === e.extra ? _ = r[11] : (_ = /* @__PURE__ */ m(C, {
|
|
167
177
|
extra: e.extra,
|
|
168
|
-
classes:
|
|
169
|
-
}),
|
|
170
|
-
let
|
|
171
|
-
|
|
172
|
-
let
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
178
|
+
classes: T
|
|
179
|
+
}), r[10] = e.extra, r[11] = _);
|
|
180
|
+
let v;
|
|
181
|
+
r[12] !== g || r[13] !== o ? (v = o && /* @__PURE__ */ m(D, { deadline: g }), r[12] = g, r[13] = o, r[14] = v) : v = r[14];
|
|
182
|
+
let y;
|
|
183
|
+
r[15] !== d || r[16] !== e.status ? (y = /* @__PURE__ */ m(w, {
|
|
184
|
+
status: e.status,
|
|
185
|
+
extraLabel: d
|
|
186
|
+
}), r[15] = d, r[16] = e.status, r[17] = y) : y = r[17];
|
|
187
|
+
let b;
|
|
188
|
+
r[18] !== v || r[19] !== y ? (b = /* @__PURE__ */ h("div", {
|
|
176
189
|
className: "flex items-center gap-1",
|
|
177
|
-
children: [
|
|
178
|
-
}),
|
|
179
|
-
let
|
|
180
|
-
return
|
|
190
|
+
children: [v, y]
|
|
191
|
+
}), r[18] = v, r[19] = y, r[20] = b) : b = r[20];
|
|
192
|
+
let x;
|
|
193
|
+
return r[21] !== _ || r[22] !== b ? (x = /* @__PURE__ */ h("div", {
|
|
181
194
|
className: "flex items-center justify-between",
|
|
182
|
-
children: [
|
|
183
|
-
}),
|
|
184
|
-
},
|
|
185
|
-
let t =
|
|
186
|
-
return t[0] !==
|
|
195
|
+
children: [_, b]
|
|
196
|
+
}), r[21] = _, r[22] = b, r[23] = x) : x = r[23], x;
|
|
197
|
+
}, D = (e) => {
|
|
198
|
+
let t = f(4), { deadline: n, classes: r, showSeconds: i } = e, o = (n - a() / 1e3) * 1e3, s;
|
|
199
|
+
return t[0] !== r || t[1] !== i || t[2] !== o ? (s = /* @__PURE__ */ m(d, {
|
|
187
200
|
timeMs: o,
|
|
188
|
-
classes:
|
|
189
|
-
showSeconds:
|
|
190
|
-
}), t[0] =
|
|
201
|
+
classes: r,
|
|
202
|
+
showSeconds: i
|
|
203
|
+
}), t[0] = r, t[1] = i, t[2] = o, t[3] = s) : s = t[3], s;
|
|
191
204
|
};
|
|
192
205
|
//#endregion
|
|
193
|
-
export {
|
|
206
|
+
export { _ as LimitOrdersListItem, C as Rate, w as StatusBadge, D as TimeTillExpiry, x as TradeAndNetwork };
|
|
194
207
|
|
|
195
208
|
//# sourceMappingURL=LimitOrderListItem.js.map
|