@rhinestone/deposit-modal 0.1.48 → 0.1.50

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/README.md CHANGED
@@ -92,6 +92,7 @@ Notes:
92
92
  | `rhinestoneApiKey` | `string` | No | Optional SDK api key forwarded to `RhinestoneSDK` during smart-account setup |
93
93
  | `signerAddress` | `Address` | No | Session signer address |
94
94
  | `waitForFinalTx` | `boolean` | No | Wait for destination tx (default: true) |
95
+ | `enableSolana` | `boolean` | No | Enable Solana wallet and QR deposit flows (default: `true`) |
95
96
  | `onRequestConnect` | `() => void` | No | Called when wallet connection needed |
96
97
  | `connectButtonLabel` | `string` | No | Custom connect button label |
97
98
  | `theme` | `DepositModalTheme` | No | Theme customization |
@@ -196,6 +197,8 @@ Also supports `onReady`, `onConnected`, and `onError` (same as DepositModal).
196
197
 
197
198
  **UI Config**: `showLogo`, `showStepper`, `showBackButton`, `balanceTitle`, `maxDepositUsd`, `minDepositUsd`
198
199
 
200
+ Use `enableSolana={false}` to keep the deposit experience EVM-only even when `reownAppId` is provided.
201
+
199
202
  ## Utility Exports
200
203
 
