@deframe-sdk/components 0.1.53 → 0.1.54
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.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8725,11 +8725,16 @@ function historyResolveLabel(item, labels) {
|
|
|
8725
8725
|
};
|
|
8726
8726
|
return labelMap[item.type]();
|
|
8727
8727
|
}
|
|
8728
|
-
function
|
|
8728
|
+
function resolveDisplayAsset(item) {
|
|
8729
8729
|
var _a, _b;
|
|
8730
|
-
const
|
|
8731
|
-
const
|
|
8732
|
-
|
|
8730
|
+
const assetIn = (_a = item.amounts) == null ? void 0 : _a.assetIn;
|
|
8731
|
+
const assetOut = (_b = item.amounts) == null ? void 0 : _b.assetOut;
|
|
8732
|
+
if (item.type === "TRANSFER_OUT" || item.type === "OFF_RAMP_FIAT") return assetIn;
|
|
8733
|
+
if (item.type === "SAMECHAIN_INVESTMENT_DEPOSIT" || item.type === "CROSSCHAIN_INVESTMENT_DEPOSIT") return assetIn;
|
|
8734
|
+
return assetOut;
|
|
8735
|
+
}
|
|
8736
|
+
function historyResolveAmounts(item) {
|
|
8737
|
+
const displayAsset = resolveDisplayAsset(item);
|
|
8733
8738
|
if (!displayAsset) return { primary: "\u2014", secondary: "" };
|
|
8734
8739
|
if (isAssetAmount(displayAsset)) {
|
|
8735
8740
|
const primary = `${displayAsset.amountHumanized} ${displayAsset.symbol}`;
|
|
@@ -8766,18 +8771,13 @@ function historyIsDeposit(type) {
|
|
|
8766
8771
|
return DEPOSIT_TYPES.includes(type);
|
|
8767
8772
|
}
|
|
8768
8773
|
function historyResolveIconUrl(item) {
|
|
8769
|
-
var _a, _b
|
|
8770
|
-
const
|
|
8771
|
-
|
|
8772
|
-
const displayAsset = item.type === "TRANSFER_OUT" || item.type === "OFF_RAMP_FIAT" ? assetIn : assetOut;
|
|
8773
|
-
if (displayAsset && isAssetAmount(displayAsset)) return (_d = (_c = displayAsset.token) == null ? void 0 : _c.logoURI) != null ? _d : "";
|
|
8774
|
+
var _a, _b;
|
|
8775
|
+
const displayAsset = resolveDisplayAsset(item);
|
|
8776
|
+
if (displayAsset && isAssetAmount(displayAsset)) return (_b = (_a = displayAsset.token) == null ? void 0 : _a.logoURI) != null ? _b : "";
|
|
8774
8777
|
return "";
|
|
8775
8778
|
}
|
|
8776
8779
|
function historyResolveIconAlt(item) {
|
|
8777
|
-
|
|
8778
|
-
const assetOut = (_a = item.amounts) == null ? void 0 : _a.assetOut;
|
|
8779
|
-
const assetIn = (_b = item.amounts) == null ? void 0 : _b.assetIn;
|
|
8780
|
-
const displayAsset = item.type === "TRANSFER_OUT" || item.type === "OFF_RAMP_FIAT" ? assetIn : assetOut;
|
|
8780
|
+
const displayAsset = resolveDisplayAsset(item);
|
|
8781
8781
|
if (displayAsset && isAssetAmount(displayAsset)) return displayAsset.symbol;
|
|
8782
8782
|
if (displayAsset && isFiatAmount(displayAsset)) return displayAsset.currency;
|
|
8783
8783
|
return "";
|
|
@@ -9135,7 +9135,7 @@ var SwapHistoryViewSimple = ({
|
|
|
9135
9135
|
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
|
|
9136
9136
|
"flex flex-col gap-[var(--deframe-widget-size-gap-md)] h-[calc(100vh-48px)]",
|
|
9137
9137
|
"font-[var(--deframe-widget-font-family)]",
|
|
9138
|
-
|
|
9138
|
+
"w-full max-w-[900px] mx-auto shrink-0 box-border",
|
|
9139
9139
|
className
|
|
9140
9140
|
),
|
|
9141
9141
|
children: [
|