@rhinestone/deposit-modal 0.0.0-dev-20260922141536 → 0.0.0-dev-20260924142825

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.
Files changed (52) hide show
  1. package/README.md +9 -10
  2. package/dist/{BankOnrampStep-UUEEXVC4.cjs → BankOnrampStep-3H6WEUAY.cjs} +61 -70
  3. package/dist/{BankOnrampStep-JE6A7M3S.mjs → BankOnrampStep-CHFM4YTZ.mjs} +58 -67
  4. package/dist/{DepositModalReown-WHHCPHXQ.cjs → DepositModalReown-4OXJ7DB3.cjs} +16 -16
  5. package/dist/{DepositModalReown-KJDMI4OG.mjs → DepositModalReown-XVY6S2XV.mjs} +3 -3
  6. package/dist/{WithdrawModal-GDNVB7V2.mjs → WithdrawModal-EQHK5VKE.mjs} +3 -3
  7. package/dist/WithdrawModal-W5NJ2LOL.cjs +12 -0
  8. package/dist/{chunk-XULBAFR6.mjs → chunk-4VIXW4BM.mjs} +1 -1
  9. package/dist/{chunk-7AQT3LM2.cjs → chunk-5N7KSGMC.cjs} +54 -54
  10. package/dist/{chunk-YODWHUQR.cjs → chunk-A76ONQB3.cjs} +2 -2
  11. package/dist/{chunk-NSLF23LA.mjs → chunk-BAYB4KSR.mjs} +1 -1
  12. package/dist/{chunk-ZO3VFQAA.cjs → chunk-GNDDR54D.cjs} +1 -1
  13. package/dist/{chunk-74E3BIML.mjs → chunk-IKI2K2XI.mjs} +1 -1
  14. package/dist/{chunk-4JBA3JIS.mjs → chunk-INJNVBZC.mjs} +1 -1
  15. package/dist/{chunk-6LFSKMRO.cjs → chunk-J3OEJXKH.cjs} +2 -2
  16. package/dist/{chunk-WDK4BIQL.mjs → chunk-J5J3N66V.mjs} +1 -1
  17. package/dist/{chunk-KTJQCK6W.cjs → chunk-OFLBB6RM.cjs} +252 -243
  18. package/dist/{chunk-CPDJBIUW.mjs → chunk-QAH3GMQF.mjs} +38 -29
  19. package/dist/{chunk-K47XA224.cjs → chunk-UZ66Q3RQ.cjs} +33 -33
  20. package/dist/{chunk-6FYGKPNA.cjs → chunk-WBMSIBLO.cjs} +3 -3
  21. package/dist/{chunk-N73JOITO.mjs → chunk-ZTHR2CBK.mjs} +1 -1
  22. package/dist/compliance.cjs +4 -4
  23. package/dist/compliance.mjs +3 -3
  24. package/dist/constants.cjs +2 -2
  25. package/dist/constants.d.cts +1 -1
  26. package/dist/constants.d.ts +1 -1
  27. package/dist/constants.mjs +1 -1
  28. package/dist/deposit.cjs +4 -4
  29. package/dist/deposit.d.cts +2 -2
  30. package/dist/deposit.d.ts +2 -2
  31. package/dist/deposit.mjs +3 -3
  32. package/dist/embed.cjs +14 -14
  33. package/dist/embed.d.cts +1 -1
  34. package/dist/embed.d.ts +1 -1
  35. package/dist/embed.mjs +4 -4
  36. package/dist/index.cjs +5 -5
  37. package/dist/index.d.cts +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.mjs +4 -4
  40. package/dist/offramp.cjs +4 -4
  41. package/dist/offramp.mjs +2 -2
  42. package/dist/onramp.cjs +4 -4
  43. package/dist/onramp.mjs +3 -3
  44. package/dist/styles.css +20 -3
  45. package/dist/{types-DBbMympO.d.ts → types-C5ji17hM.d.ts} +2 -2
  46. package/dist/{types-D3EoU6Ux.d.cts → types-CsDcpr8t.d.cts} +2 -2
  47. package/dist/withdraw.cjs +4 -4
  48. package/dist/withdraw.d.cts +2 -2
  49. package/dist/withdraw.d.ts +2 -2
  50. package/dist/withdraw.mjs +3 -3
  51. package/package.json +4 -3
  52. package/dist/WithdrawModal-PHEIBQPL.cjs +0 -12
