@rhinestone/deposit-modal 0.1.47 → 0.1.49

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.
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkLOOU3NCIcjs = require('./chunk-LOOU3NCI.cjs');
3
+ var _chunkKOYHFHYWcjs = require('./chunk-KOYHFHYW.cjs');
4
4
 
5
5
 
6
6
 
7
7
  var _chunkXLRQCIYDcjs = require('./chunk-XLRQCIYD.cjs');
8
- require('./chunk-LT3QKJI2.cjs');
8
+ require('./chunk-7HJ7IBRH.cjs');
9
9
  require('./chunk-NELAYNA3.cjs');
10
10
 
11
11
  // src/DepositModalReown.tsx
@@ -29,7 +29,7 @@ function DepositModalWithReown(props) {
29
29
  reown.disconnect();
30
30
  }, [reown.disconnect]);
31
31
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
32
- _chunkLOOU3NCIcjs.DepositModalInner,
32
+ _chunkKOYHFHYWcjs.DepositModalInner,
33
33
  {
34
34
  ...props,
35
35
  reownWallet: reownWithSolana,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  DepositModalInner
3
- } from "./chunk-7U5TNZZB.mjs";
3
+ } from "./chunk-QLLL6ARN.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
7
  } from "./chunk-JGB6XSYS.mjs";
8
- import "./chunk-QIK6ONMQ.mjs";
8
+ import "./chunk-FKNYONM2.mjs";
9
9
  import "./chunk-ZJQZEIHA.mjs";
10
10
 
11
11
  // src/DepositModalReown.tsx
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WithdrawModalInner
3
- } from "./chunk-O3VFAUSL.mjs";
3
+ } from "./chunk-HCZNF6CR.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
7
  } from "./chunk-JGB6XSYS.mjs";
8
- import "./chunk-QIK6ONMQ.mjs";
8
+ import "./chunk-FKNYONM2.mjs";
9
9
  import "./chunk-ZJQZEIHA.mjs";
10
10
 
11
11
  // src/WithdrawModalReown.tsx
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkMS2J6M5Ccjs = require('./chunk-MS2J6M5C.cjs');
3
+ var _chunkPW55TOFKcjs = require('./chunk-PW55TOFK.cjs');
4
4
 
5
5
 
6
6
 
7
7
  var _chunkXLRQCIYDcjs = require('./chunk-XLRQCIYD.cjs');
8
- require('./chunk-LT3QKJI2.cjs');
8
+ require('./chunk-7HJ7IBRH.cjs');
9
9
  require('./chunk-NELAYNA3.cjs');
10
10
 
11
11
  // src/WithdrawModalReown.tsx
@@ -20,7 +20,7 @@ function WithdrawModalWithReown(props) {
20
20
  reown.disconnect();
21
21
  }, [reown.disconnect]);
