@deframe-sdk/components 0.1.51 → 0.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3898,7 +3898,7 @@ var STATUS_STYLES = {
|
|
|
3898
3898
|
}
|
|
3899
3899
|
};
|
|
3900
3900
|
function resolveStatusBadgeTone(status = "SUCCESS") {
|
|
3901
|
-
if (status === "PENDING") return "pending";
|
|
3901
|
+
if (status === "PENDING" || status === "INITIAL") return "pending";
|
|
3902
3902
|
if (status === "FAILED") return "failed";
|
|
3903
3903
|
if (status === "REFUNDED") return "refunded";
|
|
3904
3904
|
return "success";
|
|
@@ -9016,6 +9016,11 @@ var variantStyles2 = {
|
|
|
9016
9016
|
dotClass: "bg-[var(--deframe-widget-color-state-warning)]",
|
|
9017
9017
|
labelClass: "text-[color:var(--deframe-widget-color-state-warning)]"
|
|
9018
9018
|
},
|
|
9019
|
+
INITIAL: {
|
|
9020
|
+
wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_32%,transparent)]",
|
|
9021
|
+
dotClass: "bg-[var(--deframe-widget-color-state-warning)]",
|
|
9022
|
+
labelClass: "text-[color:var(--deframe-widget-color-state-warning)]"
|
|
9023
|
+
},
|
|
9019
9024
|
FAILED: {
|
|
9020
9025
|
wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)]",
|
|
9021
9026
|
dotClass: "bg-[var(--deframe-widget-color-state-error)]",
|
|
@@ -9030,6 +9035,7 @@ var variantStyles2 = {
|
|
|
9030
9035
|
var STATUS_LABEL_KEY = {
|
|
9031
9036
|
SUCCESS: "success",
|
|
9032
9037
|
PENDING: "pending",
|
|
9038
|
+
INITIAL: "pending",
|
|
9033
9039
|
FAILED: "failed",
|
|
9034
9040
|
REFUNDED: "refunded"
|
|
9035
9041
|
};
|
|
@@ -10706,14 +10712,14 @@ var EarnDesktopViewSimple = ({
|
|
|
10706
10712
|
});
|
|
10707
10713
|
}, [categories, strategies, labels == null ? void 0 : labels.stablecoinsBannerDescription, labels == null ? void 0 : labels.realsBannerDescription]);
|
|
10708
10714
|
const historyByAsset = React6__default.useMemo(() => {
|
|
10709
|
-
var _a, _b, _c, _d;
|
|
10715
|
+
var _a, _b, _c, _d, _e;
|
|
10710
10716
|
const map = /* @__PURE__ */ new Map();
|
|
10711
10717
|
for (const item of historyItems) {
|
|
10712
10718
|
const isDeposit = item.type.includes("DEPOSIT");
|
|
10713
|
-
const
|
|
10714
|
-
const symbol = (
|
|
10719
|
+
const primaryAsset = isDeposit ? (_a = item.amounts) == null ? void 0 : _a.assetIn : (_b = item.amounts) == null ? void 0 : _b.assetOut;
|
|
10720
|
+
const symbol = (_e = primaryAsset && "token" in primaryAsset ? (_d = (_c = primaryAsset.token) == null ? void 0 : _c.symbol) == null ? void 0 : _d.toUpperCase() : null) != null ? _e : "";
|
|
10715
10721
|
if (!symbol) continue;
|
|
10716
|
-
const amount =
|
|
10722
|
+
const amount = primaryAsset && "amountInUSD" in primaryAsset && primaryAsset.amountInUSD ? formatCurrency(parseFloat(primaryAsset.amountInUSD)) : primaryAsset && "amountHumanized" in primaryAsset ? `${primaryAsset.amountHumanized} ${symbol}` : "";
|
|
10717
10723
|
const date = new Date(item.createdAt).toLocaleString(locale, {
|
|
10718
10724
|
day: "2-digit",
|
|
10719
10725
|
month: "2-digit",
|