package/README.md CHANGED
@@ -310,25 +310,24 @@ frame-src https://widget.swapped.com https://sandbox.swapped.com https://connect
310
310
 
311
311
  ### Bank transfer accounts (Noah)
312
312
 
313
- > **Preview.** One rough edge remains, and it is easy to misread as a bug in
314
- > your integration: when hosted onboarding finishes, the provider redirects the
315
- > frame to a confirmation page that does not exist yet, so the customer briefly
316
- > sees a 404 inside the modal. Nothing is lost — the modal reads the outcome
317
- > from the compliance status, not from the frame, so verification still
318
- > completes and the flow continues.
319
- >
320
- > Your proxy must forward `POST /compliance/verification` on the customer
313
+ > **Preview.** Your proxy must forward `POST /compliance/verification` on the customer
321
314
  > bearer; deploy it before shipping a modal that calls it, or first-time
322
315
  > verification 404s at the proxy.
323
316
  >
324
317
  > The prop is opt-in and inert unless you pass it. Treat it as unstable until
325
318
  > this note is removed.
326
319
 
327
- Pass `bankOnramp` to replace only the Bank transfer row with reusable USD/EUR
328
- account details. Card and Apple Pay continue through Swapped. A customer who has
320
+ Pass `bankOnramp` to use reusable USD/EUR account details when Noah is provisioned
321
+ for your organization. Integrator KYB happens directly with Noah; Rhinestone
322
+ enables provisioning after Noah confirms it. Card and Apple Pay continue through Swapped. A customer who has
329
323
  not been verified is taken through hosted verification first; an existing active
330
324
  account is resumed; otherwise the selected currency is configured once.
331
325
 
326
+ The modal checks `GET /onramp/noah/options` before customer verification. A 404
327
+ (provisioning disabled or an older proxy) routes bank transfer through Swapped.
328
+ A successful response keeps Noah exclusive, even when no currencies are available.
329
+ Authentication and service errors show a retry instead of switching providers.
330
+
332
331
  Payment status is shown under the bank details and polls while the account is on
333
332
  screen, so a customer who transferred earlier sees where their money is on
334
333
  reopening. `delivered` means the crypto has been confirmed on chain — not merely
@@ -6,14 +6,16 @@
6
6
  var _chunkG264OM23cjs = require('./chunk-G264OM23.cjs');
7
7
 
8
8
 
