@rhinestone/deposit-modal 0.3.0-alpha.8 → 0.3.0-alpha.9

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.
@@ -1786,7 +1786,7 @@ function ConnectStep({
1786
1786
  const hasReownWallet = rows.some(
1787
1787
  (row) => row.kind === "external" || row.kind === "solana"
1788
1788
  );
1789
- const showDappImports = hasReownWallet && (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _62 => _62.length]), () => ( 0))) > 0;
1789
+ const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _62 => _62.length]), () => ( 0))) > 0;
1790
1790
  const extraChainCount = Math.max(0, _chunk7JIDIX27cjs.getSupportedChainIds.call(void 0, ).length - 3);
1791
1791
  const chainBadge2 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1792
1792
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
@@ -1819,7 +1819,6 @@ function ConnectStep({
1819
1819
  rows.map((row) => {
1820
1820
  const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
1821
1821
  const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? _nullishCoalesce(row.errorReason, () => ( "Couldn't prepare wallet \u2014 tap to retry")) : shorten(row.address);
1822
- const showInlineDisconnect = Boolean(onSelectTransferCrypto) && Boolean(onDisconnect) && row.state !== "loading";
1823
1822
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1824
1823
  ListRow,
1825
1824
  {
@@ -1828,8 +1827,7 @@ function ConnectStep({
1828
1827
  subtitle: subtitleText,
1829
1828
  onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _63 => _63(row.id)]),
1830
1829
  disabled: row.state === "loading",
1831
- trailing: renderRowTrailing(row.state),
1832
- action: showInlineDisconnect && onDisconnect ? { label: "Disconnect", onClick: onDisconnect } : void 0
1830
+ trailing: renderRowTrailing(row.state)
1833
1831
  },
1834
1832
  row.id
1835
1833
  );
@@ -1848,7 +1846,20 @@ function ConnectStep({
1848
1846
  }
1849
1847
  ),
1850
1848
  showDappImports && _optionalChain([dappImports, 'optionalAccess', _64 => _64.map, 'call', _65 => _65((row) => {
1851
- if (row.status === "loading") {
1849
+ if (!hasReownWallet) {
1850
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1851
+ ListRow,
1852
+ {
1853
+ leading: row.icon,
1854
+ title: row.label,
1855
+ subtitle: "Connect wallet to view balance",
1856
+ onClick: handleConnect,
1857
+ disabled: !handleConnect
1858
+ },
1859
+ row.id
1860
+ );
1861
+ }
1862
+ if (row.status === "loading" || row.status === "needs-connect") {
1852
1863
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1853
1864
  ListRow,
1854
1865
  {
@@ -1898,6 +1909,15 @@ function ConnectStep({
1898
1909
  })])
1899
1910
  ] })
1900
1911
  ] }),
1912
+ onDisconnect && hasReownWallet && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-tight-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1913
+ "button",
1914
+ {
1915
+ type: "button",
1916
+ className: "rs-connect-wallet-manage",
1917
+ onClick: onDisconnect,
1918
+ children: "Disconnect wallet"
1919
+ }
1920
+ ) }),
1901
1921
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PoweredBy, {})
1902
1922
  ] });
1903
1923
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isUnsupportedChainSwitchError
3
- } from "./chunk-5ZS4ZJPW.mjs";
3
+ } from "./chunk-TJG2AFPS.mjs";
4
4
  import {
5
5
  SUPPORTED_CHAINS,
6
6
  getChainName
@@ -1786,7 +1786,7 @@ function ConnectStep({
1786
1786
  const hasReownWallet = rows.some(
1787
1787
  (row) => row.kind === "external" || row.kind === "solana"
1788
1788
  );
1789
- const showDappImports = hasReownWallet && (dappImports?.length ?? 0) > 0;
1789
+ const showDappImports = (dappImports?.length ?? 0) > 0;
1790
1790
  const extraChainCount = Math.max(0, getSupportedChainIds().length - 3);
1791
1791
  const chainBadge2 = /* @__PURE__ */ jsxs6(Fragment2, { children: [
1792
1792
  /* @__PURE__ */ jsx8(ChainBadgeIcons, {}),
@@ -1819,7 +1819,6 @@ function ConnectStep({
1819
1819
  rows.map((row) => {
1820
1820
  const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
1821
1821
  const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? row.errorReason ?? "Couldn't prepare wallet \u2014 tap to retry" : shorten(row.address);
1822
- const showInlineDisconnect = Boolean(onSelectTransferCrypto) && Boolean(onDisconnect) && row.state !== "loading";
1823
1822
  return /* @__PURE__ */ jsx8(
1824
1823
  ListRow,
1825
1824
  {
@@ -1828,8 +1827,7 @@ function ConnectStep({
1828
1827
  subtitle: subtitleText,
1829
1828
  onClick: () => onConfirmWallet?.(row.id),
1830
1829
  disabled: row.state === "loading",
1831
- trailing: renderRowTrailing(row.state),
1832
- action: showInlineDisconnect && onDisconnect ? { label: "Disconnect", onClick: onDisconnect } : void 0
1830
+ trailing: renderRowTrailing(row.state)
1833
1831
  },
1834
1832
  row.id
1835
1833
  );
@@ -1848,7 +1846,20 @@ function ConnectStep({
1848
1846
  }
1849
1847
  ),
1850
1848
  showDappImports && dappImports?.map((row) => {
1851
- if (row.status === "loading") {
1849
+ if (!hasReownWallet) {
1850
+ return /* @__PURE__ */ jsx8(
1851
+ ListRow,
1852
+ {
1853
+ leading: row.icon,
1854
+ title: row.label,
1855
+ subtitle: "Connect wallet to view balance",
1856
+ onClick: handleConnect,
1857
+ disabled: !handleConnect
1858
+ },
1859
+ row.id
1860
+ );
1861
+ }
1862
+ if (row.status === "loading" || row.status === "needs-connect") {
1852
1863
  return /* @__PURE__ */ jsx8(
1853
1864
  ListRow,
1854
1865
  {
@@ -1898,6 +1909,15 @@ function ConnectStep({
1898
1909
  })
1899
1910
  ] })
1900
1911
  ] }),
1912
+ onDisconnect && hasReownWallet && /* @__PURE__ */ jsx8("div", { className: "rs-screen-tight-row", children: /* @__PURE__ */ jsx8(
1913
+ "button",
1914
+ {
1915
+ type: "button",
1916
+ className: "rs-connect-wallet-manage",
1917
+ onClick: onDisconnect,
1918
+ children: "Disconnect wallet"
1919
+ }
1920
+ ) }),
1901
1921
  /* @__PURE__ */ jsx8(PoweredBy, {})
1902
1922
  ] });
1903
1923
  }