22
22
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
23
- _chunkMS2J6M5Ccjs.WithdrawModalInner,
23
+ _chunkPW55TOFKcjs.WithdrawModalInner,
24
24
  {
25
25
  ...props,
26
26
  reownWallet: reown,
@@ -1572,7 +1572,7 @@ function ProcessingStep({
1572
1572
  return;
1573
1573
  }
1574
1574
  processTimeoutRef.current = setTimeout(() => {
1575
- const message = "We couldn't confirm your transfer. Please contact support if funds do not arrive.";
1575
+ const message = "Transfer is taking longer than expected. Your funds are safe and our team has been notified.";
1576
1576
  debugLog(debug, "processing", "state:timeout", {
1577
1577
  txHash,
1578
1578
  timeoutMs: PROCESS_TIMEOUT_MS
@@ -1587,7 +1587,7 @@ function ProcessingStep({
1587
1587
  }
1588
1588
  };
1589
1589
  }, [debug, directTransfer, state.type, txHash, onError]);
1590
- const isError = state.type === "error" || state.type === "failed";
1590
+ const isDelayed = state.type === "error" || state.type === "failed";
1591
1591
  const isComplete = state.type === "complete";
1592
1592
  const isProcessing = state.type === "processing";
1593
1593
  const lastEvent = state.type === "processing" || state.type === "complete" || state.type === "failed" ? state.lastEvent : void 0;
@@ -1799,8 +1799,8 @@ function ProcessingStep({
1799
1799
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1800
1800
  "div",
1801
1801
  {
1802
- className: `rs-step-icon ${isError ? "rs-step-icon--error" : "rs-step-icon--accent"}`,
1803
- children: isError ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1802
+ className: `rs-step-icon ${isDelayed ? "rs-step-icon--warning" : "rs-step-icon--accent"}`,
1803
+ children: isDelayed ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1804
1804
  "svg",
1805
1805
  {
1806
1806
  viewBox: "0 0 24 24",
@@ -1812,32 +1812,19 @@ function ProcessingStep({
1812
1812
  {
1813
1813
  strokeLinecap: "round",
1814
1814
  strokeLinejoin: "round",
1815
- d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"
1815
+ d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"
1816
1816
  }
1817
1817
  )
1818
1818
  }
1819
1819
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, {})
1820
1820
  }
1821
1821
  ),
1822
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1823
- "div",
1824
- {
1825
- className: `rs-step-title ${isError ? "rs-step-title--error" : ""}`,
1826
- children: isError ? `${flowCapitalized} Failed` : `Bridging ${flowCapitalized}`
1827
- }
1828
- )
1822
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-title", children: isDelayed ? `${flowCapitalized} taking longer than expected` : `Bridging ${flowCapitalized}` })
1829
1823
  ] }),
1830
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1831
- "div",
1832
- {
1833
- className: `rs-step-description ${isError ? "rs-text-error" : "rs-text-secondary"}`,
1834
- children: [
1835
- state.type === "processing" && (_optionalChain([lastEvent, 'optionalAccess', _104 => _104.type]) === "deposit-received" ? "Transfer received. Preparing bridge..." : _optionalChain([lastEvent, 'optionalAccess', _105 => _105.type]) === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${_chunkNELAYNA3cjs.getChainName.call(void 0, targetChain)}.`),
1836
- state.type === "failed" && state.message,
1837
- state.type === "error" && state.message
1838
- ]
1839
- }
1840
- )
1824
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-description rs-text-secondary", children: [
1825
+ state.type === "processing" && (_optionalChain([lastEvent, 'optionalAccess', _104 => _104.type]) === "deposit-received" ? "Transfer received. Preparing bridge..." : _optionalChain([lastEvent, 'optionalAccess', _105 => _105.type]) === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${_chunkNELAYNA3cjs.getChainName.call(void 0, targetChain)}.`),
1826
+ (state.type === "failed" || state.type === "error") && "Your funds are safe. Our team has been notified and is working to complete your transfer."
1827
+ ] })
1841
1828
  ] }),
1842
1829
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-body rs-space-y-3", children: [
1843
1830
  isProcessing && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
@@ -1879,7 +1866,39 @@ function ProcessingStep({
1879
1866
  }
1880
1867
  )
1881
1868
  ] }),
1869
+ isDelayed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-alert rs-alert--info", children: [
1870
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1871
+ "svg",
1872
+ {
1873
+ className: "rs-alert-icon",
1874
+ viewBox: "0 0 24 24",
1875
+ fill: "none",
1876
+ stroke: "currentColor",
1877
+ strokeWidth: "2",
1878
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1879
+ "path",
1880
+ {
1881
+ strokeLinecap: "round",
1882
+ strokeLinejoin: "round",
1883
+ d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"
1884
+ }
1885
+ )
1886
+ }
1887
+ ),
1888
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-alert-text", children: "You can safely close this window. Your funds are secure and the transfer will be completed automatically." })
1889
+ ] }),
1882
1890
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-card", children: [
1891
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-card-row", children: [
1892
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-label", children: "Status" }),
1893
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1894
+ "span",
1895
+ {
1896
+ className: "rs-card-value",
1897
+ style: { color: isDelayed ? "var(--color-amber8, #e2a336)" : void 0 },
1898
+ children: isDelayed ? "Processing" : "In progress"
1899
+ }
1900
+ )
1901
+ ] }),
1883
1902
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-card-row", children: [
1884
1903
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-label", children: "Source" }),
1885
1904
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -1956,10 +1975,7 @@ function ProcessingStep({
1956
1975
  ] })