9
- var _chunkYODWHUQRcjs = require('./chunk-YODWHUQR.cjs');
9
+ var _chunkA76ONQB3cjs = require('./chunk-A76ONQB3.cjs');
10
10
  require('./chunk-ADEWTBSN.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunk6FYGKPNAcjs = require('./chunk-6FYGKPNA.cjs');
15
- require('./chunk-6LFSKMRO.cjs');
16
- require('./chunk-ZO3VFQAA.cjs');
14
+ var _chunkWBMSIBLOcjs = require('./chunk-WBMSIBLO.cjs');
15
+
16
+
17
+ var _chunkJ3OEJXKHcjs = require('./chunk-J3OEJXKH.cjs');
18
+ require('./chunk-GNDDR54D.cjs');
17
19
 
18
20
  // src/components/steps/BankOnrampStep.tsx
19
21
  var _react = require('react');
@@ -135,12 +137,29 @@ var PAYMENT_POLL_MS = 15e3;
135
137
  var VERIFICATION_POLL_MS = 5e3;
136
138
  var MAX_TIMEOUT_MS = 2147483647;
137
139
  function BankOnrampStep({
140
+ unavailableFallback,
141
+ ...props
142
+ }) {
143
+ const [unavailable, setUnavailable] = _react.useState.call(void 0, false);
144
+ const handleUnavailable = _react.useCallback.call(void 0, () => setUnavailable(true), []);
145
+ if (unavailable) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: unavailableFallback });
146
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
147
+ NoahOnrampStep,
148
+ {
149
+ ...props,
150
+ onUnavailable: unavailableFallback ? handleUnavailable : void 0
151
+ }
152
+ );
153
+ }
154
+ function NoahOnrampStep({
138
155
  backendUrl,
139
156
  smartAccount,
140
157
  bankOnramp,
141
158
  onGoBack,
159
+ onInternalBack,
142
160
  onError,
143
- openExternally
161
+ openExternally,
162
+ onUnavailable
144
163
  }) {
145
164
  const getSessionRef = _chunkG264OM23cjs.useLatestRef.call(void 0, bankOnramp.getSession);
146
165
  const sessionOptions = _react.useMemo.call(void 0,
@@ -151,7 +170,7 @@ function BankOnrampStep({
151
170
  [backendUrl, getSessionRef, smartAccount]
152
171
  );
153
172
  const service = _react.useMemo.call(void 0,
154
- () => _chunkYODWHUQRcjs.createOnrampService.call(void 0, sessionOptions),
173
+ () => _chunkA76ONQB3cjs.createOnrampService.call(void 0, sessionOptions),
155
174
  [sessionOptions]
156
175
  );
157
176
  const [options, setOptions] = _react.useState.call(void 0, []);
@@ -172,10 +191,10 @@ function BankOnrampStep({
172
191
  []
173
192
  );
174
193
  const ensureVerified = _react.useCallback.call(void 0, async () => {
175
- const current = await _chunk6FYGKPNAcjs.getComplianceStatus.call(void 0, sessionOptions);
194
+ const current = await _chunkWBMSIBLOcjs.getComplianceStatus.call(void 0, sessionOptions);
176
195
  if (current.status === "approved") return "approved";
177
196
  if (current.status === "declined") return "declined";
178
- const session = await _chunk6FYGKPNAcjs.startComplianceVerification.call(void 0, sessionOptions, {
197
+ const session = await _chunkWBMSIBLOcjs.startComplianceVerification.call(void 0, sessionOptions, {
179
198
  // Verification is per fiat currency. Without an explicit choice the US
180
199
  // dollar journey is the one every configured country can complete.
181
200
  currency: _nullishCoalesce(bankOnramp.currency, () => ( "USD"))
@@ -199,6 +218,18 @@ function BankOnrampStep({
199
218
  setLoading(true);
200
219
  setError(null);
201
220
  try {
221
+ const available = await service.getOptions({
222
+ country: bankOnramp.country,
223
+ paymentMethod: "bank_transfer",
224
+ ...bankOnramp.currency ? { currency: bankOnramp.currency } : {}
225
+ }).catch((error2) => {
226
+ if (error2 instanceof _chunkJ3OEJXKHcjs.ScopedRequestError && error2.status === 404 && onUnavailable) {
227
+ if (isCurrentRequest(generation)) onUnavailable();
228
+ return null;
229
+ }
230
+ throw error2;
231
+ });
232
+ if (!available || !isCurrentRequest(generation)) return;
202
233
  const verification = await ensureVerified();
203
234
  if (!isCurrentRequest(generation)) return;
204
235
  if (verification !== "approved") {
@@ -207,15 +238,7 @@ function BankOnrampStep({
207
238
  }
208
239
  setVerifying(null);
209
240
  setExternalOpened(false);
210
- const intent = {
211
- country: bankOnramp.country,
212
- paymentMethod: "bank_transfer",
213
- ...bankOnramp.currency ? { currency: bankOnramp.currency } : {}
214
- };
215
- const [available, existing] = await Promise.all([
216
- service.getOptions(intent),
217
- service.listAccounts()
218
- ]);
241
+ const existing = await service.listAccounts();
219
242
  if (!isCurrentRequest(generation)) return;
220
243
  setOptions(available.items);
221
244
  setAccounts(existing.items);
@@ -232,6 +255,7 @@ function BankOnrampStep({
232
255
  ensureVerified,
233
256
  isCurrentRequest,
234
257
  onError,
258
+ onUnavailable,
235
259
  service
236
260
  ]);
237
261
  _react.useEffect.call(void 0, () => {
@@ -322,7 +346,13 @@ function BankOnrampStep({
322
346
  setHostedUrl(null);
323
347
  setExternalOpened(false);
324
348
  setError(null);
349
+ setLoading(false);
325
350
  }, []);
351
+ _react.useEffect.call(void 0, () => {
352
+ if (!onInternalBack) return;
353
+ onInternalBack(selectedAccount ? backToCurrencies : null);
354
+ return () => onInternalBack(null);
355
+ }, [backToCurrencies, onInternalBack, selectedAccount]);
326
356
  _react.useEffect.call(void 0, () => {
327
357
  if (verifying !== "action_required" || !hostedUrl) return;
328
358
  const remaining = hostedSessionRemainingMs(
@@ -339,7 +369,7 @@ function BankOnrampStep({
339
369
  const timer = setInterval(() => {
340
370
  void (async () => {
341
371
  try {
342
- const status = await _chunk6FYGKPNAcjs.getComplianceStatus.call(void 0, sessionOptions);
372
+ const status = await _chunkWBMSIBLOcjs.getComplianceStatus.call(void 0, sessionOptions);
343
373
  if (!active) return;
344
374
  if (status.status === "approved") {
345
375
  setHostedUrl(null);
@@ -406,8 +436,9 @@ function BankOnrampStep({
406
436
  ]
407
437
  }
408
438
  ) : null;
439
+ const hostedFrameMounted = Boolean(hostedUrl) && !verificationExpired;
409
440
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen rs-bank-onramp", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
410
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
441
+ !hostedFrameMounted && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
411
442
  _chunkG264OM23cjs.BodyHeader,
412
443
  {
413
444
  icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.BankIcon, {}),
@@ -483,26 +514,15 @@ function BankOnrampStep({
483
514
  !loading && !error && verifying === "action_required" && verificationExpired && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", "aria-live": "polite", children: [
484
515
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: "Verification expired" }),
485
516
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "That verification session timed out. Start a new one to pick up where you left off." }),
486
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
487
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
488
- "button",
489
- {
490
- type: "button",
491
- className: "rs-button rs-button--primary",
492
- onClick: restartVerification,
493
- children: "Start again"
494
- }
495
- ),
496
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
497
- "button",
498
- {
499
- type: "button",
500
- className: "rs-button rs-button--default",
501
- onClick: leaveStep,
502
- children: "Back"
503
- }
504
- )
505
- ] })
517
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-button-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
518
+ "button",
519
+ {
520
+ type: "button",
521
+ className: "rs-button rs-button--primary",
522
+ onClick: restartVerification,
523
+ children: "Start again"
524
+ }
525
+ ) })
506
526
  ] }),
507
527
  !loading && !error && verifying === "action_required" && !verificationExpired && hostedUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-bank-onramp-hosted", children: [
508
528
  !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-bank-onramp-frame-loading", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.Spinner, {}) }),
@@ -516,16 +536,7 @@ function BankOnrampStep({
516
536
  allow: "camera; microphone; clipboard-write",
517
537
  onLoad: () => setIframeLoaded(true)
518
538
  }
519
- ),
520
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-button-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
521
- "button",
522
- {
523
- type: "button",
524
- className: "rs-button rs-button--default",
525
- onClick: leaveStep,
526
- children: "Back"
527
- }
528
- ) })
539
+ )
529
540
  ] }),
530
541
  !loading && !error && !verifying && !selectedAccount && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list", children: [
531
542
  options.map((option) => {
@@ -579,27 +590,7 @@ function BankOnrampStep({
579
590
  onLoad: () => setIframeLoaded(true)
580
591
  }
581
592
  ),
582
- paymentStatus,
583
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
584
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
585
- "button",
586
- {
587
- type: "button",
588
- className: "rs-button rs-button--default",
589
- onClick: retry,
590
- children: "Retry"
591
- }
592
- ),
593
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
594
- "button",
595
- {
596
- type: "button",
597
- className: "rs-button rs-button--default",
598
- onClick: backToCurrencies,
599
- children: "Back"
600
- }
601
- )
602
- ] })
593
+ paymentStatus
603
594
  ] }),
604
595
  !loading && !error && !verifying && externalOpened && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", "aria-live": "polite", children: [
605
596
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: "Bank details opened" }),
@@ -6,14 +6,16 @@ import {
6
6
  } from "./chunk-YY4ZOAH5.mjs";
