@rhinestone/deposit-modal 0.0.0-dev-20260922130636 → 0.0.0-dev-20260923170217
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/{BankOnrampStep-TGCFBOK6.mjs → BankOnrampStep-7KLRGLIK.mjs} +56 -37
- package/dist/{BankOnrampStep-YRLTVIUO.cjs → BankOnrampStep-7RKADD55.cjs} +60 -41
- package/dist/{DepositModalReown-EUTQNZJH.mjs → DepositModalReown-FSW7QECS.mjs} +3 -3
- package/dist/{DepositModalReown-U722QHH6.cjs → DepositModalReown-O3FGTPSB.cjs} +16 -16
- package/dist/{WithdrawModal-AKHOLJWO.mjs → WithdrawModal-BYDTRTI6.mjs} +3 -3
- package/dist/WithdrawModal-HQ2NDHA7.cjs +12 -0
- package/dist/{chunk-NU2EY65R.cjs → chunk-6PTR3TBE.cjs} +3 -3
- package/dist/{chunk-TCLVBWA7.cjs → chunk-7BTJYIB6.cjs} +54 -54
- package/dist/{chunk-AGVLO2I4.mjs → chunk-7RZM44B5.mjs} +12 -4
- package/dist/{chunk-X3IBAIQB.mjs → chunk-C3LZ5WA2.mjs} +1 -1
- package/dist/{chunk-EJVUZ3TW.cjs → chunk-EVVIDGHG.cjs} +2 -2
- package/dist/{chunk-XCLR5YGQ.mjs → chunk-GDQBQBCR.mjs} +1 -1
- package/dist/{chunk-PXL3MSJT.mjs → chunk-JBYUAECX.mjs} +1 -1
- package/dist/{chunk-TQKXJDDO.mjs → chunk-KYWGMKXP.mjs} +1 -1
- package/dist/{chunk-Q3YAJLOP.cjs → chunk-MIJGM6BI.cjs} +33 -33
- package/dist/{chunk-DFYHOBOV.mjs → chunk-NE2OP6HI.mjs} +1 -1
- package/dist/{chunk-SH5DPTYM.cjs → chunk-OZL6CFUA.cjs} +226 -218
- package/dist/{chunk-EY2YNGFX.mjs → chunk-QPVJI3T7.mjs} +1 -1
- package/dist/{chunk-WRDH7PR7.cjs → chunk-TRDIY7S7.cjs} +2 -2
- package/dist/{chunk-YNERADQK.cjs → chunk-YT42KOJA.cjs} +1 -1
- package/dist/compliance.cjs +4 -4
- package/dist/compliance.mjs +3 -3
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.mjs +3 -3
- package/dist/embed.cjs +14 -14
- package/dist/embed.mjs +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +4 -4
- package/dist/offramp.cjs +4 -4
- package/dist/offramp.mjs +2 -2
- package/dist/onramp.cjs +4 -4
- package/dist/onramp.mjs +3 -3
- package/dist/styles.css +20 -3
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.mjs +3 -3
- package/package.json +4 -4
- package/dist/WithdrawModal-FPNYN6PW.cjs +0 -12
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-YY4ZOAH5.mjs";
|
|
7
7
|
import {
|
|
8
8
|
createOnrampService
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GDQBQBCR.mjs";
|
|
10
10
|
import "./chunk-PP4QE32S.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getComplianceStatus,
|
|
13
13
|
startComplianceVerification
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-QPVJI3T7.mjs";
|
|
15
|
+
import "./chunk-KYWGMKXP.mjs";
|
|
16
|
+
import "./chunk-NE2OP6HI.mjs";
|
|
17
17
|
|
|
18
18
|
// src/components/steps/BankOnrampStep.tsx
|
|
19
19
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -120,6 +120,12 @@ function isTrustedNoahHostedUrl(url) {
|
|
|
120
120
|
}
|
|
121
121
|
return NOAH_HOSTED_ORIGINS.includes(parsed.origin);
|
|
122
122
|
}
|
|
123
|
+
function hostedSessionRemainingMs(expiresAt, now = Date.now()) {
|
|
124
|
+
if (!expiresAt) return null;
|
|
125
|
+
const expiry = Date.parse(expiresAt);
|
|
126
|
+
if (!Number.isFinite(expiry)) return null;
|
|
127
|
+
return Math.max(0, expiry - now);
|
|
128
|
+
}
|
|
123
129
|
|
|
124
130
|
// src/components/steps/BankOnrampStep.tsx
|
|
125
131
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -127,11 +133,13 @@ var SAFE_ERROR = "Bank details are unavailable. Try again.";
|
|
|
127
133
|
var OPTIONS_ERROR = "Bank transfer options are unavailable. Try again.";
|
|
128
134
|
var PAYMENT_POLL_MS = 15e3;
|
|
129
135
|
var VERIFICATION_POLL_MS = 5e3;
|
|
136
|
+
var MAX_TIMEOUT_MS = 2147483647;
|
|
130
137
|
function BankOnrampStep({
|
|
131
138
|
backendUrl,
|
|
132
139
|
smartAccount,
|
|
133
140
|
bankOnramp,
|
|
134
141
|
onGoBack,
|
|
142
|
+
onInternalBack,
|
|
135
143
|
onError,
|
|
136
144
|
openExternally
|
|
137
145
|
}) {
|
|
@@ -152,6 +160,8 @@ function BankOnrampStep({
|
|
|
152
160
|
const [loading, setLoading] = useState(true);
|
|
153
161
|
const [selectedAccount, setSelectedAccount] = useState(null);
|
|
154
162
|
const [hostedUrl, setHostedUrl] = useState(null);
|
|
163
|
+
const [verificationExpired, setVerificationExpired] = useState(false);
|
|
164
|
+
const [verificationExpiresAt, setVerificationExpiresAt] = useState(null);
|
|
155
165
|
const [iframeLoaded, setIframeLoaded] = useState(false);
|
|
156
166
|
const [externalOpened, setExternalOpened] = useState(false);
|
|
157
167
|
const [error, setError] = useState(null);
|
|
@@ -180,6 +190,8 @@ function BankOnrampStep({
|
|
|
180
190
|
return "action_required";
|
|
181
191
|
}
|
|
182
192
|
setHostedUrl(session.nextAction.url);
|
|
193
|
+
setVerificationExpiresAt(session.expiresAt);
|
|
194
|
+
setVerificationExpired(false);
|
|
183
195
|
setIframeLoaded(false);
|
|
184
196
|
return "action_required";
|
|
185
197
|
}, [bankOnramp.currency, openExternally, sessionOptions]);
|
|
@@ -311,7 +323,23 @@ function BankOnrampStep({
|
|
|
311
323
|
setHostedUrl(null);
|
|
312
324
|
setExternalOpened(false);
|
|
313
325
|
setError(null);
|
|
326
|
+
setLoading(false);
|
|
314
327
|
}, []);
|
|
328
|
+
useEffect(() => {
|
|
329
|
+
if (!onInternalBack) return;
|
|
330
|
+
onInternalBack(selectedAccount ? backToCurrencies : null);
|
|
331
|
+
return () => onInternalBack(null);
|
|
332
|
+
}, [backToCurrencies, onInternalBack, selectedAccount]);
|
|
333
|
+
useEffect(() => {
|
|
334
|
+
if (verifying !== "action_required" || !hostedUrl) return;
|
|
335
|
+
const remaining = hostedSessionRemainingMs(
|
|
336
|
+
verificationExpiresAt ?? void 0
|
|
337
|
+
);
|
|
338
|
+
if (remaining === null) return;
|
|
339
|
+
if (remaining > MAX_TIMEOUT_MS) return;
|
|
340
|
+
const timer = setTimeout(() => setVerificationExpired(true), remaining);
|
|
341
|
+
return () => clearTimeout(timer);
|
|
342
|
+
}, [hostedUrl, verificationExpiresAt, verifying]);
|
|
315
343
|
useEffect(() => {
|
|
316
344
|
if (verifying !== "action_required" && verifying !== "reviewing") return;
|
|
317
345
|
let active = true;
|
|
@@ -367,6 +395,12 @@ function BankOnrampStep({
|
|
|
367
395
|
onGoBack();
|
|
368
396
|
}, [onGoBack]);
|
|
369
397
|
const retry = selectedAccount ? () => void openDetails(selectedAccount) : () => void loadAccounts();
|
|
398
|
+
const restartVerification = useCallback(() => {
|
|
399
|
+
setVerificationExpired(false);
|
|
400
|
+
setVerificationExpiresAt(null);
|
|
401
|
+
setHostedUrl(null);
|
|
402
|
+
void loadAccounts();
|
|
403
|
+
}, [loadAccounts]);
|
|
370
404
|
const paymentStatus = payment ? /* @__PURE__ */ jsxs(
|
|
371
405
|
"div",
|
|
372
406
|
{
|
|
@@ -379,8 +413,9 @@ function BankOnrampStep({
|
|
|
379
413
|
]
|
|
380
414
|
}
|
|
381
415
|
) : null;
|
|
416
|
+
const hostedFrameMounted = Boolean(hostedUrl) && !verificationExpired;
|
|
382
417
|
return /* @__PURE__ */ jsx("div", { className: "rs-screen rs-bank-onramp", children: /* @__PURE__ */ jsxs("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
383
|
-
/* @__PURE__ */ jsx(
|
|
418
|
+
!hostedFrameMounted && /* @__PURE__ */ jsx(
|
|
384
419
|
BodyHeader,
|
|
385
420
|
{
|
|
386
421
|
icon: /* @__PURE__ */ jsx(BankIcon, {}),
|
|
@@ -453,7 +488,20 @@ function BankOnrampStep({
|
|
|
453
488
|
}
|
|
454
489
|
)
|
|
455
490
|
] }),
|
|
456
|
-
!loading && !error && verifying === "action_required" &&
|
|
491
|
+
!loading && !error && verifying === "action_required" && verificationExpired && /* @__PURE__ */ jsxs("div", { className: "rs-loading-state", "aria-live": "polite", children: [
|
|
492
|
+
/* @__PURE__ */ jsx("div", { className: "rs-loading-title", children: "Verification expired" }),
|
|
493
|
+
/* @__PURE__ */ jsx("div", { className: "rs-loading-subtitle", children: "That verification session timed out. Start a new one to pick up where you left off." }),
|
|
494
|
+
/* @__PURE__ */ jsx("div", { className: "rs-screen-button-row", children: /* @__PURE__ */ jsx(
|
|
495
|
+
"button",
|
|
496
|
+
{
|
|
497
|
+
type: "button",
|
|
498
|
+
className: "rs-button rs-button--primary",
|
|
499
|
+
onClick: restartVerification,
|
|
500
|
+
children: "Start again"
|
|
501
|
+
}
|
|
502
|
+
) })
|
|
503
|
+
] }),
|
|
504
|
+
!loading && !error && verifying === "action_required" && !verificationExpired && hostedUrl && /* @__PURE__ */ jsxs("div", { className: "rs-bank-onramp-hosted", children: [
|
|
457
505
|
!iframeLoaded && /* @__PURE__ */ jsx("div", { className: "rs-bank-onramp-frame-loading", "aria-live": "polite", children: /* @__PURE__ */ jsx(Spinner, {}) }),
|
|
458
506
|
/* @__PURE__ */ jsx(
|
|
459
507
|
"iframe",
|
|
@@ -465,16 +513,7 @@ function BankOnrampStep({
|
|
|
465
513
|
allow: "camera; microphone; clipboard-write",
|
|
466
514
|
onLoad: () => setIframeLoaded(true)
|
|
467
515
|
}
|
|
468
|
-
)
|
|
469
|
-
/* @__PURE__ */ jsx("div", { className: "rs-screen-button-row", children: /* @__PURE__ */ jsx(
|
|
470
|
-
"button",
|
|
471
|
-
{
|
|
472
|
-
type: "button",
|
|
473
|
-
className: "rs-button rs-button--default",
|
|
474
|
-
onClick: leaveStep,
|
|
475
|
-
children: "Back"
|
|
476
|
-
}
|
|
477
|
-
) })
|
|
516
|
+
)
|
|
478
517
|
] }),
|
|
479
518
|
!loading && !error && !verifying && !selectedAccount && /* @__PURE__ */ jsxs("div", { className: "rs-list", children: [
|
|
480
519
|
options.map((option) => {
|
|
@@ -528,27 +567,7 @@ function BankOnrampStep({
|
|
|
528
567
|
onLoad: () => setIframeLoaded(true)
|
|
529
568
|
}
|
|
530
569
|
),
|
|
531
|
-
paymentStatus
|
|
532
|
-
/* @__PURE__ */ jsxs("div", { className: "rs-screen-button-row", children: [
|
|
533
|
-
/* @__PURE__ */ jsx(
|
|
534
|
-
"button",
|
|
535
|
-
{
|
|
536
|
-
type: "button",
|
|
537
|
-
className: "rs-button rs-button--default",
|
|
538
|
-
onClick: retry,
|
|
539
|
-
children: "Retry"
|
|
540
|
-
}
|
|
541
|
-
),
|
|
542
|
-
/* @__PURE__ */ jsx(
|
|
543
|
-
"button",
|
|
544
|
-
{
|
|
545
|
-
type: "button",
|
|
546
|
-
className: "rs-button rs-button--default",
|
|
547
|
-
onClick: backToCurrencies,
|
|
548
|
-
children: "Back"
|
|
549
|
-
}
|
|
550
|
-
)
|
|
551
|
-
] })
|
|
570
|
+
paymentStatus
|
|
552
571
|
] }),
|
|
553
572
|
!loading && !error && !verifying && externalOpened && /* @__PURE__ */ jsxs("div", { className: "rs-loading-state", "aria-live": "polite", children: [
|
|
554
573
|
/* @__PURE__ */ jsx("div", { className: "rs-loading-title", children: "Bank details opened" }),
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
var _chunkG264OM23cjs = require('./chunk-G264OM23.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTRDIY7S7cjs = require('./chunk-TRDIY7S7.cjs');
|
|
10
10
|
require('./chunk-ADEWTBSN.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
require('./chunk-
|
|
16
|
-
require('./chunk-
|
|
14
|
+
var _chunk6PTR3TBEcjs = require('./chunk-6PTR3TBE.cjs');
|
|
15
|
+
require('./chunk-EVVIDGHG.cjs');
|
|
16
|
+
require('./chunk-YT42KOJA.cjs');
|
|
17
17
|
|
|
18
18
|
// src/components/steps/BankOnrampStep.tsx
|
|
19
19
|
var _react = require('react');
|
|
@@ -120,6 +120,12 @@ function isTrustedNoahHostedUrl(url) {
|
|
|
120
120
|
}
|
|
121
121
|
return NOAH_HOSTED_ORIGINS.includes(parsed.origin);
|
|
122
122
|
}
|
|
123
|
+
function hostedSessionRemainingMs(expiresAt, now = Date.now()) {
|
|
124
|
+
if (!expiresAt) return null;
|
|
125
|
+
const expiry = Date.parse(expiresAt);
|
|
126
|
+
if (!Number.isFinite(expiry)) return null;
|
|
127
|
+
return Math.max(0, expiry - now);
|
|
128
|
+
}
|
|
123
129
|
|
|
124
130
|
// src/components/steps/BankOnrampStep.tsx
|
|
125
131
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -127,11 +133,13 @@ var SAFE_ERROR = "Bank details are unavailable. Try again.";
|
|
|
127
133
|
var OPTIONS_ERROR = "Bank transfer options are unavailable. Try again.";
|
|
128
134
|
var PAYMENT_POLL_MS = 15e3;
|
|
129
135
|
var VERIFICATION_POLL_MS = 5e3;
|
|
136
|
+
var MAX_TIMEOUT_MS = 2147483647;
|
|
130
137
|
function BankOnrampStep({
|
|
131
138
|
backendUrl,
|
|
132
139
|
smartAccount,
|
|
133
140
|
bankOnramp,
|
|
134
141
|
onGoBack,
|
|
142
|
+
onInternalBack,
|
|
135
143
|
onError,
|
|
136
144
|
openExternally
|
|
137
145
|
}) {
|
|
@@ -144,7 +152,7 @@ function BankOnrampStep({
|
|
|
144
152
|
[backendUrl, getSessionRef, smartAccount]
|
|
145
153
|
);
|
|
146
154
|
const service = _react.useMemo.call(void 0,
|
|
147
|
-
() =>
|
|
155
|
+
() => _chunkTRDIY7S7cjs.createOnrampService.call(void 0, sessionOptions),
|
|
148
156
|
[sessionOptions]
|
|
149
157
|
);
|
|
150
158
|
const [options, setOptions] = _react.useState.call(void 0, []);
|
|
@@ -152,6 +160,8 @@ function BankOnrampStep({
|
|
|
152
160
|
const [loading, setLoading] = _react.useState.call(void 0, true);
|
|
153
161
|
const [selectedAccount, setSelectedAccount] = _react.useState.call(void 0, null);
|
|
154
162
|
const [hostedUrl, setHostedUrl] = _react.useState.call(void 0, null);
|
|
163
|
+
const [verificationExpired, setVerificationExpired] = _react.useState.call(void 0, false);
|
|
164
|
+
const [verificationExpiresAt, setVerificationExpiresAt] = _react.useState.call(void 0, null);
|
|
155
165
|
const [iframeLoaded, setIframeLoaded] = _react.useState.call(void 0, false);
|
|
156
166
|
const [externalOpened, setExternalOpened] = _react.useState.call(void 0, false);
|
|
157
167
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
@@ -163,10 +173,10 @@ function BankOnrampStep({
|
|
|
163
173
|
[]
|
|
164
174
|
);
|
|
165
175
|
const ensureVerified = _react.useCallback.call(void 0, async () => {
|
|
166
|
-
const current = await
|
|
176
|
+
const current = await _chunk6PTR3TBEcjs.getComplianceStatus.call(void 0, sessionOptions);
|
|
167
177
|
if (current.status === "approved") return "approved";
|
|
168
178
|
if (current.status === "declined") return "declined";
|
|
169
|
-
const session = await
|
|
179
|
+
const session = await _chunk6PTR3TBEcjs.startComplianceVerification.call(void 0, sessionOptions, {
|
|
170
180
|
// Verification is per fiat currency. Without an explicit choice the US
|
|
171
181
|
// dollar journey is the one every configured country can complete.
|
|
172
182
|
currency: _nullishCoalesce(bankOnramp.currency, () => ( "USD"))
|
|
@@ -180,6 +190,8 @@ function BankOnrampStep({
|
|
|
180
190
|
return "action_required";
|
|
181
191
|
}
|
|
182
192
|
setHostedUrl(session.nextAction.url);
|
|
193
|
+
setVerificationExpiresAt(session.expiresAt);
|
|
194
|
+
setVerificationExpired(false);
|
|
183
195
|
setIframeLoaded(false);
|
|
184
196
|
return "action_required";
|
|
185
197
|
}, [bankOnramp.currency, openExternally, sessionOptions]);
|
|
@@ -311,14 +323,30 @@ function BankOnrampStep({
|
|
|
311
323
|
setHostedUrl(null);
|
|
312
324
|
setExternalOpened(false);
|
|
313
325
|
setError(null);
|
|
326
|
+
setLoading(false);
|
|
314
327
|
}, []);
|
|
328
|
+
_react.useEffect.call(void 0, () => {
|
|
329
|
+
if (!onInternalBack) return;
|
|
330
|
+
onInternalBack(selectedAccount ? backToCurrencies : null);
|
|
331
|
+
return () => onInternalBack(null);
|
|
332
|
+
}, [backToCurrencies, onInternalBack, selectedAccount]);
|
|
333
|
+
_react.useEffect.call(void 0, () => {
|
|
334
|
+
if (verifying !== "action_required" || !hostedUrl) return;
|
|
335
|
+
const remaining = hostedSessionRemainingMs(
|
|
336
|
+
_nullishCoalesce(verificationExpiresAt, () => ( void 0))
|
|
337
|
+
);
|
|
338
|
+
if (remaining === null) return;
|
|
339
|
+
if (remaining > MAX_TIMEOUT_MS) return;
|
|
340
|
+
const timer = setTimeout(() => setVerificationExpired(true), remaining);
|
|
341
|
+
return () => clearTimeout(timer);
|
|
342
|
+
}, [hostedUrl, verificationExpiresAt, verifying]);
|
|
315
343
|
_react.useEffect.call(void 0, () => {
|
|
316
344
|
if (verifying !== "action_required" && verifying !== "reviewing") return;
|
|
317
345
|
let active = true;
|
|
318
346
|
const timer = setInterval(() => {
|
|
319
347
|
void (async () => {
|
|
320
348
|
try {
|
|
321
|
-
const status = await
|
|
349
|
+
const status = await _chunk6PTR3TBEcjs.getComplianceStatus.call(void 0, sessionOptions);
|
|
322
350
|
if (!active) return;
|
|
323
351
|
if (status.status === "approved") {
|
|
324
352
|
setHostedUrl(null);
|
|
@@ -367,6 +395,12 @@ function BankOnrampStep({
|
|
|
367
395
|
onGoBack();
|
|
368
396
|
}, [onGoBack]);
|
|
369
397
|
const retry = selectedAccount ? () => void openDetails(selectedAccount) : () => void loadAccounts();
|
|
398
|
+
const restartVerification = _react.useCallback.call(void 0, () => {
|
|
399
|
+
setVerificationExpired(false);
|
|
400
|
+
setVerificationExpiresAt(null);
|
|
401
|
+
setHostedUrl(null);
|
|
402
|
+
void loadAccounts();
|
|
403
|
+
}, [loadAccounts]);
|
|
370
404
|
const paymentStatus = payment ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
371
405
|
"div",
|
|
372
406
|
{
|
|
@@ -379,8 +413,9 @@ function BankOnrampStep({
|
|
|
379
413
|
]
|
|
380
414
|
}
|
|
381
415
|
) : null;
|
|
416
|
+
const hostedFrameMounted = Boolean(hostedUrl) && !verificationExpired;
|
|
382
417
|
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: [
|
|
383
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
418
|
+
!hostedFrameMounted && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
384
419
|
_chunkG264OM23cjs.BodyHeader,
|
|
385
420
|
{
|
|
386
421
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.BankIcon, {}),
|
|
@@ -453,7 +488,20 @@ function BankOnrampStep({
|
|
|
453
488
|
}
|
|
454
489
|
)
|
|
455
490
|
] }),
|
|
456
|
-
!loading && !error && verifying === "action_required" &&
|
|
491
|
+
!loading && !error && verifying === "action_required" && verificationExpired && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", "aria-live": "polite", children: [
|
|
492
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: "Verification expired" }),
|
|
493
|
+
/* @__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." }),
|
|
494
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-button-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
495
|
+
"button",
|
|
496
|
+
{
|
|
497
|
+
type: "button",
|
|
498
|
+
className: "rs-button rs-button--primary",
|
|
499
|
+
onClick: restartVerification,
|
|
500
|
+
children: "Start again"
|
|
501
|
+
}
|
|
502
|
+
) })
|
|
503
|
+
] }),
|
|
504
|
+
!loading && !error && verifying === "action_required" && !verificationExpired && hostedUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-bank-onramp-hosted", children: [
|
|
457
505
|
!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, {}) }),
|
|
458
506
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
459
507
|
"iframe",
|
|
@@ -465,16 +513,7 @@ function BankOnrampStep({
|
|
|
465
513
|
allow: "camera; microphone; clipboard-write",
|
|
466
514
|
onLoad: () => setIframeLoaded(true)
|
|
467
515
|
}
|
|
468
|
-
)
|
|
469
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-button-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
470
|
-
"button",
|
|
471
|
-
{
|
|
472
|
-
type: "button",
|
|
473
|
-
className: "rs-button rs-button--default",
|
|
474
|
-
onClick: leaveStep,
|
|
475
|
-
children: "Back"
|
|
476
|
-
}
|
|
477
|
-
) })
|
|
516
|
+
)
|
|
478
517
|
] }),
|
|
479
518
|
!loading && !error && !verifying && !selectedAccount && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list", children: [
|
|
480
519
|
options.map((option) => {
|
|
@@ -528,27 +567,7 @@ function BankOnrampStep({
|
|
|
528
567
|
onLoad: () => setIframeLoaded(true)
|
|
529
568
|
}
|
|
530
569
|
),
|
|
531
|
-
paymentStatus
|
|
532
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
533
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
534
|
-
"button",
|
|
535
|
-
{
|
|
536
|
-
type: "button",
|
|
537
|
-
className: "rs-button rs-button--default",
|
|
538
|
-
onClick: retry,
|
|
539
|
-
children: "Retry"
|
|
540
|
-
}
|
|
541
|
-
),
|
|
542
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
543
|
-
"button",
|
|
544
|
-
{
|
|
545
|
-
type: "button",
|
|
546
|
-
className: "rs-button rs-button--default",
|
|
547
|
-
onClick: backToCurrencies,
|
|
548
|
-
children: "Back"
|
|
549
|
-
}
|
|
550
|
-
)
|
|
551
|
-
] })
|
|
570
|
+
paymentStatus
|
|
552
571
|
] }),
|
|
553
572
|
!loading && !error && !verifying && externalOpened && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", "aria-live": "polite", children: [
|
|
554
573
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: "Bank details opened" }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner,
|
|
3
3
|
getReownDependencies
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7RZM44B5.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-
|
|
14
|
+
} from "./chunk-C3LZ5WA2.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-
|
|
20
|
+
import "./chunk-NE2OP6HI.mjs";
|
|
21
21
|
|
|
22
22
|
// src/DepositModalReown.tsx
|
|
23
23
|
import { useCallback, useMemo as useMemo2 } from "react";
|
|
@@ -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
|
|
4
|
+
var _chunkOZL6CFUAcjs = require('./chunk-OZL6CFUA.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
|
|
14
|
+
var _chunkMIJGM6BIcjs = require('./chunk-MIJGM6BI.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
19
19
|
require('./chunk-G264OM23.cjs');
|
|
20
|
-
require('./chunk-
|
|
20
|
+
require('./chunk-YT42KOJA.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
|
-
} =
|
|
48
|
+
} = _chunkOZL6CFUAcjs.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 =
|
|
80
|
+
const themeMode = _chunkMIJGM6BIcjs.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] =
|
|
97
|
+
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkOZL6CFUAcjs.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,
|
|
113
|
+
transports[id] = _viem.http.call(void 0, _chunkMIJGM6BIcjs.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(
|
|
120
|
+
return `${id}=${_nullishCoalesce(_chunkMIJGM6BIcjs.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 =
|
|
191
|
+
const rpcUrls = _chunkMIJGM6BIcjs.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 =
|
|
203
|
+
const primed = _chunkMIJGM6BIcjs.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 =
|
|
208
|
+
const primed = _chunkMIJGM6BIcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
209
209
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
210
|
-
|
|
210
|
+
_chunkMIJGM6BIcjs.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
|
|
219
|
+
return _chunkMIJGM6BIcjs.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 (
|
|
283
|
+
if (_chunkMIJGM6BIcjs.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] =
|
|
296
|
+
var [appKitReact2, , , , solanaAdapterReact] = _chunkOZL6CFUAcjs.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
|
-
|
|
318
|
+
_chunkOZL6CFUAcjs.DepositModalInner,
|
|
319
319
|
{
|
|
320
320
|
...props,
|
|
321
321
|
walletSession: reownWithSolana,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal,
|
|
3
3
|
buildWithdrawAnalyticsSessionProperties
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-JBYUAECX.mjs";
|
|
5
|
+
import "./chunk-C3LZ5WA2.mjs";
|
|
6
6
|
import "./chunk-EAGMY3QE.mjs";
|
|
7
7
|
import "./chunk-YY4ZOAH5.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-NE2OP6HI.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 _chunk7BTJYIB6cjs = require('./chunk-7BTJYIB6.cjs');
|
|
5
|
+
require('./chunk-MIJGM6BI.cjs');
|
|
6
|
+
require('./chunk-OY5N3E6L.cjs');
|
|
7
|
+
require('./chunk-G264OM23.cjs');
|
|
8
|
+
require('./chunk-YT42KOJA.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.WithdrawModal = _chunk7BTJYIB6cjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunk7BTJYIB6cjs.buildWithdrawAnalyticsSessionProperties;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEVVIDGHGcjs = require('./chunk-EVVIDGHG.cjs');
|
|
4
4
|
|
|
5
5
|
// src/core/compliance-service.ts
|
|
6
6
|
function getComplianceStatus(options) {
|
|
7
|
-
return
|
|
7
|
+
return _chunkEVVIDGHGcjs.createBearerTransport.call(void 0, options)("/compliance/status");
|
|
8
8
|
}
|
|
9
9
|
function startComplianceVerification(options, body) {
|
|
10
|
-
return
|
|
10
|
+
return _chunkEVVIDGHGcjs.createBearerTransport.call(void 0, options)(
|
|
11
11
|
"/compliance/verification",
|
|
12
12
|
body
|
|
13
13
|
);
|