@lukso/transaction-view-core 0.4.1 → 0.5.0-dev.5ea12c5

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.
Files changed (39) hide show
  1. package/.turbo/turbo-build.log +16 -16
  2. package/.turbo/turbo-typecheck.log +4 -0
  3. package/CHANGELOG.md +15 -0
  4. package/dist/index.cjs +39 -159
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +0 -9
  7. package/dist/index.d.ts +0 -9
  8. package/dist/index.js +66 -191
  9. package/dist/index.js.map +1 -1
  10. package/dist/shared/index.cjs +23 -60
  11. package/dist/shared/index.cjs.map +1 -1
  12. package/dist/shared/index.d.cts +4 -16
  13. package/dist/shared/index.d.ts +4 -16
  14. package/dist/shared/index.js +35 -72
  15. package/dist/shared/index.js.map +1 -1
  16. package/package.json +5 -4
  17. package/src/components/asset-card.ts +2 -22
  18. package/src/components/contract-card.ts +2 -67
  19. package/src/components/info-panel.ts +1 -21
  20. package/src/components/transaction-playback.ts +4 -4
  21. package/src/index.ts +1 -1
  22. package/src/shared/address-display.ts +3 -6
  23. package/src/shared/address-view.ts +2 -18
  24. package/src/shared/custom-select.ts +1 -1
  25. package/src/shared/function-name-view.ts +1 -1
  26. package/src/shared/gas-provider-view.ts +4 -7
  27. package/src/shared/icon-view.ts +7 -9
  28. package/src/shared/image-list.ts +3 -3
  29. package/src/shared/load-web-components.ts +3 -2
  30. package/src/shared/notification-view.ts +1 -1
  31. package/src/shared/progress-view.ts +1 -10
  32. package/src/shared/scroll-to-bottom-button.ts +1 -1
  33. package/src/shared/signal-controller.ts +3 -1
  34. package/src/shared/transaction-view-controller.ts +1 -1
  35. package/src/shared/url-view.ts +3 -3
  36. package/src/shared/value-view.ts +6 -12
  37. package/src/styles/styles.css +1 -1
  38. package/src/vue-entry.ts +0 -1
  39. package/tsup.config.ts +3 -3
@@ -1,5 +1,5 @@
1
1
 
2
- > @lukso/transaction-view-core@0.4.1 build /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-core
2
+ > @lukso/transaction-view-core@0.5.0 build /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-core
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts, src/shared/index.ts, src/styles/index.ts
@@ -10,24 +10,24 @@
10
10
  ESM Build start
11
11
  CJS Build start
12
12
  DTS Build start
13
- ESM dist/index.js 259.91 KB
14
- ESM dist/shared/index.js 204.44 KB
13
+ ESM dist/shared/index.js 203.35 KB
15
14
  ESM dist/styles/index.js 131.02 KB
16
- ESM dist/index.js.map 365.86 KB
17
- ESM dist/shared/index.js.map 269.66 KB
15
+ ESM dist/index.js 256.04 KB
16
+ ESM dist/shared/index.js.map 267.80 KB
18
17
  ESM dist/styles/index.js.map 140.16 KB
19
- ESM ⚡️ Build success in 4575ms
20
- CJS dist/index.cjs 268.27 KB
21
- CJS dist/shared/index.cjs 209.96 KB
18
+ ESM dist/index.js.map 359.23 KB
19
+ ESM ⚡️ Build success in 4559ms
20
+ CJS dist/shared/index.cjs 208.77 KB
22
21
  CJS dist/styles/index.cjs 132.07 KB
23
- CJS dist/index.cjs.map 366.46 KB
24
- CJS dist/shared/index.cjs.map 270.47 KB
22
+ CJS dist/index.cjs 264.14 KB
23
+ CJS dist/shared/index.cjs.map 268.67 KB
25
24
  CJS dist/styles/index.cjs.map 140.22 KB
26
- CJS ⚡️ Build success in 4576ms
27
- DTS ⚡️ Build success in 11144ms
25
+ CJS dist/index.cjs.map 360.03 KB
26
+ CJS ⚡️ Build success in 4562ms
27
+ DTS ⚡️ Build success in 11722ms
28
28
  DTS dist/styles/index.d.ts 233.00 B
29
- DTS dist/index.d.ts 14.33 KB
30
- DTS dist/shared/index.d.ts 23.91 KB
29
+ DTS dist/index.d.ts 14.07 KB
30
+ DTS dist/shared/index.d.ts 23.56 KB
31
31
  DTS dist/styles/index.d.cts 233.00 B