7
7
  import {
8
8
  createOnrampService
9
- } from "./chunk-N73JOITO.mjs";
9
+ } from "./chunk-ZTHR2CBK.mjs";
10
10
  import "./chunk-PP4QE32S.mjs";
11
11
  import {
12
12
  getComplianceStatus,
13
13
  startComplianceVerification
14
- } from "./chunk-4JBA3JIS.mjs";
15
- import "./chunk-74E3BIML.mjs";
16
- import "./chunk-XULBAFR6.mjs";
14
+ } from "./chunk-INJNVBZC.mjs";
15
+ import {
16
+ ScopedRequestError
17
+ } from "./chunk-IKI2K2XI.mjs";
18
+ import "./chunk-4VIXW4BM.mjs";
17
19
 
18
20
  // src/components/steps/BankOnrampStep.tsx
19
21
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -128,19 +130,36 @@ function hostedSessionRemainingMs(expiresAt, now = Date.now()) {
128
130
  }
129
131
 
130
132
  // src/components/steps/BankOnrampStep.tsx
131
- import { jsx, jsxs } from "react/jsx-runtime";
133
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
132
134
  var SAFE_ERROR = "Bank details are unavailable. Try again.";
133
135
  var OPTIONS_ERROR = "Bank transfer options are unavailable. Try again.";