1957
1976
  ] })
1958
1977
  ] }),
1959
- isError && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-footer", style: { gap: 8, display: "flex" }, children: [
1960
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Close" }),
1961
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { onClick: onNewDeposit, fullWidth: true, children: "Try Again" })
1962
- ] }),
1978
+ isDelayed && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { onClick: onClose, fullWidth: true, children: "Close" }) }),
1963
1979
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PoweredBy, {})
1964
1980
  ] });
1965
1981
  }
@@ -1572,7 +1572,7 @@ function ProcessingStep({
1572
1572
  return;
1573
1573
  }
1574
1574
  processTimeoutRef.current = setTimeout(() => {
1575
- const message = "We couldn't confirm your transfer. Please contact support if funds do not arrive.";
1575
+ const message = "Transfer is taking longer than expected. Your funds are safe and our team has been notified.";
1576
1576
  debugLog(debug, "processing", "state:timeout", {
1577
1577
  txHash,
1578
1578
  timeoutMs: PROCESS_TIMEOUT_MS
@@ -1587,7 +1587,7 @@ function ProcessingStep({
1587
1587
  }
1588
1588
  };
1589
1589
  }, [debug, directTransfer, state.type, txHash, onError]);
1590
- const isError = state.type === "error" || state.type === "failed";
1590
+ const isDelayed = state.type === "error" || state.type === "failed";
1591
1591
  const isComplete = state.type === "complete";
1592
1592
  const isProcessing = state.type === "processing";
1593
1593
  const lastEvent = state.type === "processing" || state.type === "complete" || state.type === "failed" ? state.lastEvent : void 0;
@@ -1799,8 +1799,8 @@ function ProcessingStep({
1799
1799
  /* @__PURE__ */ jsx7(
1800
1800
  "div",
1801
1801
  {
1802
- className: `rs-step-icon ${isError ? "rs-step-icon--error" : "rs-step-icon--accent"}`,
1803
- children: isError ? /* @__PURE__ */ jsx7(
1802
+ className: `rs-step-icon ${isDelayed ? "rs-step-icon--warning" : "rs-step-icon--accent"}`,
1803
+ children: isDelayed ? /* @__PURE__ */ jsx7(
1804
1804
  "svg",
1805
1805
  {
1806
1806
  viewBox: "0 0 24 24",
@@ -1812,32 +1812,19 @@ function ProcessingStep({
1812
1812
  {
1813
1813
  strokeLinecap: "round",
1814
1814
  strokeLinejoin: "round",
1815
- d: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"
1815
+ d: "M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"
1816
1816
  }
1817
1817
  )
1818
1818
  }
1819
1819
  ) : /* @__PURE__ */ jsx7(Spinner, {})
1820
1820
  }
1821
1821
  ),
1822
- /* @__PURE__ */ jsx7(
1823
- "div",
1824
- {
1825
- className: `rs-step-title ${isError ? "rs-step-title--error" : ""}`,
1826
- children: isError ? `${flowCapitalized} Failed` : `Bridging ${flowCapitalized}`
1827
- }
1828
- )
1822
+ /* @__PURE__ */ jsx7("div", { className: "rs-step-title", children: isDelayed ? `${flowCapitalized} taking longer than expected` : `Bridging ${flowCapitalized}` })
1829
1823
  ] }),
1830
- /* @__PURE__ */ jsxs6(
1831
- "div",
1832
- {
1833
- className: `rs-step-description ${isError ? "rs-text-error" : "rs-text-secondary"}`,
1834
- children: [
1835
- state.type === "processing" && (lastEvent?.type === "deposit-received" ? "Transfer received. Preparing bridge..." : lastEvent?.type === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${getChainName(targetChain)}.`),
1836
- state.type === "failed" && state.message,
1837
- state.type === "error" && state.message
1838
- ]
1839
- }
1840
- )
1824
+ /* @__PURE__ */ jsxs6("div", { className: "rs-step-description rs-text-secondary", children: [
1825
+ state.type === "processing" && (lastEvent?.type === "deposit-received" ? "Transfer received. Preparing bridge..." : lastEvent?.type === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${getChainName(targetChain)}.`),
1826
+ (state.type === "failed" || state.type === "error") && "Your funds are safe. Our team has been notified and is working to complete your transfer."
1827
+ ] })
1841
1828
  ] }),
1842
1829
  /* @__PURE__ */ jsxs6("div", { className: "rs-step-body rs-space-y-3", children: [
1843
1830
  isProcessing && /* @__PURE__ */ jsxs6(Fragment, { children: [
@@ -1879,7 +1866,39 @@ function ProcessingStep({
1879
1866
  }
1880
1867
  )
1881
1868
  ] }),
1869
+ isDelayed && /* @__PURE__ */ jsxs6("div", { className: "rs-alert rs-alert--info", children: [
1870
+ /* @__PURE__ */ jsx7(
1871
+ "svg",
1872
+ {
1873
+ className: "rs-alert-icon",
1874
+ viewBox: "0 0 24 24",
1875
+ fill: "none",
1876
+ stroke: "currentColor",
1877
+ strokeWidth: "2",
1878
+ children: /* @__PURE__ */ jsx7(
1879
+ "path",
1880
+ {
1881
+ strokeLinecap: "round",
1882
+ strokeLinejoin: "round",
1883
+ d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"
1884
+ }
1885
+ )
1886
+ }
1887
+ ),
1888
+ /* @__PURE__ */ jsx7("p", { className: "rs-alert-text", children: "You can safely close this window. Your funds are secure and the transfer will be completed automatically." })
1889
+ ] }),
1882
1890
  /* @__PURE__ */ jsxs6("div", { className: "rs-card", children: [
1891
+ /* @__PURE__ */ jsxs6("div", { className: "rs-card-row", children: [
1892
+ /* @__PURE__ */ jsx7("span", { className: "rs-card-label", children: "Status" }),
1893
+ /* @__PURE__ */ jsx7(
1894
+ "span",
1895
+ {
1896
+ className: "rs-card-value",
1897
+ style: { color: isDelayed ? "var(--color-amber8, #e2a336)" : void 0 },
1898
+ children: isDelayed ? "Processing" : "In progress"
1899
+ }
1900
+ )
1901
+ ] }),
1883
1902
  /* @__PURE__ */ jsxs6("div", { className: "rs-card-row", children: [
1884
1903
  /* @__PURE__ */ jsx7("span", { className: "rs-card-label", children: "Source" }),
1885
1904
  /* @__PURE__ */ jsxs6(
@@ -1956,10 +1975,7 @@ function ProcessingStep({
1956
1975
  ] })
1957
1976
  ] })
1958
1977
  ] }),
1959
- isError && /* @__PURE__ */ jsxs6("div", { className: "rs-step-footer", style: { gap: 8, display: "flex" }, children: [
1960
- /* @__PURE__ */ jsx7(Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Close" }),
1961
- /* @__PURE__ */ jsx7(Button, { onClick: onNewDeposit, fullWidth: true, children: "Try Again" })
1962
- ] }),
1978
+ isDelayed && /* @__PURE__ */ jsx7("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx7(Button, { onClick: onClose, fullWidth: true, children: "Close" }) }),
1963
1979
  /* @__PURE__ */ jsx7(PoweredBy, {})
1964
1980
  ] });
1965
1981
  }
@@ -20,7 +20,7 @@ import {
20
20
  loadSessionOwnerFromStorage,
21
21
  saveSessionOwnerToStorage,
22
22
  toEvmCaip2
23
- } from "./chunk-QIK6ONMQ.mjs";
23
+ } from "./chunk-FKNYONM2.mjs";
24
24
  import {
25
25
  DEFAULT_BACKEND_URL,
26
26
  DEFAULT_SIGNER_ADDRESS,
@@ -1422,7 +1422,7 @@ function WithdrawFlow({
1422
1422
  // src/WithdrawModal.tsx
1423
1423
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1424
1424
  var ReownWithdrawInner = lazy(
1425
- () => import("./WithdrawModalReown-XOFREB4D.mjs").then((m) => ({
1425
+ () => import("./WithdrawModalReown-FODH7PY5.mjs").then((m) => ({
1426
1426
  default: m.WithdrawModalReown
1427
1427
  }))
1428
1428
  );