@lumiapassport/ui-kit 1.15.1 → 1.15.2

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 CHANGED
@@ -5511,7 +5511,7 @@ function Header() {
5511
5511
  // package.json
5512
5512
  var package_default = {
5513
5513
  name: "@lumiapassport/ui-kit",
5514
- version: "1.15.0",
5514
+ version: "1.15.2",
5515
5515
  description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
5516
5516
  type: "module",
5517
5517
  main: "./dist/index.cjs",
@@ -12453,10 +12453,11 @@ function SendLumiaMenu() {
12453
12453
  ),
12454
12454
  isNicknameInput && resolvedAddress && !isResolving && nicknameData && /* @__PURE__ */ jsxs57("div", { className: "flex items-start gap-3 p-3 rounded-[var(--l-pass-el-bdrs)] bg-[var(--l-pass-bg-secondary)]", children: [
12455
12455
  nicknameData.avatarSvg ? /* @__PURE__ */ jsx64(
12456
- "div",
12456
+ "img",
12457
12457
  {
12458
- className: "w-10 h-10 rounded-full overflow-hidden flex-shrink-0",
12459
- dangerouslySetInnerHTML: { __html: nicknameData.avatarSvg }
12458
+ src: nicknameData.avatarSvg,
12459
+ alt: nicknameData.handle,
12460
+ className: "w-10 h-10 rounded-full object-cover flex-shrink-0"
12460
12461
  }
12461
12462
  ) : /* @__PURE__ */ jsx64("div", { className: "w-10 h-10 rounded-full bg-[var(--l-pass-bg)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx64(AtSign, { className: "w-5 h-5 text-[var(--l-pass-fg-muted)]" }) }),
12462
12463
  /* @__PURE__ */ jsxs57("div", { className: "flex flex-col gap-1 min-w-0", children: [
@@ -12523,10 +12524,11 @@ function SendLumiaMenu() {
12523
12524
  /* @__PURE__ */ jsx64("div", { className: "bg-[var(--l-pass-bg-secondary)] rounded-[var(--l-pass-el-bdrs)] p-4", children: isNicknameInput && nicknameData ? /* @__PURE__ */ jsxs57(Fragment24, { children: [
12524
12525
  /* @__PURE__ */ jsxs57("div", { className: "flex items-start gap-3 mb-4", children: [
12525
12526
  nicknameData.avatarSvg ? /* @__PURE__ */ jsx64(
12526
- "div",
12527
+ "img",
12527
12528
  {
12528
- className: "w-12 h-12 rounded-full overflow-hidden flex-shrink-0",
12529
- dangerouslySetInnerHTML: { __html: nicknameData.avatarSvg }
12529
+ src: nicknameData.avatarSvg,
12530
+ alt: nicknameData.handle,
12531
+ className: "w-12 h-12 rounded-full object-cover flex-shrink-0"
12530
12532
  }
12531
12533
  ) : /* @__PURE__ */ jsx64("div", { className: "w-12 h-12 rounded-full bg-[var(--l-pass-bg)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx64(AtSign, { className: "w-6 h-6 text-[var(--l-pass-fg-muted)]" }) }),
12532
12534
  /* @__PURE__ */ jsxs57("div", { className: "flex flex-col gap-1 min-w-0", children: [
@@ -12996,15 +12998,48 @@ async function getTransactionsListQuery(address) {
12996
12998
  group.internals = [];
12997
12999
  }
12998
13000
  });
13001
+ const orphanGroupMap = /* @__PURE__ */ new Map();
12999
13002
  orphanInternals.forEach((internalItem) => {
13000
13003
  if (internalItem.isEntryPoint || toBigInt(internalItem.value) === 0n) {
13001
13004
  return;
13002
13005
  }
13006
+ const key = internalItem.parentHash.toLowerCase();
13007
+ const existing = orphanGroupMap.get(key) || [];
13008
+ existing.push(internalItem);
13009
+ orphanGroupMap.set(key, existing);
13010
+ });
13011
+ orphanGroupMap.forEach((internals, parentHash) => {
13012
+ const incomingInternals = internals.filter((internal) => {
13013
+ if (internal.direction !== "in") return false;
13014
+ const amount = toBigInt(internal.value);
13015
+ return amount > 0n;
13016
+ });
13017
+ if (incomingInternals.length === 0) {
13018
+ return;
13019
+ }
13020
+ let totalIn = 0n;
13021
+ incomingInternals.forEach((internal) => {
13022
+ totalIn += toBigInt(internal.value);
13023
+ });
13024
+ const sorted = incomingInternals.map((internal) => ({
13025
+ internal,
13026
+ amount: toBigInt(internal.value)
13027
+ })).sort((a, b) => {
13028
+ if (a.amount === b.amount) return 0;
13029
+ return a.amount > b.amount ? -1 : 1;
13030
+ });
13031
+ const primary = sorted[0].internal;
13032
+ const syntheticParent = {
13033
+ ...primary,
13034
+ id: `orphan-${parentHash}`,
13035
+ direction: "in",
13036
+ value: totalIn.toString()
13037
+ };
13003
13038
  groups.push({
13004
- id: internalItem.id,
13005
- parent: internalItem,
13039
+ id: syntheticParent.id,
13040
+ parent: syntheticParent,
13006
13041
  internals: [],
13007
- timestampMs: internalItem.timestampMs
13042
+ timestampMs: Math.max(...incomingInternals.map((i) => i.timestampMs))
13008
13043
  });
13009
13044
  });
13010
13045
  tokenTransfersData.forEach((transfer, index) => {
@@ -13168,10 +13203,16 @@ function TransactionsGroup(props) {
13168
13203
  /* @__PURE__ */ jsx69("span", { className: "block flex-0 font-mono text-[10px] text-[var(--l-pass-fg-muted)]", children: formatTimestamp(group.timestampMs) })
13169
13204
  ] }),
13170
13205
  /* @__PURE__ */ jsxs61("div", { className: "flex items-center justify-between gap-[var(--l-pass-gap)]", children: [
13171
- /* @__PURE__ */ jsxs61("span", { className: "font-bold", children: [
13172
- formatValue2(parent.value, assetDecimals),
13173
- " ",
13174
- assetSymbol
13206
+ /* @__PURE__ */ jsxs61("div", { className: "flex flex-col gap-0", children: [
13207
+ /* @__PURE__ */ jsxs61("span", { className: "font-bold", children: [
13208
+ formatValue2(parent.value, assetDecimals),
13209
+ " ",
13210
+ assetSymbol
13211
+ ] }),
13212
+ /* @__PURE__ */ jsxs61("span", { className: "text-[10px] font-mono text-[var(--l-pass-fg-muted)]", children: [
13213
+ isIncoming ? "From: " : "To: ",
13214
+ parent.counterpartyName || formatAddress2(parent.counterparty)
13215
+ ] })
13175
13216
  ] }),
13176
13217
  /* @__PURE__ */ jsxs61("div", { className: "flex items-center gap-0", children: [
13177
13218
  /* @__PURE__ */ jsx69(