134
136
  var PAYMENT_POLL_MS = 15e3;
135
137
  var VERIFICATION_POLL_MS = 5e3;
136
138
  var MAX_TIMEOUT_MS = 2147483647;
137
139
  function BankOnrampStep({
140
+ unavailableFallback,
141
+ ...props
142
+ }) {
143
+ const [unavailable, setUnavailable] = useState(false);
144
+ const handleUnavailable = useCallback(() => setUnavailable(true), []);
145
+ if (unavailable) return /* @__PURE__ */ jsx(Fragment, { children: unavailableFallback });
146
+ return /* @__PURE__ */ jsx(
147
+ NoahOnrampStep,
148
+ {
149
+ ...props,
150
+ onUnavailable: unavailableFallback ? handleUnavailable : void 0
151
+ }
152
+ );
153
+ }
154
+ function NoahOnrampStep({
138
155
  backendUrl,
139
156
  smartAccount,
140
157
  bankOnramp,
141
158
  onGoBack,
159
+ onInternalBack,
142
160
  onError,
143
- openExternally
161
+ openExternally,
162
+ onUnavailable
144
163
  }) {
145
164
  const getSessionRef = useLatestRef(bankOnramp.getSession);
146
165
  const sessionOptions = useMemo(
@@ -199,6 +218,18 @@ function BankOnrampStep({
199
218
  setLoading(true);
200
219
  setError(null);
201
220
  try {
221
+ const available = await service.getOptions({
222
+ country: bankOnramp.country,
223
+ paymentMethod: "bank_transfer",
224
+ ...bankOnramp.currency ? { currency: bankOnramp.currency } : {}
225
+ }).catch((error2) => {
226
+ if (error2 instanceof ScopedRequestError && error2.status === 404 && onUnavailable) {
227
+ if (isCurrentRequest(generation)) onUnavailable();
228
+ return null;
229
+ }
230
+ throw error2;
231
+ });
232
+ if (!available || !isCurrentRequest(generation)) return;
202
233
  const verification = await ensureVerified();
203
234
  if (!isCurrentRequest(generation)) return;
204
235
  if (verification !== "approved") {
@@ -207,15 +238,7 @@ function BankOnrampStep({
207
238
  }
208
239
  setVerifying(null);
209
240
  setExternalOpened(false);
210
- const intent = {
211
- country: bankOnramp.country,
212
- paymentMethod: "bank_transfer",
213
- ...bankOnramp.currency ? { currency: bankOnramp.currency } : {}
214
- };
215
- const [available, existing] = await Promise.all([
216
- service.getOptions(intent),
217
- service.listAccounts()
218
- ]);
241
+ const existing = await service.listAccounts();
219
242
  if (!isCurrentRequest(generation)) return;
220
243
  setOptions(available.items);
221
244
  setAccounts(existing.items);
@@ -232,6 +255,7 @@ function BankOnrampStep({
232
255
  ensureVerified,
233
256
  isCurrentRequest,
234
257
  onError,
258
+ onUnavailable,
235
259
  service
236
260
  ]);
237
261
  useEffect(() => {
@@ -322,7 +346,13 @@ function BankOnrampStep({
322
346
  setHostedUrl(null);
323
347
  setExternalOpened(false);
324
348
  setError(null);
349
+ setLoading(false);
325
350
  }, []);
351
+ useEffect(() => {
352
+ if (!onInternalBack) return;
353
+ onInternalBack(selectedAccount ? backToCurrencies : null);
354
+ return () => onInternalBack(null);
355
+ }, [backToCurrencies, onInternalBack, selectedAccount]);
326
356
  useEffect(() => {
327
357
  if (verifying !== "action_required" || !hostedUrl) return;
328
358
  const remaining = hostedSessionRemainingMs(
@@ -406,8 +436,9 @@ function BankOnrampStep({
406
436
  ]
407
437
  }
408
438
  ) : null;
439
+ const hostedFrameMounted = Boolean(hostedUrl) && !verificationExpired;
409
440
  return /* @__PURE__ */ jsx("div", { className: "rs-screen rs-bank-onramp", children: /* @__PURE__ */ jsxs("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
410
- /* @__PURE__ */ jsx(
441
+ !hostedFrameMounted && /* @__PURE__ */ jsx(
411
442
  BodyHeader,
412
443
  {
413
444
  icon: /* @__PURE__ */ jsx(BankIcon, {}),
@@ -483,26 +514,15 @@ function BankOnrampStep({
483
514
  !loading && !error && verifying === "action_required" && verificationExpired && /* @__PURE__ */ jsxs("div", { className: "rs-loading-state", "aria-live": "polite", children: [
484
515
  /* @__PURE__ */ jsx("div", { className: "rs-loading-title", children: "Verification expired" }),
485
516
  /* @__PURE__ */ jsx("div", { className: "rs-loading-subtitle", children: "That verification session timed out. Start a new one to pick up where you left off." }),
486
- /* @__PURE__ */ jsxs("div", { className: "rs-screen-button-row", children: [
487
- /* @__PURE__ */ jsx(
488
- "button",
489
- {
490
- type: "button",
491
- className: "rs-button rs-button--primary",
492
- onClick: restartVerification,
493
- children: "Start again"
494
- }
495
- ),
496
- /* @__PURE__ */ jsx(
497
- "button",
498
- {
499
- type: "button",
500
- className: "rs-button rs-button--default",
501
- onClick: leaveStep,
502
- children: "Back"
503
- }
504
- )
505
- ] })
517
+ /* @__PURE__ */ jsx("div", { className: "rs-screen-button-row", children: /* @__PURE__ */ jsx(
518
+ "button",
519
+ {
520
+ type: "button",
521
+ className: "rs-button rs-button--primary",
522
+ onClick: restartVerification,
523
+ children: "Start again"
524
+ }
525
+ ) })
506
526
  ] }),
507
527
  !loading && !error && verifying === "action_required" && !verificationExpired && hostedUrl && /* @__PURE__ */ jsxs("div", { className: "rs-bank-onramp-hosted", children: [
508
528
  !iframeLoaded && /* @__PURE__ */ jsx("div", { className: "rs-bank-onramp-frame-loading", "aria-live": "polite", children: /* @__PURE__ */ jsx(Spinner, {}) }),
@@ -516,16 +536,7 @@ function BankOnrampStep({
516
536
  allow: "camera; microphone; clipboard-write",
517
537
  onLoad: () => setIframeLoaded(true)
518
538
  }
519
- ),
520
- /* @__PURE__ */ jsx("div", { className: "rs-screen-button-row", children: /* @__PURE__ */ jsx(
521
- "button",
522
- {
523
- type: "button",
524
- className: "rs-button rs-button--default",
525
- onClick: leaveStep,
526
- children: "Back"
527
- }
528
- ) })
539
+ )
529
540
  ] }),
530
541
  !loading && !error && !verifying && !selectedAccount && /* @__PURE__ */ jsxs("div", { className: "rs-list", children: [
531
542
  options.map((option) => {
@@ -579,27 +590,7 @@ function BankOnrampStep({
579
590
  onLoad: () => setIframeLoaded(true)
580
591
  }
581
592
  ),
582
- paymentStatus,
583
- /* @__PURE__ */ jsxs("div", { className: "rs-screen-button-row", children: [
584
- /* @__PURE__ */ jsx(
585
- "button",
586
- {
587
- type: "button",
588
- className: "rs-button rs-button--default",
589
- onClick: retry,
590
- children: "Retry"
591
- }
592
- ),
593
- /* @__PURE__ */ jsx(
594
- "button",
595
- {
596
- type: "button",
597
- className: "rs-button rs-button--default",
598
- onClick: backToCurrencies,
599
- children: "Back"
600
- }
601
- )
602
- ] })
593
+ paymentStatus
603
594
  ] }),
604
595
  !loading && !error && !verifying && externalOpened && /* @__PURE__ */ jsxs("div", { className: "rs-loading-state", "aria-live": "polite", children: [
605
596
  /* @__PURE__ */ jsx("div", { className: "rs-loading-title", children: "Bank details opened" }),
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkKTJQCK6Wcjs = require('./chunk-KTJQCK6W.cjs');
4
+ var _chunkOFLBB6RMcjs = require('./chunk-OFLBB6RM.cjs');
5
5
  require('./chunk-LVCD6RHF.cjs');
6
6
 
7
7
 
@@ -11,13 +11,13 @@ require('./chunk-LVCD6RHF.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunkK47XA224cjs = require('./chunk-K47XA224.cjs');
14
+ var _chunkUZ66Q3RQcjs = require('./chunk-UZ66Q3RQ.cjs');
15
15
 
16
16
 
17
17
 
18
18
  var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
19
19
  require('./chunk-G264OM23.cjs');
20
- require('./chunk-ZO3VFQAA.cjs');
20
+ require('./chunk-GNDDR54D.cjs');
21
21
 
22
22
  // src/DepositModalReown.tsx
23
23
  var _react = require('react');
@@ -45,7 +45,7 @@ var {
45
45
  unichain,
46
46
  katana,
47
47
  hyperEvm
48
- } = _chunkKTJQCK6Wcjs.getReownDependencies.call(void 0, )[1];
48
+ } = _chunkOFLBB6RMcjs.getReownDependencies.call(void 0, )[1];
49
49
  var APPKIT_NETWORK_BY_ID = {
50
50
  [mainnet.id]: mainnet,
51
51
  [optimism.id]: optimism,
@@ -77,7 +77,7 @@ function getAppKitNetwork(chainId) {
77
77
 
78
78
  // src/core/reown-theme.ts
79
79
  function mapTheme(theme) {
80
- const themeMode = _chunkK47XA224cjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
80
+ const themeMode = _chunkUZ66Q3RQcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
81
81
  const themeVariables = {
82
82
  "--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
83
83
  };
@@ -94,7 +94,7 @@ function setAppKitTheme(appKit, theme) {
94
94
 
95
95
  // src/core/reown.tsx
96
96
  var _jsxruntime = require('react/jsx-runtime');
97
- var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkKTJQCK6Wcjs.getReownDependencies.call(void 0, );
97
+ var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkOFLBB6RMcjs.getReownDependencies.call(void 0, );
98
98
  var {
99
99
  createAppKit,
100
100
  useAppKit,
@@ -110,14 +110,14 @@ function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
110
110
  const transports = {};
111
111
  for (const network of networks) {
112
112
  const id = Number(network.id);
113
- transports[id] = _viem.http.call(void 0, _chunkK47XA224cjs.rpcUrlFor.call(void 0, rpcUrls, id));
113
+ transports[id] = _viem.http.call(void 0, _chunkUZ66Q3RQcjs.rpcUrlFor.call(void 0, rpcUrls, id));
114
114
  }
115
115
  return transports;
116
116
  }
117
117
  function getEvmRpcFingerprint(rpcUrls, networks) {
118
118
  return networks.map((network) => {
119
119
  const id = Number(network.id);
120
- return `${id}=${_nullishCoalesce(_chunkK47XA224cjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
120
+ return `${id}=${_nullishCoalesce(_chunkUZ66Q3RQcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
121
121
  }).join("|");
122
122
  }
123
123
  var cachedAdapter = null;
@@ -188,7 +188,7 @@ function ReownWalletProvider({
188
188
  backendUrl,
189
189
  children
190
190
  }) {
191
- const rpcUrls = _chunkK47XA224cjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
191
+ const rpcUrls = _chunkUZ66Q3RQcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
192
192
  const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
193
193
  const overrides = _react.useMemo.call(void 0, () => {
194
194
  if (!rpcUrls) return void 0;
@@ -200,14 +200,14 @@ function ReownWalletProvider({
200
200
  return out;
201
201
  }, [rpcUrls]);
202
202
  const [state, setState] = _react.useState.call(void 0, () => {
203
- const primed = _chunkK47XA224cjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
203
+ const primed = _chunkUZ66Q3RQcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
204
204
  return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
205
205
  });
206
206
  _react.useEffect.call(void 0, () => {
207
207
  let active = true;
208
- const primed = _chunkK47XA224cjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
208
+ const primed = _chunkUZ66Q3RQcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
209
209
  setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
210
- _chunkK47XA224cjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
210
+ _chunkUZ66Q3RQcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
211
211
  if (active) setState({ ready: true, chains });
212
212
  });
213
213
  return () => {
@@ -216,7 +216,7 @@ function ReownWalletProvider({
216
216
  }, [backendUrl, overrides]);
217
217
  _react.useEffect.call(void 0, () => {
218
218
  setAppKitTheme(appKitReact.modal, theme);
219
- return _chunkK47XA224cjs.followSystemAppearance.call(void 0,
219
+ return _chunkUZ66Q3RQcjs.followSystemAppearance.call(void 0,
220
220
  _optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
221
221
  () => setAppKitTheme(appKitReact.modal, theme)
222
222
  );
@@ -280,7 +280,7 @@ function useReownWalletSession() {
280
280
  await switchChainAsync({ chainId });
281
281
  }
282
282
  } catch (err) {
283
- if (_chunkK47XA224cjs.isUnsupportedChainSwitchError.call(void 0, err)) {
283
+ if (_chunkUZ66Q3RQcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
284
284
  throw new Error(
285
285
  `Switch to ${chainDisplayName(chainId)} in your wallet to continue`
286
286
  );
@@ -293,7 +293,7 @@ function useReownWalletSession() {
293
293
 
294
294
  // src/DepositModalReown.tsx
295
295
 
296
- var [appKitReact2, , , , solanaAdapterReact] = _chunkKTJQCK6Wcjs.getReownDependencies.call(void 0, );
296
+ var [appKitReact2, , , , solanaAdapterReact] = _chunkOFLBB6RMcjs.getReownDependencies.call(void 0, );
297
297
  var { useAppKitProvider } = appKitReact2;
298
298
  var { useAppKitConnection } = solanaAdapterReact;
299
299
  function DepositModalWithReown(props) {
@@ -315,7 +315,7 @@ function DepositModalWithReown(props) {
315
315
  reown.disconnect();
316
316
  }, [reown.disconnect]);
317
317
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
318
- _chunkKTJQCK6Wcjs.DepositModalInner,
318
+ _chunkOFLBB6RMcjs.DepositModalInner,
319
319
  {
320
320
  ...props,
321
321
  walletSession: reownWithSolana,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DepositModalInner,
3
3
  getReownDependencies
4
- } from "./chunk-CPDJBIUW.mjs";
4
+ } from "./chunk-QAH3GMQF.mjs";
5
5
  import "./chunk-FTWKAJGN.mjs";
6
6
  import {
7
7
  followSystemAppearance,
@@ -11,13 +11,13 @@ import {
11
11
  resolveThemeMode,
12
12
  rpcUrlFor,
13
13
  useStableRpcUrls
14
- } from "./chunk-NSLF23LA.mjs";
14
+ } from "./chunk-BAYB4KSR.mjs";
15
15
  import {
16
16
  SUPPORTED_CHAIN_IDS,
17
17
  getChainName
18
18
  } from "./chunk-EAGMY3QE.mjs";
19
19
  import "./chunk-YY4ZOAH5.mjs";
20
- import "./chunk-XULBAFR6.mjs";
20
+ import "./chunk-4VIXW4BM.mjs";
21
21
 
22
22
  // src/DepositModalReown.tsx
23
23
  import { useCallback, useMemo as useMemo2 } from "react";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WithdrawModal,
3
3
  buildWithdrawAnalyticsSessionProperties
4
- } from "./chunk-WDK4BIQL.mjs";
5
- import "./chunk-NSLF23LA.mjs";
4
+ } from "./chunk-J5J3N66V.mjs";
5
+ import "./chunk-BAYB4KSR.mjs";
6
6
  import "./chunk-EAGMY3QE.mjs";
7
7
  import "./chunk-YY4ZOAH5.mjs";
8
- import "./chunk-XULBAFR6.mjs";
8
+ import "./chunk-4VIXW4BM.mjs";
9
9
  export {
10
10
  WithdrawModal,
11
11
  buildWithdrawAnalyticsSessionProperties
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk5N7KSGMCcjs = require('./chunk-5N7KSGMC.cjs');
5
+ require('./chunk-UZ66Q3RQ.cjs');
6
+ require('./chunk-OY5N3E6L.cjs');
7
+ require('./chunk-G264OM23.cjs');
8
+ require('./chunk-GNDDR54D.cjs');
9
+
10
+
11
+
12
+ exports.WithdrawModal = _chunk5N7KSGMCcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunk5N7KSGMCcjs.buildWithdrawAnalyticsSessionProperties;
@@ -1,5 +1,5 @@
1
1
  // src/core/version.ts
2
- var MODAL_VERSION = "0.0.0-dev-20260922141536";
2
+ var MODAL_VERSION = "0.0.0-dev-20260924142825";
3
3
  var SERVICE_HEADERS = {
4
4
  "Content-Type": "application/json",
5
5
  "x-deposit-modal-version": MODAL_VERSION