201
204
  ```tsx
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DepositModalInner
3
- } from "./chunk-ZAQISJAP.mjs";
3
+ } from "./chunk-N5BRA3ZN.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
- } from "./chunk-JGB6XSYS.mjs";
7
+ } from "./chunk-UPA7N6GY.mjs";
8
8
  import "./chunk-FKNYONM2.mjs";
9
9
  import "./chunk-ZJQZEIHA.mjs";
10
10
 
@@ -14,13 +14,16 @@ import { useAppKitProvider } from "@reown/appkit/react";
14
14
  import { jsx } from "react/jsx-runtime";
15
15
  function DepositModalWithReown(props) {
16
16
  const reown = useReownWallet();
17
- const { walletProvider: solanaWalletProvider } = useAppKitProvider("solana");
17
+ const enableSolana = props.enableSolana ?? true;
18
+ const { walletProvider: solanaWalletProvider } = useAppKitProvider(
19
+ enableSolana ? "solana" : "eip155"
20
+ );
18
21
  const reownWithSolana = useMemo(
19
22
  () => ({
20
23
  ...reown,
21
- solanaProvider: reown.isSolana ? solanaWalletProvider : void 0
24
+ solanaProvider: enableSolana && reown.isSolana ? solanaWalletProvider : void 0
22
25
  }),
23
- [reown, solanaWalletProvider]
26
+ [enableSolana, reown, solanaWalletProvider]
24
27
  );
25
28
  const handleConnect = useCallback(() => {
26
29
  reown.openConnect();
@@ -39,7 +42,15 @@ function DepositModalWithReown(props) {
39
42
  );
40
43
  }
41
44
  function DepositModalReown(props) {
42
- return /* @__PURE__ */ jsx(ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ jsx(DepositModalWithReown, { ...props }) });
45
+ return /* @__PURE__ */ jsx(
46
+ ReownWalletProvider,
47
+ {
48
+ projectId: props.reownAppId,
49
+ theme: props.theme,
50
+ enableSolana: props.enableSolana,
51
+ children: /* @__PURE__ */ jsx(DepositModalWithReown, { ...props })
52
+ }
53
+ );
43
54
  }
44
55
  export {
45
56
  DepositModalReown
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkZK6VAHSBcjs = require('./chunk-ZK6VAHSB.cjs');
3
+ var _chunkHXNHL64Vcjs = require('./chunk-HXNHL64V.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkXLRQCIYDcjs = require('./chunk-XLRQCIYD.cjs');
7
+ var _chunkXAGXQV4Kcjs = require('./chunk-XAGXQV4K.cjs');
8
8
  require('./chunk-7HJ7IBRH.cjs');
9
9
  require('./chunk-NELAYNA3.cjs');
10
10
 
@@ -13,14 +13,17 @@ var _react = require('react');
13
13
  var _react3 = require('@reown/appkit/react');
14
14
  var _jsxruntime = require('react/jsx-runtime');
15
15
  function DepositModalWithReown(props) {
16
- const reown = _chunkXLRQCIYDcjs.useReownWallet.call(void 0, );
17
- const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0, "solana");
16
+ const reown = _chunkXAGXQV4Kcjs.useReownWallet.call(void 0, );
17
+ const enableSolana = _nullishCoalesce(props.enableSolana, () => ( true));
18
+ const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0,
19
+ enableSolana ? "solana" : "eip155"
20
+ );
18
21
  const reownWithSolana = _react.useMemo.call(void 0,
19
22
  () => ({
20
23
  ...reown,
21
- solanaProvider: reown.isSolana ? solanaWalletProvider : void 0
24
+ solanaProvider: enableSolana && reown.isSolana ? solanaWalletProvider : void 0
22
25
  }),
23
- [reown, solanaWalletProvider]
26
+ [enableSolana, reown, solanaWalletProvider]
24
27
  );
25
28
  const handleConnect = _react.useCallback.call(void 0, () => {
26
29
  reown.openConnect();
@@ -29,7 +32,7 @@ function DepositModalWithReown(props) {
29
32
  reown.disconnect();
30
33
  }, [reown.disconnect]);
31
34
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
32
- _chunkZK6VAHSBcjs.DepositModalInner,
35
+ _chunkHXNHL64Vcjs.DepositModalInner,
33
36
  {
34
37
  ...props,
35
38
  reownWallet: reownWithSolana,
@@ -39,7 +42,15 @@ function DepositModalWithReown(props) {
39
42
  );
40
43
  }
41
44
  function DepositModalReown(props) {
42
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXLRQCIYDcjs.ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositModalWithReown, { ...props }) });
45
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
46
+ _chunkXAGXQV4Kcjs.ReownWalletProvider,
47
+ {
48
+ projectId: props.reownAppId,
49
+ theme: props.theme,
50
+ enableSolana: props.enableSolana,
51
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositModalWithReown, { ...props })
52
+ }
53
+ );
43
54
  }
44
55
 
45
56
 
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  WithdrawModalInner
3
- } from "./chunk-HCZNF6CR.mjs";
3
+ } from "./chunk-GZIGVCI2.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
- } from "./chunk-JGB6XSYS.mjs";
7
+ } from "./chunk-UPA7N6GY.mjs";
8
8
  import "./chunk-FKNYONM2.mjs";
9
9
  import "./chunk-ZJQZEIHA.mjs";
10
10
 
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkPW55TOFKcjs = require('./chunk-PW55TOFK.cjs');
3
+ var _chunkCTZVI5NRcjs = require('./chunk-CTZVI5NR.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkXLRQCIYDcjs = require('./chunk-XLRQCIYD.cjs');
7
+ var _chunkXAGXQV4Kcjs = require('./chunk-XAGXQV4K.cjs');
8
8
  require('./chunk-7HJ7IBRH.cjs');
9
9
  require('./chunk-NELAYNA3.cjs');
10
10
 
@@ -12,7 +12,7 @@ require('./chunk-NELAYNA3.cjs');
12
12
  var _react = require('react');
13
13
  var _jsxruntime = require('react/jsx-runtime');
14
14
  function WithdrawModalWithReown(props) {
15
- const reown = _chunkXLRQCIYDcjs.useReownWallet.call(void 0, );
15
+ const reown = _chunkXAGXQV4Kcjs.useReownWallet.call(void 0, );
16
16
  const handleConnect = _react.useCallback.call(void 0, () => {
17
17
  reown.openConnect();
18
18
  }, [reown.openConnect]);
@@ -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
- _chunkPW55TOFKcjs.WithdrawModalInner,
23
+ _chunkCTZVI5NRcjs.WithdrawModalInner,
24
24
  {
25
25
  ...props,
26
26
  reownWallet: reown,
@@ -30,7 +30,7 @@ function WithdrawModalWithReown(props) {
30
30
  );
31
31
  }
32
32
  function WithdrawModalReown(props) {
33
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXLRQCIYDcjs.ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawModalWithReown, { ...props }) });
33
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXAGXQV4Kcjs.ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawModalWithReown, { ...props }) });
34
34
  }
35
35
 
36
36
 
@@ -1422,7 +1422,7 @@ function WithdrawFlow({
1422
1422
  // src/WithdrawModal.tsx
1423
1423
 
1424
1424
  var ReownWithdrawInner = _react.lazy.call(void 0,
1425
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-ZSR3RP44.cjs"))).then((m) => ({
1425
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-JIKBNJU7.cjs"))).then((m) => ({
1426
1426
  default: m.WithdrawModalReown
1427
1427
  }))
1428
1428
  );
@@ -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-FODH7PY5.mjs").then((m) => ({
1425
+ () => import("./WithdrawModalReown-AHHM3VTB.mjs").then((m) => ({
1426
1426
  default: m.WithdrawModalReown
1427
1427
  }))
1428
1428
  );