32
- DTS dist/index.d.cts 14.33 KB
33
- DTS dist/shared/index.d.cts 23.91 KB
32
+ DTS dist/index.d.cts 14.07 KB
33
+ DTS dist/shared/index.d.cts 23.56 KB
@@ -0,0 +1,4 @@
1
+
2
+ > @lukso/transaction-view-core@0.5.0 typecheck /home/runner/work/service-auth-simple/service-auth-simple/packages/transaction-view-core
3
+ > tsc --noEmit
4
+
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-core-v0.4.1...transaction-view-core-v0.5.0) (2025-12-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * Add switch chain functionality ([#58](https://github.com/lukso-network/service-auth-simple/issues/58)) ([e515cef](https://github.com/lukso-network/service-auth-simple/commit/e515cefdcbf9bde0adf1d378e81f9564b6880722))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @lukso/transaction-decoder bumped to 1.3.0
16
+ * @lukso/transaction-view-headless bumped to 0.4.0
17
+
3
18
  ## [0.4.1](https://github.com/lukso-network/service-auth-simple/compare/transaction-view-core-v0.4.0...transaction-view-core-v0.4.1) (2025-12-10)
4
19
 
5
20
 
package/dist/index.cjs CHANGED
@@ -42,7 +42,7 @@ __export(index_exports, {
42
42
  AddressView: () => AddressView,
43
43
  CustomOption: () => CustomOption,
44
44
  CustomSelect: () => CustomSelect,
45
- DefaultViewRegistry: () => import_transaction_view_headless12.DefaultViewRegistry,
45
+ DefaultViewRegistry: () => import_transaction_view_headless10.DefaultViewRegistry,
46
46
  FunctionNameView: () => FunctionNameView,
47
47
  GasProviderView: () => GasProviderView,
48
48
  IconView: () => IconView,
@@ -58,11 +58,11 @@ __export(index_exports, {
58
58
  UrlView: () => UrlView,
59
59
  ValueView: () => ValueView,
60
60
  getGlobalLitLoader: () => getGlobalLitLoader,
61
- getGlobalRegistry: () => import_transaction_view_headless12.getGlobalRegistry,
61
+ getGlobalRegistry: () => import_transaction_view_headless10.getGlobalRegistry,
62
62
  resetGlobalLitLoader: () => resetGlobalLitLoader,
63
- resetGlobalRegistry: () => import_transaction_view_headless12.resetGlobalRegistry,
63
+ resetGlobalRegistry: () => import_transaction_view_headless10.resetGlobalRegistry,
64
64
  setGlobalLitLoader: () => setGlobalLitLoader,
65
- setGlobalRegistry: () => import_transaction_view_headless12.setGlobalRegistry,
65
+ setGlobalRegistry: () => import_transaction_view_headless10.setGlobalRegistry,
66
66
  useImageLoader: () => useImageLoader3,
67
67
  useSignal: () => useSignal,
68
68
  useSignals: () => useSignals,
@@ -95,13 +95,13 @@ var AddressDisplay = class extends import_lit.LitElement {
95
95
  this.showCopyButton = false;
96
96
  this.nameOnly = false;
97
97
  this.maxWidth = 200;
98
- this.isLoadingImage = false;
99
98
  // Composables
100
99
  this.imageLoader = (0, import_transaction_view_headless.useImageLoader)();
101
100
  this.addressResolver = (0, import_transaction_view_headless.useAddressResolver)();
101
+ this.isLoadingImage = false;
102
102
  // Task for loading profile image
103
103
  this.imageTask = new import_task.Task(this, {
104
- task: async ([resolved], { signal }) => {
104
+ task: async ([resolved]) => {
105
105
  if (!resolved) return null;
106
106
  this.isLoadingImage = true;
107
107
  try {
@@ -356,12 +356,6 @@ __decorateClass([
356
356
  __decorateClass([
357
357
  (0, import_decorators.property)({ type: Number, attribute: "max-width" })
358
358
  ], AddressDisplay.prototype, "maxWidth", 2);
359
- __decorateClass([
360
- (0, import_decorators.state)()
361
- ], AddressDisplay.prototype, "imageData", 2);
362
- __decorateClass([
363
- (0, import_decorators.state)()
364
- ], AddressDisplay.prototype, "isLoadingImage", 2);
365
359
  AddressDisplay = __decorateClass([
366
360
  safeCustomElement("address-display")
367
361
  ], AddressDisplay);
@@ -376,7 +370,7 @@ var import_decorators2 = require("lit/decorators.js");
376
370
  // src/shared/load-web-components.ts
377
371
  var originalDefine = typeof customElements !== "undefined" ? customElements.define.bind(customElements) : null;
378
372
  if (typeof customElements !== "undefined" && originalDefine) {
379
- customElements.define = function(name, constructor, options) {
373
+ customElements.define = (name, constructor, options) => {
380
374
  if (!customElements.get(name)) {
381
375
  originalDefine(name, constructor, options);
382
376
  }
@@ -428,14 +422,14 @@ var AddressView = class extends CoreLitElement {
428
422
  this.addressResolver = (0, import_transaction_view_headless2.useAddressResolver)();
429
423
  // Task for resolving address data
430
424
  this.addressTask = new import_task2.Task(this, {
431
- task: async ([address], { signal }) => {
425
+ task: async ([address]) => {
432
426
  if (!address) return null;
433
427
  this.isLoadingAddress = true;
434
428
  try {
435
429
  const resolved = await this.addressResolver.resolveAddress(address);
436
430
  this.requestUpdate();
437
431
  return resolved;
438
- } catch (error) {
432
+ } catch (_error) {
439
433
  return null;
440
434
  } finally {
441
435
  this.isLoadingAddress = false;
@@ -462,20 +456,6 @@ var AddressView = class extends CoreLitElement {
462
456
  const computedName = this.addressResolver.formatDisplayName(resolved);
463
457
  return this.label || computedName || "Anonymous";
464
458
  }
465
- /**
466
- * Check if this is a contract address (non-profile)
467
- */
468
- get isContract() {
469
- const resolved = this.addressTask.value;
470
- return resolved ? resolved.__gqltype !== "Profile" : false;
471
- }
472
- /**
473
- * Check if this should show the address hash (profiles show hash, contracts don't)
474
- */
475
- get shouldShowAddressHash() {
476
- const resolved = this.addressTask.value;
477
- return resolved ? resolved.__gqltype === "Profile" : true;
478
- }
479
459
  /**
480
460
  * Get prefix for the address display
481
461
  */
@@ -1054,7 +1034,7 @@ var GasProviderView = class extends CoreLitElement {
1054
1034
  }
1055
1035
  displayRelayerResetDate() {
1056
1036
  const date = new Date(this.relayerResetDate);
1057
- return isNaN(date.getTime()) ? "N/A" : date.toLocaleDateString();
1037
+ return Number.isNaN(date.getTime()) ? "N/A" : date.toLocaleDateString();
1058
1038
  }
1059
1039
  render() {
1060
1040
  const formatted = this.formatToken(this.balance);
@@ -1073,9 +1053,9 @@ var GasProviderView = class extends CoreLitElement {
1073
1053
  const options = [...relayerOptions, ...controllerOption];
1074
1054
  const selectedValue = this.selectedGasProvider ? this.selectedGasProvider.type === "controller" ? this.controllerAddress : (() => {
1075
1055
  const r = this.allRelayers.find(
1076
- (x) => x.id === this.selectedGasProvider.id
1056
+ (x) => x.id === this.selectedGasProvider?.id
1077
1057
  );
1078
- return r?.website || r?.apiUrl || `relayer:${this.selectedGasProvider.id}`;
1058
+ return r?.website || r?.apiUrl || `relayer:${this.selectedGasProvider?.id}`;
1079
1059
  })() : void 0;
1080
1060
  return import_lit6.html`
1081
1061
  <div class="w-full">
@@ -1146,14 +1126,14 @@ var IconView = class extends CoreLitElement {
1146
1126
  this.showIconIdenticon = true;
1147
1127
  this.showLabelIdenticon = false;
1148
1128
  this.forceUnresolved = false;
1149
- this.isLoadingImage = false;
1150
- this.isLoadingAddress = false;
1151
1129
  // Composables
1152
1130
  this.imageLoader = (0, import_transaction_view_headless3.useImageLoader)();
1153
1131
  this.addressResolver = (0, import_transaction_view_headless3.useAddressResolver)();
1132
+ this.isLoadingAddress = false;
1133
+ this.isLoadingImage = false;
1154
1134
  // Task for resolving address data
1155
1135
  this.addressTask = new import_task3.Task(this, {
1156
- task: async ([address], { signal }) => {
1136
+ task: async ([address]) => {
1157
1137
  if (!address) return null;
1158
1138
  this.isLoadingAddress = true;
1159
1139
  try {
@@ -1171,11 +1151,11 @@ var IconView = class extends CoreLitElement {
1171
1151
  });
1172
1152
  // Task for loading profile image
1173
1153
  this.imageTask = new import_task3.Task(this, {
1174
- task: async ([resolved], { signal }) => {
1154
+ task: async ([resolved]) => {
1175
1155
  if (!resolved) return null;
1176
1156
  this.isLoadingImage = true;
1177
1157
  try {
1178
- let image;
1158
+ let image = null;
1179
1159
  if (this.imageHint && resolved[this.imageHint]) {
1180
1160
  const imageArray = resolved[this.imageHint];
1181
1161
  if (Array.isArray(imageArray) && imageArray.length > 0) {
@@ -1313,15 +1293,6 @@ __decorateClass([
1313
1293
  __decorateClass([
1314
1294
  (0, import_decorators6.property)({ type: Number, attribute: "image-index" })
1315
1295
  ], IconView.prototype, "imageIndex", 2);
1316
- __decorateClass([
1317
- (0, import_decorators6.state)()
1318
- ], IconView.prototype, "imageData", 2);
1319
- __decorateClass([
1320
- (0, import_decorators6.state)()
1321
- ], IconView.prototype, "isLoadingImage", 2);
1322
- __decorateClass([
1323
- (0, import_decorators6.state)()
1324
- ], IconView.prototype, "isLoadingAddress", 2);
1325
1296
  IconView = __decorateClass([
1326
1297
  safeCustomElement("icon-view")
1327
1298
  ], IconView);
@@ -1567,14 +1538,6 @@ var ProgressView = class extends CoreLitElement {
1567
1538
  `}
1568
1539
  `;
1569
1540
  }
1570
- renderAddressLabel() {
1571
- return import_lit9.html`
1572
- <value-view
1573
- .value=${this.address}
1574
- .unit=${this.unit}
1575
- ></value-view>
1576
- `;
1577
- }
1578
1541
  render() {
1579
1542
  const isError = (this.className || "").split(/\s+/).includes("error");
1580
1543
  return import_lit9.html`
@@ -1720,7 +1683,9 @@ var MultiSignalController = class {
1720
1683
  });
1721
1684
  }
1722
1685
  hostDisconnected() {
1723
- this.unsubscribes.forEach((unsubscribe) => unsubscribe());
1686
+ this.unsubscribes.forEach((unsubscribe) => {
1687
+ unsubscribe();
1688
+ });
1724
1689
  this.unsubscribes = [];
1725
1690
  }
1726
1691
  getValue(index) {
@@ -1993,14 +1958,14 @@ var UrlView = class extends CoreLitElement {
1993
1958
  this.favicon = this.faviconCandidates[this.faviconIndex];
1994
1959
  const hostname = u.hostname.replace(/^www\./, "");
1995
1960
  const hostnamePretty = hostname.split(".").filter(Boolean).slice(-2).join(" ").replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
1996
- if (this.label && this.label.trim()) {
1961
+ if (this.label?.trim()) {
1997
1962
  this.displayName = this.label.trim();
1998
1963
  } else {
1999
1964
  this.displayName = hostnamePretty || this.url;
2000
1965
  }
2001
1966
  } catch {
2002
1967
  this.favicon = void 0;
2003
- this.displayName = this.label && this.label.trim() ? this.label : this.url;
1968
+ this.displayName = this.label?.trim() ? this.label : this.url;
2004
1969
  }
2005
1970
  }
2006
1971
  handleImageError() {
@@ -2187,14 +2152,15 @@ var ValueView = class extends CoreLitElement {
2187
2152
  if (value === null) return "null";
2188
2153
  if (value === void 0) return "undefined";
2189
2154
  switch (effectiveType) {
2190
- case "currency":
2155
+ case "currency": {
2191
2156
  const { numeric, symbol } = this.getCurrencyParts();
2192
2157
  return `${numeric} ${symbol}`;
2158
+ }
2193
2159
  case "bigint":
2194
2160
  if (typeof value === "bigint") {
2195
- return value.toString() + "n";
2161
+ return `${value.toString()}n`;
2196
2162
  }
2197
- return String(value) + "n";
2163
+ return `${String(value)}n`;
2198
2164
  case "boolean":
2199
2165
  return value ? "true" : "false";
2200
2166
  case "number":
@@ -2222,7 +2188,7 @@ var ValueView = class extends CoreLitElement {
2222
2188
  try {
2223
2189
  if (typeof value === "bigint") {
2224
2190
  numeric = formatUnits(value, effectiveDecimals);
2225
- } else if (typeof value === "string" && !isNaN(Number(value))) {
2191
+ } else if (typeof value === "string" && !Number.isNaN(Number(value))) {
2226
2192
  const bigintValue = BigInt(value);
2227
2193
  numeric = formatUnits(bigintValue, effectiveDecimals);
2228
2194
  }
@@ -2451,9 +2417,6 @@ __decorateClass([
2451
2417
  __decorateClass([
2452
2418
  (0, import_decorators11.property)()
2453
2419
  ], ValueView.prototype, "address", 2);
2454
- __decorateClass([
2455
- (0, import_decorators11.state)()
2456
- ], ValueView.prototype, "resolvedMetadata", 2);
2457
2420
  __decorateClass([
2458
2421
  (0, import_decorators11.state)()
2459
2422
  ], ValueView.prototype, "_hasSlotContent", 2);
@@ -2477,7 +2440,7 @@ var ImageList = class extends CoreLitElement {
2477
2440
  this.addressResolver = (0, import_transaction_view_headless7.useAddressResolver)();
2478
2441
  // Task for resolving address data
2479
2442
  this.addressTask = new import_task5.Task(this, {
2480
- task: async ([address], { signal }) => {
2443
+ task: async ([address]) => {
2481
2444
  if (!address) return null;
2482
2445
  this.isLoading = true;
2483
2446
  try {
@@ -2534,7 +2497,7 @@ var ImageList = class extends CoreLitElement {
2534
2497
  * Render a single image item
2535
2498
  */
2536
2499
  renderImageItem(item, index) {
2537
- const itemIndex = item.index !== void 0 ? item.index : index;
2500
+ const _itemIndex = item.index !== void 0 ? item.index : index;
2538
2501
  const isImage = this.isImageFile(item);
2539
2502
  if (isImage) {
2540
2503
  const imageSrc = item.src || item.url;
@@ -2647,8 +2610,6 @@ ImageList = __decorateClass([
2647
2610
  ], ImageList);
2648
2611
 
2649
2612
  // src/components/info-panel.ts
2650
- var import_task6 = require("@lit/task");
2651
- var import_transaction_view_headless8 = require("@lukso/transaction-view-headless");
2652
2613
  var import_lit14 = require("lit");
2653
2614
  var import_decorators13 = require("lit/decorators.js");
2654
2615
  var import_class_map = require("lit/directives/class-map.js");
@@ -2661,17 +2622,6 @@ var InfoPanel = class extends import_lit14.LitElement {
2661
2622
  this.open = false;
2662
2623
  this.standard = "";
2663
2624
  this.type = "transfer";
2664
- this._isAnimating = false;
2665
- this._resolutionTask = new import_task6.Task(this, {
2666
- task: async ([address]) => {
2667
- if (!address) return null;
2668
- const { resolveAddress } = (0, import_transaction_view_headless8.useAddressResolver)();
2669
- const data = await resolveAddress(address);
2670
- this._resolvedData = data;
2671
- return data;
2672
- },
2673
- args: () => [this.address]
2674
- });
2675
2625
  }
2676
2626
  _extractBaseAddress(addressOrComposite) {
2677
2627
  return addressOrComposite.split("-")[0];
@@ -3032,9 +2982,6 @@ __decorateClass([
3032
2982
  __decorateClass([
3033
2983
  (0, import_decorators13.property)({ type: String })
3034
2984
  ], InfoPanel.prototype, "type", 2);
3035
- __decorateClass([
3036
- (0, import_decorators13.state)()
3037
- ], InfoPanel.prototype, "_isAnimating", 2);
3038
2985
  __decorateClass([
3039
2986
  (0, import_decorators13.state)()
3040
2987
  ], InfoPanel.prototype, "_resolvedData", 2);
@@ -3048,8 +2995,8 @@ var import_decorators14 = require("lit/decorators.js");
3048
2995
  var import_repeat3 = require("lit/directives/repeat.js");
3049
2996
  var import_when3 = require("lit/directives/when.js");
3050
2997
  var import_web_components = require("@lukso/web-components");
3051
- var import_task7 = require("@lit/task");
3052
- var import_transaction_view_headless9 = require("@lukso/transaction-view-headless");
2998
+ var import_task6 = require("@lit/task");
2999
+ var import_transaction_view_headless8 = require("@lukso/transaction-view-headless");
3053
3000
  function formatUnits2(value, decimals = 18) {
3054
3001
  const divisor = 10n ** BigInt(decimals);
3055
3002
  const quotient = value / divisor;
@@ -3069,10 +3016,9 @@ var AssetCard = class extends CoreLitElement {
3069
3016
  this.showInfoButton = true;
3070
3017
  this.showCreator = true;
3071
3018
  this.displayDetails = false;
3072
- this._imageError = false;
3073
3019
  // Composables
3074
- this.addressResolver = (0, import_transaction_view_headless9.useAddressResolver)();
3075
- this._resolutionTask = new import_task7.Task(this, {
3020
+ this.addressResolver = (0, import_transaction_view_headless8.useAddressResolver)();
3021
+ this._resolutionTask = new import_task6.Task(this, {
3076
3022
  task: async ([address]) => {
3077
3023
  if (!address) return null;
3078
3024
  const { resolveAddress } = this.addressResolver;
@@ -3083,25 +3029,12 @@ var AssetCard = class extends CoreLitElement {
3083
3029
  args: () => [this.address]
3084
3030
  });
3085
3031
  }
3086
- _handleImageError() {
3087
- this._imageError = true;
3088
- }
3089
3032
  _handleInfoClick() {
3090
3033
  this.displayDetails = !this.displayDetails;
3091
3034
  }
3092
3035
  _extractBaseAddress(addressOrComposite) {
3093
3036
  return addressOrComposite.split("-")[0];
3094
3037
  }
3095
- _extractTokenId(addressOrComposite) {
3096
- const parts = addressOrComposite.split("-");
3097
- return parts.length > 1 ? parts[1] : void 0;
3098
- }
3099
- _copyToClipboard(text) {
3100
- if (navigator.clipboard) {
3101
- navigator.clipboard.writeText(text);
3102
- this.dispatchEvent(new CustomEvent("copied", { detail: { text } }));
3103
- }
3104
- }
3105
3038
  _renderAddressSection() {
3106
3039
  const data = this._resolutionTask.value;
3107
3040
  if (!data) return "";
@@ -3351,7 +3284,7 @@ var AssetCard = class extends CoreLitElement {
3351
3284
  ${(0, import_when3.when)(
3352
3285
  this.amount,
3353
3286
  () => import_lit15.html`
3354
- <span class="">${formatUnits2(BigInt(this.amount), this._resolvedData?.decimals)}</span>
3287
+ <span class="">${formatUnits2(BigInt(this.amount || 0), this._resolvedData?.decimals)}</span>
3355
3288
  <span class="ml-1 text-neutral-60 max-w-[60px] whitespace-nowrap overflow-hidden text-ellipsis text-[14px] font-semibold">${this._resolvedData?.lsp4TokenSymbol || ""}</span>
3356
3289
  `,
3357
3290
  () => import_lit15.html`${this._resolvedData?.lsp4TokenSymbol || ""}`
@@ -3407,9 +3340,6 @@ __decorateClass([
3407
3340
  __decorateClass([
3408
3341
  (0, import_decorators14.state)()
3409
3342
  ], AssetCard.prototype, "_resolvedData", 2);
3410
- __decorateClass([
3411
- (0, import_decorators14.state)()
3412
- ], AssetCard.prototype, "_imageError", 2);
3413
3343
  AssetCard = __decorateClass([
3414
3344
  safeCustomElement("asset-card")
3415
3345
  ], AssetCard);
@@ -4130,8 +4060,6 @@ UniversalTokenView = __decorateClass([
4130
4060
  ], UniversalTokenView);
4131
4061
 
4132
4062
  // src/components/contract-card.ts
4133
- var import_task8 = require("@lit/task");
4134
- var import_transaction_view_headless10 = require("@lukso/transaction-view-headless");
4135
4063
  var import_lit18 = require("lit");
4136
4064
  var import_decorators17 = require("lit/decorators.js");
4137
4065
  var ContractCard = class extends import_lit18.LitElement {
@@ -4144,54 +4072,6 @@ var ContractCard = class extends import_lit18.LitElement {
4144
4072
  this.hasOverlay = false;
4145
4073
  this.customClass = "";
4146
4074
  this.headerClass = "";
4147
- this._resolutionTask = new import_task8.Task(this, {
4148
- task: async ([address, resolved]) => {
4149
- if (resolved) {
4150
- this._resolvedData = resolved;
4151
- return resolved;
4152
- }
4153
- const { resolveAddress } = (0, import_transaction_view_headless10.useAddressResolver)();
4154
- const baseAddress = this._extractBaseAddress(address);
4155
- const data = await resolveAddress(baseAddress);
4156
- this._resolvedData = data;
4157
- return data;
4158
- },
4159
- args: () => [this.address, this.resolved]
4160
- });
4161
- this._profileImageTask = new import_task8.Task(this, {
4162
- task: async ([resolved]) => {
4163
- const { loadProfileImage } = (0, import_transaction_view_headless10.useImageLoader)();
4164
- const data = resolved || this._resolvedData;
4165
- if (!data) return null;
4166
- const image = await loadProfileImage(data, {
4167
- width: 256,
4168
- height: 256,
4169
- dpr: window.devicePixelRatio || 1
4170
- });
4171
- if (image?.src) {
4172
- this._profileImageUrl = image.src;
4173
- }
4174
- return image;
4175
- },
4176
- args: () => [this._resolvedData]
4177
- });
4178
- this._backgroundImageTask = new import_task8.Task(this, {
4179
- task: async ([resolved]) => {
4180
- const { loadBackgroundImage } = (0, import_transaction_view_headless10.useImageLoader)();
4181
- const data = resolved || this._resolvedData;
4182
- if (!data) return null;
4183
- const image = await loadBackgroundImage(data, {
4184
- width: 800,
4185
- height: 200,
4186
- dpr: window.devicePixelRatio || 1
4187
- });
4188
- if (image?.src) {
4189
- this._backgroundImageUrl = image.src;
4190
- }
4191
- return image;
4192
- },
4193
- args: () => [this._resolvedData]
4194
- });
4195
4075
  }
4196
4076
  _extractBaseAddress(addressOrComposite) {
4197
4077
  return addressOrComposite.split("-")[0];
@@ -4399,10 +4279,10 @@ PermissionsBlock = __decorateClass([
4399
4279
  ], PermissionsBlock);
4400
4280
 
4401
4281
  // src/registry/index.ts
4402
- var import_transaction_view_headless12 = require("@lukso/transaction-view-headless");
4282
+ var import_transaction_view_headless10 = require("@lukso/transaction-view-headless");
4403
4283
 
4404
4284
  // src/registry/lit-view-loader.ts
4405
- var import_transaction_view_headless11 = require("@lukso/transaction-view-headless");
4285
+ var import_transaction_view_headless9 = require("@lukso/transaction-view-headless");
4406
4286
  var LitViewLoader = class {
4407
4287
  constructor() {
4408
4288
  this.loadedComponents = /* @__PURE__ */ new Map();
@@ -4412,7 +4292,7 @@ var LitViewLoader = class {
4412
4292
  */
4413
4293
  async loadFromMatch(match) {
4414
4294
  if (!match.frameworkConfig) {
4415
- throw new import_transaction_view_headless11.ViewLoadingError(
4295
+ throw new import_transaction_view_headless9.ViewLoadingError(
4416
4296
  `No framework config for view "${match.view.id}"`,
4417
4297
  { type: "custom-element", tagName: "" },
4418
4298
  {}
@@ -4444,7 +4324,7 @@ var LitViewLoader = class {
4444
4324
  loadedComponent = await loader.loader(config);
4445
4325
  break;
4446
4326
  default:
4447
- throw new import_transaction_view_headless11.ViewLoadingError(
4327
+ throw new import_transaction_view_headless9.ViewLoadingError(
4448
4328
  `Unsupported loader type: ${loader.type}`,
4449
4329
  loader,
4450
4330
  config
@@ -4453,7 +4333,7 @@ var LitViewLoader = class {
4453
4333
  this.loadedComponents.set(component, loadedComponent);
4454
4334
  return loadedComponent;
4455
4335
  } catch (error) {
4456
- throw new import_transaction_view_headless11.ViewLoadingError(
4336
+ throw new import_transaction_view_headless9.ViewLoadingError(
4457
4337
  `Failed to load component "${component}"`,
4458
4338
  loader,
4459
4339
  config,