@fluent.xyz/connect 0.6.0-rc.1 → 0.6.0

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
@@ -5596,7 +5596,7 @@ function createFluentConnectForWidget(config) {
5596
5596
  }
5597
5597
 
5598
5598
  // package.json
5599
- var version = "0.6.0-rc.1";
5599
+ var version = "0.6.0";
5600
5600
 
5601
5601
  // src/core/analytics.ts
5602
5602
  var INSTANCE_NAME = "fluent";
@@ -5765,6 +5765,14 @@ function FluentPortalContainerProvider({ children }) {
5765
5765
  dialog.addEventListener("cancel", onCancel);
5766
5766
  dialog.addEventListener("close", onClose);
5767
5767
  document.body.appendChild(dialog);
5768
+ const placeToasts = (parent) => {
5769
+ if (toasts.parentElement === parent) return;
5770
+ parent.appendChild(toasts);
5771
+ try {
5772
+ toasts.showPopover?.();
5773
+ } catch {
5774
+ }
5775
+ };
5768
5776
  const acquire = () => {
5769
5777
  holdsRef.current += 1;
5770
5778
  if (holdsRef.current === 1 && dialog.isConnected && !dialog.open) {
@@ -5772,6 +5780,7 @@ function FluentPortalContainerProvider({ children }) {
5772
5780
  dialog.showModal();
5773
5781
  } catch {
5774
5782
  }
5783
+ placeToasts(dialog);
5775
5784
  }
5776
5785
  let released = false;
5777
5786
  return () => {
@@ -5779,6 +5788,7 @@ function FluentPortalContainerProvider({ children }) {
5779
5788
  released = true;
5780
5789
  holdsRef.current -= 1;
5781
5790
  if (holdsRef.current === 0 && dialog.open) {
5791
+ if (dialog.isConnected) placeToasts(document.body);
5782
5792
  try {
5783
5793
  dialog.close();
5784
5794
  } catch {
@@ -6401,7 +6411,8 @@ var BRIDGE_TX_HISTORY_PAGE_SIZE = 10;
6401
6411
  function useBridgeTxHistoryPages({
6402
6412
  baseUrl,
6403
6413
  address,
6404
- pageSize = BRIDGE_TX_HISTORY_PAGE_SIZE
6414
+ pageSize = BRIDGE_TX_HISTORY_PAGE_SIZE,
6415
+ refetchInterval = false
6405
6416
  }) {
6406
6417
  return useInfiniteQuery({
6407
6418
  queryKey: ["fluent-bridge-tx-history", baseUrl, address, pageSize],
@@ -6415,7 +6426,8 @@ function useBridgeTxHistoryPages({
6415
6426
  initialPageParam: 0,
6416
6427
  getNextPageParam: (last) => last.has_more ? last.next_offset ?? last.offset + last.limit : void 0,
6417
6428
  enabled: Boolean(address),
6418
- staleTime: 15e3
6429
+ staleTime: 15e3,
6430
+ refetchInterval
6419
6431
  });
6420
6432
  }
6421
6433
 
@@ -6826,9 +6838,11 @@ var icons = {
6826
6838
  /* @__PURE__ */ jsx("path", { d: "m11.944 15.349 6.722-3.937-6.722-3.003v6.94z", opacity: "0.2" }),
6827
6839
  /* @__PURE__ */ jsx("path", { d: "m5.222 11.412 6.722 3.937v-6.94l-6.722 3.003z", opacity: "0.6" })
6828
6840
  ] }),
6829
- usdc: (props) => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
6830
- /* @__PURE__ */ jsx("path", { d: "M12 1.5a10.5 10.5 0 1 1 0 21 10.5 10.5 0 0 1 0-21Zm0 2a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Z" }),
6831
- /* @__PURE__ */ jsx("path", { d: "M12.75 6v1.16c1.6.24 2.65 1.2 2.75 2.6h-1.8c-.1-.65-.66-1.08-1.6-1.08-1 0-1.6.45-1.6 1.1 0 .58.44.9 1.55 1.15l1.05.24c1.9.43 2.7 1.2 2.7 2.6 0 1.53-1.1 2.53-3.05 2.75V18h-1.5v-1.5c-1.75-.22-2.9-1.23-2.95-2.75h1.85c.1.76.75 1.2 1.85 1.2 1.05 0 1.7-.46 1.7-1.13 0-.6-.45-.94-1.6-1.2l-1.05-.24c-1.8-.42-2.65-1.2-2.65-2.55 0-1.47 1.1-2.47 2.85-2.7V6h1.5Z" })
6841
+ // Circle's USDC mark without its blue disc, which the token tile draws; the
6842
+ // view box is cropped to the mark so it sizes like the other token glyphs.
6843
+ usdc: (props) => /* @__PURE__ */ jsxs("svg", { viewBox: "250 250 1500 1500", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
6844
+ /* @__PURE__ */ jsx("path", { d: "M1275 1158.33c0-145.83-87.5-195.83-262.5-216.66-125-16.67-150-50-150-108.34s41.67-95.83 125-95.83c75 0 116.67 25 137.5 87.5 4.17 12.5 16.67 20.83 29.17 20.83h66.66c16.67 0 29.17-12.5 29.17-29.16v-4.17c-16.67-91.67-91.67-162.5-187.5-170.83v-100c0-16.67-12.5-29.17-33.33-33.34h-62.5c-16.67 0-29.17 12.5-33.34 33.34v95.83c-125 16.67-204.16 100-204.16 204.17 0 137.5 83.33 191.66 258.33 212.5 116.67 20.83 154.17 45.83 154.17 112.5s-58.34 112.5-137.5 112.5c-108.34 0-145.84-45.84-158.34-108.34-4.16-16.66-16.66-25-29.16-25h-70.84c-16.66 0-29.16 12.5-29.16 29.17v4.17c16.66 104.16 83.33 179.16 220.83 200v100c0 16.66 12.5 29.16 33.33 33.33h62.5c16.67 0 29.17-12.5 33.34-33.33v-100c125-20.84 208.33-108.34 208.33-220.84z" }),
6845
+ /* @__PURE__ */ jsx("path", { d: "M787.5 1595.83c-325-116.66-491.67-479.16-370.83-800 62.5-175 200-308.33 370.83-370.83 16.67-8.33 25-20.83 25-41.67V325c0-16.67-8.33-29.17-25-33.33-4.17 0-12.5 0-16.67 4.16-395.83 125-612.5 545.84-487.5 941.67 75 233.33 254.17 412.5 487.5 487.5 16.67 8.33 33.34 0 37.5-16.67 4.17-4.16 4.17-8.33 4.17-16.66v-58.34c0-12.5-12.5-29.16-25-37.5zm441.67-1300c-16.67-8.33-33.34 0-37.5 16.67-4.17 4.17-4.17 8.33-4.17 16.67v58.33c0 16.67 12.5 33.33 25 41.67 325 116.66 491.67 479.16 370.83 800-62.5 175-200 308.33-370.83 370.83-16.67 8.33-25 20.83-25 41.67V1700c0 16.67 8.33 29.17 25 33.33 4.17 0 12.5 0 16.67-4.16 395.83-125 612.5-545.84 487.5-941.67-75-237.5-258.34-416.67-487.5-491.67z" })
6832
6846
  ] }),
6833
6847
  usdnr: (props) => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 75 75", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
6834
6848
  /* @__PURE__ */ jsx("path", { d: "M36.8,58.23c-.18-.12-.36-.24-.53-.36l-.34-.24-1.38,17.22,.23,.03c.34,.04,.68,.08,1.02,.1l.25,.02,.89-16.69-.12-.08Zm2.73,1.55c-.14-.07-.29-.14-.43-.21l-.37-.19,.86,15.63,.25-.02c.31-.03,.62-.06,.93-.1l.23-.03-1.2-14.95-.13-.06-.14-.07Zm-5.17-3.37c-.16-.14-.32-.28-.48-.42l-.31-.28-3.94,17.99,.21,.07c.35,.12,.7,.23,1.05,.33l.25,.07,3.33-17.67-.11-.09Zm8.46,4.67c-.15-.05-.29-.09-.44-.14l-.39-.13,2.57,13.32,.25-.07c.27-.08,.54-.16,.81-.25l.21-.07-2.72-12.56-.14-.04-.15-.05Zm3.68,.85c-.15-.02-.29-.05-.44-.07l-.4-.07,3.56,10.49,.25-.13c.22-.12,.44-.24,.66-.36l.18-.1-3.52-9.71-.14-.02-.15-.02Zm-15.82-9.4c-.13-.16-.25-.33-.37-.5l-.23-.31-9,16.93,.14,.13c.31,.28,.63,.55,.95,.81l.23,.19,8.36-17.13-.09-.12Zm19.96,9.67c-.18,0-.68,0-.87,0h-.41s4.02,7.36,4.02,7.36l.22-.18c.17-.14,.34-.28,.5-.43l.14-.13-3.47-6.62h-.15Zm-21.28-11.59c-.11-.17-.21-.35-.31-.52l-.19-.32-11.05,15.3,.11,.14c.26,.34,.53,.68,.81,1.02l.21,.24,10.5-15.73-.08-.13Zm28.05,14.86l.11-.14-2.55-3.59-.15,.03c-.17,.03-.33,.06-.5,.09l-.37,.06,2.9,4.24,.2-.25c.12-.15,.24-.29,.35-.44Zm-29.11-16.75c-.09-.18-.18-.36-.27-.55l-.15-.32-12.54,13.16,.07,.15c.2,.4,.41,.8,.63,1.19l.17,.3,12.16-13.79-.07-.15Zm31.71,12.66l-.82-.89-.15,.06c-.14,.05-.28,.11-.42,.16l-.48,.19,1.23,1.63c.08-.14,.58-1.01,.65-1.15Zm-32.54-14.53c-.07-.19-.15-.37-.22-.56l-.12-.31-13.39,10.73,.04,.15c.12,.44,.26,.89,.41,1.32l.11,.34,13.23-11.51-.06-.16Zm-.64-1.8c-.06-.19-.11-.38-.17-.57l-.09-.3-13.61,8.15v.15c.06,.47,.11,.93,.18,1.39l.06,.37,13.68-9.02-.05-.17Zm-.46-1.72c-.04-.19-.09-.38-.13-.57l-.06-.29-13.22,5.63v.15c-.05,.47-.07,.93-.08,1.4v.39s13.53-6.51,13.53-6.51l-.04-.19Zm-.33-1.67c-.03-.2-.06-.39-.09-.59l-.04-.27-12.3,3.35-.03,.14c-.11,.45-.21,.91-.29,1.36l-.07,.4,12.86-4.17-.03-.2Zm-.21-1.65c-.02-.21-.04-.41-.05-.62l-.02-.26-10.98,1.43-.05,.13c-.17,.42-.34,.85-.49,1.28l-.14,.39,11.73-2.13-.02-.22Zm-.04-3.95l.02-.22-7.59-1.08-.09,.11c-.27,.34-.52,.68-.76,1.03l-.24,.34,8.62,.75v-.25c.02-.22,.03-.45,.05-.67Zm.18-1.68l.03-.21-5.79-1.65-.1,.1c-.29,.29-.57,.59-.84,.89l-.28,.31,6.87,1.53,.03-.27c.03-.24,.05-.47,.09-.71Zm.3-1.7l.04-.19-4.07-1.78-.11,.09c-.3,.24-.6,.5-.89,.75l-.3,.27,5.13,1.89,.05-.28c.04-.25,.09-.5,.15-.75Zm.44-1.73l.05-.18-2.49-1.53-.13,.08c-.31,.2-.61,.41-.91,.63l-.31,.23,3.5,1.86,.07-.3c.07-.27,.14-.53,.22-.79Zm.6-1.79l.06-.16-1.11-.91-.14,.07c-.31,.17-.62,.34-.93,.52l-.32,.19,2.03,1.46,.1-.31c.1-.29,.2-.57,.3-.86Zm.38-.95c.06-.14,.12-.29,.19-.43l.26-.58-.58,.26c-.15,.07-.29,.13-.44,.2l-.32,.15,.76,.71,.13-.32Zm-1.95,10.17c0-.22,0-.43,0-.65v-.24l-9.36-.06-.07,.12s-.01,.02-.02,.03c0,.01-.02,.03-.05,.09h0c-.2,.35-.39,.69-.57,1.04l-.19,.37,10.28-.48v-.24Zm6.16,15.65c.14,.16,.28,.31,.43,.47l.1,.1-5.89,17.81-.25-.13c-.35-.18-.69-.37-1.03-.57l-.17-.1,6.56-17.88,.27,.3Z" }),
@@ -7763,10 +7777,11 @@ function SelectScrollDownButton({
7763
7777
 
7764
7778
  // src/components/tokenVisuals.ts
7765
7779
  var VISUAL_BY_DEFAULT_SYMBOL = {
7766
- // ETH/USDnr glyphs sit on fixed brand-colored tiles, so they stay white
7780
+ // ETH/USDnr/USDC glyphs sit on fixed brand-colored tiles, so they stay white
7767
7781
  // regardless of the host's foreground override.
7768
7782
  ETH: { icon: "eth", iconClassName: "size-6 text-white", bgClassName: "bg-[#627EEA]" },
7769
7783
  USDnr: { icon: "usdnr", iconClassName: "size-6 text-white", bgClassName: "bg-[#7f52d0]" },
7784
+ USDC: { icon: "usdc", iconClassName: "size-6 text-white", bgClassName: "bg-[#2775CA]" },
7770
7785
  BLEND: { icon: "fluent", iconClassName: "size-4", bgClassName: "bg-[#FFFFFF]/10" }
7771
7786
  };
7772
7787
  var CHAIN_BADGE = {
@@ -7808,6 +7823,18 @@ function ChainBadge({
7808
7823
  }
7809
7824
  );
7810
7825
  }
7826
+ function Spinner({ className, ...props }) {
7827
+ return /* @__PURE__ */ jsx(
7828
+ Loader2Icon,
7829
+ {
7830
+ "data-slot": "spinner",
7831
+ role: "status",
7832
+ "aria-label": "Loading",
7833
+ className: cn("size-4 animate-spin", className),
7834
+ ...props
7835
+ }
7836
+ );
7837
+ }
7811
7838
 
7812
7839
  // src/bridge/historyRows.ts
7813
7840
  var INDEXER_STATUS = {
@@ -7831,6 +7858,22 @@ function rowFromIndexer(item) {
7831
7858
  decimals: item.token_decimals
7832
7859
  };
7833
7860
  }
7861
+ function rowFromSentDeposit(deposit) {
7862
+ return {
7863
+ id: `widget:${deposit.sentTxHash}`,
7864
+ source: "widget",
7865
+ sentAt: deposit.sentAt,
7866
+ status: "pending",
7867
+ direction: "l1_to_l2",
7868
+ sentTxHash: deposit.sentTxHash,
7869
+ tokenSymbol: deposit.tokenSymbol,
7870
+ amount: deposit.amount,
7871
+ decimals: deposit.decimals
7872
+ };
7873
+ }
7874
+ function rowInFlight(row) {
7875
+ return row.status === "pending" || row.status === "confirming";
7876
+ }
7834
7877
  function rowFromHyperlane(transfer, route, token) {
7835
7878
  return {
7836
7879
  id: `hyperlane:${transfer.msgId}`,
@@ -7880,8 +7923,9 @@ function HistoryRow({
7880
7923
  usd,
7881
7924
  onOpen
7882
7925
  }) {
7883
- STATUS_LABELS[row.status];
7926
+ const status = STATUS_LABELS[row.status];
7884
7927
  const amount = formatRowAmount(row);
7928
+ const inFlight = rowInFlight(row);
7885
7929
  return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
7886
7930
  "button",
7887
7931
  {
@@ -7891,8 +7935,16 @@ function HistoryRow({
7891
7935
  children: [
7892
7936
  /* @__PURE__ */ jsx(ActivityTokenTile, { tokenSymbol: row.tokenSymbol, badge: row.direction, surface: "row" }),
7893
7937
  /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
7894
- /* @__PURE__ */ jsx("span", { className: "flex items-center gap-1.5 text-sm font-medium leading-4", children: rowTitle(row) }),
7938
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-sm font-medium leading-4", children: [
7939
+ rowTitle(row),
7940
+ inFlight ? /* @__PURE__ */ jsx(Spinner, { className: "size-3 text-muted-foreground" }) : null
7941
+ ] }),
7895
7942
  /* @__PURE__ */ jsxs("span", { className: "truncate text-muted-foreground leading-4", children: [
7943
+ row.status !== "completed" ? /* @__PURE__ */ jsxs(Fragment, { children: [
7944
+ /* @__PURE__ */ jsx("span", { className: status.className, children: status.label }),
7945
+ " \xB7",
7946
+ " "
7947
+ ] }) : null,
7896
7948
  activityTimeFormat.format(new Date(row.sentAt)),
7897
7949
  " \xB7",
7898
7950
  " ",
@@ -7900,7 +7952,7 @@ function HistoryRow({
7900
7952
  ] })
7901
7953
  ] }),
7902
7954
  /* @__PURE__ */ jsxs("span", { className: "flex shrink-0 flex-col items-end gap-1", children: [
7903
- amount ? /* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-4", children: amount }) : null,
7955
+ amount ? /* @__PURE__ */ jsx("span", { className: `text-sm font-medium leading-4 ${inFlight ? "opacity-70" : ""}`, children: amount }) : null,
7904
7956
  amount && usd ? /* @__PURE__ */ jsx(
7905
7957
  "span",
7906
7958
  {
@@ -8539,13 +8591,15 @@ async function getHyperlaneTransfers({
8539
8591
  function useHyperlaneTransfers({
8540
8592
  address,
8541
8593
  route,
8542
- token
8594
+ token,
8595
+ refetchInterval = false
8543
8596
  }) {
8544
8597
  return useQuery({
8545
8598
  queryKey: ["fluent-bridge-hyperlane-history", route.source.id, route.destination.id, address],
8546
8599
  queryFn: ({ signal }) => getHyperlaneTransfers({ address, route, token, signal }),
8547
8600
  enabled: Boolean(address),
8548
- staleTime: 15e3
8601
+ staleTime: 15e3,
8602
+ refetchInterval
8549
8603
  });
8550
8604
  }
8551
8605
 
@@ -8610,20 +8664,41 @@ function isBridgeTokenAvailable(token) {
8610
8664
  }
8611
8665
 
8612
8666
  // src/bridge/useBridgeHistoryRows.ts
8667
+ var FLUENT_BRIDGE_HISTORY_POLL_MS = 1e4;
8613
8668
  function useBridgeHistoryRows({
8614
8669
  route,
8615
- network
8670
+ network,
8671
+ sent
8616
8672
  }) {
8617
8673
  const { address, isConnected } = useAccount();
8618
8674
  const wallet = isConnected ? address : void 0;
8619
- const history = useBridgeTxHistoryPages({ baseUrl: route.indexerUrl, address: wallet });
8675
+ const [poll, setPoll] = useState(false);
8676
+ const refetchInterval = poll ? FLUENT_BRIDGE_HISTORY_POLL_MS : false;
8677
+ const history = useBridgeTxHistoryPages({
8678
+ baseUrl: route.indexerUrl,
8679
+ address: wallet,
8680
+ refetchInterval
8681
+ });
8620
8682
  const hyperlaneToken = getBridgeTokens(network).find((t) => t.route === "fast-path");
8621
- const hyperlane = useHyperlaneTransfers({ address: wallet, route, token: hyperlaneToken });
8683
+ const hyperlane = useHyperlaneTransfers({
8684
+ address: wallet,
8685
+ route,
8686
+ token: hyperlaneToken,
8687
+ refetchInterval
8688
+ });
8622
8689
  const rows = useMemo(() => {
8623
8690
  const fromIndexer = (history.data?.pages ?? []).flatMap((page) => page.items.map(rowFromIndexer));
8624
8691
  const fromHyperlane = (hyperlane.data ?? []).map((t) => rowFromHyperlane(t, route, hyperlaneToken));
8625
- return sortRows([...fromIndexer, ...fromHyperlane]);
8626
- }, [history.data, hyperlane.data, hyperlaneToken, route]);
8692
+ const listed = new Set(
8693
+ [...fromIndexer, ...fromHyperlane].map((row) => row.sentTxHash.toLowerCase())
8694
+ );
8695
+ const fromWidget = wallet ? (sent ?? []).filter(
8696
+ (deposit) => deposit.sender.toLowerCase() === wallet.toLowerCase() && !listed.has(deposit.sentTxHash.toLowerCase())
8697
+ ).map(rowFromSentDeposit) : [];
8698
+ return sortRows([...fromIndexer, ...fromHyperlane, ...fromWidget]);
8699
+ }, [history.data, hyperlane.data, hyperlaneToken, route, sent, wallet]);
8700
+ const inFlight = rows.some(rowInFlight);
8701
+ useEffect(() => setPoll(inFlight), [inFlight]);
8627
8702
  return {
8628
8703
  address: wallet,
8629
8704
  rows,
@@ -8763,18 +8838,6 @@ function buildFluentTransferCall(params) {
8763
8838
  args: [to, amount]
8764
8839
  };
8765
8840
  }
8766
- function Spinner({ className, ...props }) {
8767
- return /* @__PURE__ */ jsx(
8768
- Loader2Icon,
8769
- {
8770
- "data-slot": "spinner",
8771
- role: "status",
8772
- "aria-label": "Loading",
8773
- className: cn("size-4 animate-spin", className),
8774
- ...props
8775
- }
8776
- );
8777
- }
8778
8841
  var dayFormat = new Intl.DateTimeFormat(void 0, { dateStyle: "medium" });
8779
8842
  function useActivityPrices(usdPrices, tokens) {
8780
8843
  return useMemo(() => {
@@ -8831,7 +8894,7 @@ function groupByDay(items) {
8831
8894
  }
8832
8895
  return groups;
8833
8896
  }
8834
- var LIVE_ITEM = /^(pending:|deposit-swap$)/;
8897
+ var LIVE_ITEM = /^(pending:|bridge:widget:|deposit-swap$)/;
8835
8898
  function DayGroups({ items }) {
8836
8899
  return /* @__PURE__ */ jsx(Fragment, { children: groupByDay(items).map((group) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2.5", children: [
8837
8900
  /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: dayFormat.format(group.day) }),
@@ -9221,7 +9284,7 @@ function ActivityWithBridge({
9221
9284
  network,
9222
9285
  ...props
9223
9286
  }) {
9224
- const bridge = useBridgeHistoryRows({ route, network });
9287
+ const bridge = useBridgeHistoryRows({ route, network, sent: props.sentDeposits });
9225
9288
  return /* @__PURE__ */ jsx(WalletMenuActivityList, { ...props, bridge });
9226
9289
  }
9227
9290
  function WalletMenuActivity({
@@ -9702,7 +9765,6 @@ function validateBridgeAmount({
9702
9765
  }
9703
9766
  var TOKEN_ICONS = {
9704
9767
  ETH: "eth",
9705
- BLEND: "blend",
9706
9768
  USDnr: "usdnr",
9707
9769
  USDC: "usdc"
9708
9770
  };
@@ -11629,6 +11691,7 @@ function WalletMenuActionCard({
11629
11691
  tokenListError = null,
11630
11692
  onSendToken,
11631
11693
  pendingTransfers,
11694
+ sentDeposits,
11632
11695
  depositSwap,
11633
11696
  onMintUsdnr,
11634
11697
  mintUsdnrBusy = false,
@@ -12246,6 +12309,7 @@ function WalletMenuActionCard({
12246
12309
  usdPrices: prices,
12247
12310
  tokens: displayTokens,
12248
12311
  depositSwap: depositSwap?.state,
12312
+ sentDeposits,
12249
12313
  onOpenDepositSwap: () => onTabChange(DEPOSIT_SWAP_TAB),
12250
12314
  onOpenBridgeRow: (selection) => {
12251
12315
  setActivity({ kind: "bridge", selection });
@@ -13649,6 +13713,7 @@ function BridgeForm({
13649
13713
  onSignIn,
13650
13714
  onOpenPortal,
13651
13715
  depositSwap,
13716
+ onDepositSent,
13652
13717
  onGoHome
13653
13718
  }) {
13654
13719
  const tokens = getBridgeTokens(network);
@@ -13660,7 +13725,18 @@ function BridgeForm({
13660
13725
  network,
13661
13726
  recipient,
13662
13727
  token,
13663
- onSubmitted: (deposit) => handOver.current?.(deposit) ?? false
13728
+ onSubmitted: (deposit) => {
13729
+ if (handOver.current?.(deposit)) return true;
13730
+ onDepositSent?.({
13731
+ sentTxHash: deposit.hash,
13732
+ sender: deposit.sender,
13733
+ tokenSymbol: bridge.deliveredToken.symbol,
13734
+ amount: deposit.delivered,
13735
+ decimals: bridge.deliveredToken.decimals,
13736
+ sentAt: (/* @__PURE__ */ new Date()).toISOString()
13737
+ });
13738
+ return false;
13739
+ }
13664
13740
  });
13665
13741
  const { form, state, deliveredToken } = bridge;
13666
13742
  const [receiveSymbol, setReceiveSymbol] = useState(void 0);
@@ -14033,6 +14109,7 @@ function BridgeScreen({
14033
14109
  onSignIn,
14034
14110
  track,
14035
14111
  depositSwap,
14112
+ onDepositSent,
14036
14113
  onGoHome
14037
14114
  }) {
14038
14115
  const resolvedConfig = useMemo(() => resolveFluentWidgetConfig(config), [config]);
@@ -14060,6 +14137,7 @@ function BridgeScreen({
14060
14137
  onSignIn,
14061
14138
  onOpenPortal: openPortal,
14062
14139
  depositSwap,
14140
+ onDepositSent,
14063
14141
  onGoHome
14064
14142
  }
14065
14143
  ) }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1 rounded-xl bg-foreground/5 px-4 py-8 text-center", children: [
@@ -16773,7 +16851,8 @@ function createTopLayerElevator({
16773
16851
  (dialog) => dialog !== topLayerHost && !dialog.hasAttribute("data-fluent-top-layer") && !topLayerHost.contains(dialog) && isModalDialog(dialog)
16774
16852
  );
16775
16853
  const hostHasOwnContent = () => Array.from(topLayerHost.children).some(
16776
- (child) => !elevated.has(child) && !child.hasAttribute("data-fluent-top-layer-anchor")
16854
+ (child) => !elevated.has(child) && !child.hasAttribute("data-fluent-top-layer-anchor") && // The toast layer moves in while the host is open; it is not an overlay.
16855
+ !child.hasAttribute("data-fluent-toast-layer")
16777
16856
  );
16778
16857
  const patchParent = (parent, node, marker) => {
16779
16858
  const parentWithMethods = parent;
@@ -20020,6 +20099,13 @@ function FluentWidgetContent({
20020
20099
  },
20021
20100
  [endTransfer]
20022
20101
  );
20102
+ const [sentDeposits, setSentDeposits] = useState([]);
20103
+ const addSentDeposit = useCallback((deposit) => {
20104
+ setSentDeposits((list) => [...list, deposit]);
20105
+ }, []);
20106
+ useEffect(() => {
20107
+ setSentDeposits([]);
20108
+ }, [fluentAccountAddress]);
20023
20109
  const sendToken = useTokenTransfer({
20024
20110
  widget: widgetApi,
20025
20111
  track,
@@ -20647,6 +20733,7 @@ function FluentWidgetContent({
20647
20733
  onPanelChange: setWalletMenuPanel,
20648
20734
  onSendToken: sendToken,
20649
20735
  pendingTransfers,
20736
+ sentDeposits,
20650
20737
  depositSwap,
20651
20738
  onMintUsdnr: mintUsdnr,
20652
20739
  mintUsdnrBusy: mintingUsdnr,
@@ -20664,6 +20751,7 @@ function FluentWidgetContent({
20664
20751
  onSignIn: signInWithFluent,
20665
20752
  track,
20666
20753
  depositSwap: bridgeDepositSwap,
20754
+ onDepositSent: addSentDeposit,
20667
20755
  onGoHome: () => setWalletMenuTab("home")
20668
20756
  }
20669
20757
  )