@rhinestone/deposit-modal 0.0.0-dev-20260729163733 → 0.0.0-dev-20260730114422
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 +7 -20
- package/dist/{DepositModalReown-Y4WFWUBT.cjs → DepositModalReown-KKQ7XR2V.cjs} +13 -13
- package/dist/{DepositModalReown-2MHPRF63.mjs → DepositModalReown-X4QTYV2Z.mjs} +7 -7
- package/dist/{chunk-4EN4RKIU.cjs → chunk-4F764346.cjs} +81 -81
- package/dist/{chunk-AUHSR3DY.mjs → chunk-7SWH5QF4.mjs} +7 -35
- package/dist/{chunk-2IHE3ZZA.mjs → chunk-A223BLVC.mjs} +0 -6
- package/dist/{chunk-KEYKVNF3.mjs → chunk-AJLUXRZ3.mjs} +81 -81
- package/dist/{chunk-H7PSI2VO.mjs → chunk-CRQ7NNQL.mjs} +3 -3
- package/dist/{chunk-TIOWQA3Y.cjs → chunk-E3NNJMG2.cjs} +1 -1
- package/dist/{chunk-RWEJQM2K.cjs → chunk-EUQEECI3.cjs} +65 -65
- package/dist/{chunk-XFS2NBQ4.mjs → chunk-FE2EJOG2.mjs} +1 -1
- package/dist/{chunk-JWX33GHX.cjs → chunk-H577RJN5.cjs} +1 -7
- package/dist/{chunk-M5PWZT2F.mjs → chunk-ILT2PITN.mjs} +1 -1
- package/dist/{chunk-PK3ADQ5D.mjs → chunk-KD6TEGL3.mjs} +9 -28
- package/dist/{chunk-BD3OKYTC.mjs → chunk-KIHBZIYT.mjs} +1 -1
- package/dist/{chunk-F3VTZMVW.cjs → chunk-LZDJX5MF.cjs} +379 -407
- package/dist/{chunk-HJHXMMFA.cjs → chunk-NB2NKQTC.cjs} +98 -114
- package/dist/{chunk-JIEXTF6I.mjs → chunk-TC6345EX.mjs} +20 -36
- package/dist/{chunk-MYE7MZD5.cjs → chunk-WQRS2OQV.cjs} +65 -84
- package/dist/{chunk-OU5AFKDR.cjs → chunk-YEBXUUH3.cjs} +2 -2
- package/dist/{chunk-SVEUP6BG.cjs → chunk-YOYJEFX5.cjs} +3 -3
- package/dist/claim.cjs +6 -6
- package/dist/claim.d.cts +31 -4
- package/dist/claim.d.ts +31 -4
- package/dist/claim.mjs +5 -5
- package/dist/constants.cjs +3 -3
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +2 -2
- package/dist/deposit.cjs +8 -8
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +7 -7
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +9 -9
- package/dist/polymarket.cjs +5 -5
- package/dist/polymarket.mjs +2 -2
- package/dist/{types-CUj-rF6J.d.cts → types-CcAjRzzz.d.cts} +4 -43
- package/dist/{types-CUj-rF6J.d.ts → types-CcAjRzzz.d.ts} +4 -43
- package/dist/withdraw.cjs +6 -6
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,9 +124,7 @@ import { ClaimModal } from "@rhinestone/deposit-modal/claim";
|
|
|
124
124
|
|
|
125
125
|
Deposit accounts are owned by the Rhinestone service, so there is no user wallet that can sign for a refund — and when the deposit arrived from an exchange, the sender can't sign either. Whether a deposit belongs to a given user is something **only your app knows**: you authenticated them, and you chose the `recipient` you passed to the widget.
|
|
126
126
|
|
|
127
|
-
So `refundEndpoint` points at something you control.
|
|
128
|
-
|
|
129
|
-
**Your own backend** — same-origin, so the session cookie authenticates it. `createRefundHandler` does everything except the auth decision:
|
|
127
|
+
So `refundEndpoint` points at something you control: your own route, same-origin, so the session cookie authenticates it. `createRefundHandler` does everything except the auth decision:
|
|
130
128
|
|
|
131
129
|
```ts
|
|
132
130
|
// app/api/refund/route.ts
|
|
@@ -150,23 +148,12 @@ It verifies the deposit really belongs to that recipient before spending your AP
|
|
|
150
148
|
|
|
151
149
|
If you write your own endpoint instead, echo a `destination` in the success body whenever you override the requested one, for the same reason.
|
|
152
150
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
getUserToken={(refund) =>
|
|
160
|
-
fetch("/api/refund-token", {
|
|
161
|
-
method: "POST",
|
|
162
|
-
body: JSON.stringify(refund),
|
|
163
|
-
}).then((r) => r.json()).then((r) => r.token)
|
|
164
|
-
}
|
|
165
|
-
/* … */
|
|
166
|
-
/>
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Bind the token to the specific refund it authorizes, not just to the user — an identity-only token is a bearer credential spendable on any destination. See the deposit-widget-proxy README for the mint endpoint.
|
|
151
|
+
There is deliberately no cross-origin variant. A `deposit-widget-proxy` authenticates
|
|
152
|
+
nobody, so it cannot decide which user a deposit belongs to; pointing
|
|
153
|
+
`refundEndpoint` at another origin would also drop the session cookie, since `fetch`
|
|
154
|
+
omits credentials cross-origin. Mount the handler in your own backend instead — if
|
|
155
|
+
you can authenticate the user well enough to mint a token for a proxy, you can
|
|
156
|
+
authorize the refund directly, with one contract rather than two.
|
|
170
157
|
|
|
171
158
|
`GET /deposits` still needs to be proxied for the lookup step, as before.
|
|
172
159
|
|
|
@@ -1,18 +1,18 @@
|
|
|
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
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var _chunkLZDJX5MFcjs = require('./chunk-LZDJX5MF.cjs');
|
|
4
|
+
require('./chunk-NB2NKQTC.cjs');
|
|
5
|
+
require('./chunk-YOYJEFX5.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
9
|
+
var _chunkEUQEECI3cjs = require('./chunk-EUQEECI3.cjs');
|
|
10
|
+
require('./chunk-E3NNJMG2.cjs');
|
|
11
|
+
require('./chunk-YEBXUUH3.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkH577RJN5cjs = require('./chunk-H577RJN5.cjs');
|
|
16
16
|
|
|
17
17
|
// src/DepositModalReown.tsx
|
|
18
18
|
var _react = require('react');
|
|
@@ -69,7 +69,7 @@ var APPKIT_NETWORK_BY_ID = {
|
|
|
69
69
|
[_networks.katana.id]: _networks.katana,
|
|
70
70
|
[_networks.hyperEvm.id]: _networks.hyperEvm
|
|
71
71
|
};
|
|
72
|
-
var EVM_NETWORKS =
|
|
72
|
+
var EVM_NETWORKS = _chunkH577RJN5cjs.SUPPORTED_CHAINS.map((chain) => {
|
|
73
73
|
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
74
74
|
if (!network) {
|
|
75
75
|
throw new Error(
|
|
@@ -88,14 +88,14 @@ function buildTransports(rpcUrls) {
|
|
|
88
88
|
const transports = {};
|
|
89
89
|
for (const network of EVM_NETWORKS) {
|
|
90
90
|
const id = Number(network.id);
|
|
91
|
-
transports[id] = _viem.http.call(void 0,
|
|
91
|
+
transports[id] = _viem.http.call(void 0, _chunkEUQEECI3cjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
92
92
|
}
|
|
93
93
|
return transports;
|
|
94
94
|
}
|
|
95
95
|
function getEvmRpcFingerprint(rpcUrls) {
|
|
96
96
|
return EVM_NETWORKS.map((network) => {
|
|
97
97
|
const id = Number(network.id);
|
|
98
|
-
return `${id}=${_nullishCoalesce(
|
|
98
|
+
return `${id}=${_nullishCoalesce(_chunkEUQEECI3cjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
99
99
|
}).join("|");
|
|
100
100
|
}
|
|
101
101
|
var cachedAdapter = null;
|
|
@@ -189,9 +189,9 @@ function useReownWallet() {
|
|
|
189
189
|
await switchChainAsync({ chainId });
|
|
190
190
|
}
|
|
191
191
|
} catch (err) {
|
|
192
|
-
if (
|
|
192
|
+
if (_chunkEUQEECI3cjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
193
193
|
throw new Error(
|
|
194
|
-
`Switch to ${
|
|
194
|
+
`Switch to ${_chunkH577RJN5cjs.getChainName.call(void 0, chainId)} in your wallet to continue`
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
197
|
throw err;
|
|
@@ -223,7 +223,7 @@ function DepositModalWithReown(props) {
|
|
|
223
223
|
reown.disconnect();
|
|
224
224
|
}, [reown.disconnect]);
|
|
225
225
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
226
|
-
|
|
226
|
+
_chunkLZDJX5MFcjs.DepositModalInner,
|
|
227
227
|
{
|
|
228
228
|
...props,
|
|
229
229
|
reownWallet: reownWithSolana,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7SWH5QF4.mjs";
|
|
4
|
+
import "./chunk-TC6345EX.mjs";
|
|
5
|
+
import "./chunk-KIHBZIYT.mjs";
|
|
6
6
|
import {
|
|
7
7
|
isUnsupportedChainSwitchError,
|
|
8
8
|
rpcUrlFor
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-AJLUXRZ3.mjs";
|
|
10
|
+
import "./chunk-FE2EJOG2.mjs";
|
|
11
|
+
import "./chunk-ILT2PITN.mjs";
|
|
12
12
|
import {
|
|
13
13
|
SUPPORTED_CHAINS,
|
|
14
14
|
getChainName
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-A223BLVC.mjs";
|
|
16
16
|
|
|
17
17
|
// src/DepositModalReown.tsx
|
|
18
18
|
import { useCallback, useMemo } from "react";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkNB2NKQTCcjs = require('./chunk-NB2NKQTC.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -34,7 +34,7 @@ var _chunkHJHXMMFAcjs = require('./chunk-HJHXMMFA.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkEUQEECI3cjs = require('./chunk-EUQEECI3.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -45,7 +45,7 @@ var _chunkRWEJQM2Kcjs = require('./chunk-RWEJQM2K.cjs');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunkH577RJN5cjs = require('./chunk-H577RJN5.cjs');
|
|
49
49
|
|
|
50
50
|
// src/WithdrawModal.tsx
|
|
51
51
|
var _react = require('react');
|
|
@@ -232,8 +232,8 @@ function WithdrawFormStep({
|
|
|
232
232
|
const publicClientChainId = _optionalChain([publicClient, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]);
|
|
233
233
|
useClickOutside(chainDropdownRef, () => setShowChainDropdown(false));
|
|
234
234
|
useClickOutside(tokenDropdownRef, () => setShowTokenDropdown(false));
|
|
235
|
-
const targetSymbol =
|
|
236
|
-
const targetChainName =
|
|
235
|
+
const targetSymbol = _chunkH577RJN5cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
236
|
+
const targetChainName = _chunkH577RJN5cjs.getChainName.call(void 0, targetChain);
|
|
237
237
|
const isBusy = submitting || isSubmitting;
|
|
238
238
|
const seededRecipientRef = _react.useRef.call(void 0, _nullishCoalesce(defaultRecipient, () => ( "")));
|
|
239
239
|
_react.useEffect.call(void 0, () => {
|
|
@@ -257,7 +257,7 @@ function WithdrawFormStep({
|
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
259
|
try {
|
|
260
|
-
const bal =
|
|
260
|
+
const bal = _chunkEUQEECI3cjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
|
|
261
261
|
address: asset.token,
|
|
262
262
|
abi: _viem.erc20Abi,
|
|
263
263
|
functionName: "balanceOf",
|
|
@@ -362,7 +362,7 @@ function WithdrawFormStep({
|
|
|
362
362
|
await onSubmit(recipient, amount);
|
|
363
363
|
} catch (err) {
|
|
364
364
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
365
|
-
setError(
|
|
365
|
+
setError(_chunkEUQEECI3cjs.formatUserError.call(void 0, raw));
|
|
366
366
|
} finally {
|
|
367
367
|
setIsSubmitting(false);
|
|
368
368
|
}
|
|
@@ -378,16 +378,16 @@ function WithdrawFormStep({
|
|
|
378
378
|
if (isBalanceLoading) {
|
|
379
379
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
380
380
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
|
|
381
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
381
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.Spinner, { className: "rs-spinner--lg" }),
|
|
382
382
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
383
383
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: "Please wait before withdrawing." })
|
|
384
384
|
] }),
|
|
385
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
385
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.PoweredBy, {})
|
|
386
386
|
] });
|
|
387
387
|
}
|
|
388
388
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
389
389
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
390
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
390
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
|
|
391
391
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
|
|
392
392
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
393
393
|
"label",
|
|
@@ -447,7 +447,7 @@ function WithdrawFormStep({
|
|
|
447
447
|
) })
|
|
448
448
|
] }),
|
|
449
449
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
450
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${
|
|
450
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunkEUQEECI3cjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
|
|
451
451
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
452
452
|
"Balance: ",
|
|
453
453
|
formattedBalance,
|
|
@@ -478,9 +478,9 @@ function WithdrawFormStep({
|
|
|
478
478
|
children: [
|
|
479
479
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
480
480
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
481
|
-
|
|
481
|
+
_chunkEUQEECI3cjs.CdnIcon,
|
|
482
482
|
{
|
|
483
|
-
src:
|
|
483
|
+
src: _chunkH577RJN5cjs.getChainIcon.call(void 0, targetChain),
|
|
484
484
|
alt: targetChainName,
|
|
485
485
|
className: "rs-withdraw-dropdown-icon"
|
|
486
486
|
}
|
|
@@ -488,7 +488,7 @@ function WithdrawFormStep({
|
|
|
488
488
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
|
|
489
489
|
] }),
|
|
490
490
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
491
|
-
|
|
491
|
+
_chunkEUQEECI3cjs.ChevronDownIcon,
|
|
492
492
|
{
|
|
493
493
|
className: "rs-withdraw-dropdown-arrow",
|
|
494
494
|
style: {
|
|
@@ -510,9 +510,9 @@ function WithdrawFormStep({
|
|
|
510
510
|
},
|
|
511
511
|
children: [
|
|
512
512
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
513
|
-
|
|
513
|
+
_chunkEUQEECI3cjs.CdnIcon,
|
|
514
514
|
{
|
|
515
|
-
src:
|
|
515
|
+
src: _chunkH577RJN5cjs.getChainIcon.call(void 0, chain.id),
|
|
516
516
|
alt: chain.name,
|
|
517
517
|
className: "rs-withdraw-dropdown-icon"
|
|
518
518
|
}
|
|
@@ -547,7 +547,7 @@ function WithdrawFormStep({
|
|
|
547
547
|
children: [
|
|
548
548
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
549
549
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
550
|
-
|
|
550
|
+
_chunkEUQEECI3cjs.TokenIcon,
|
|
551
551
|
{
|
|
552
552
|
symbol: targetSymbol,
|
|
553
553
|
className: "rs-withdraw-dropdown-icon"
|
|
@@ -556,7 +556,7 @@ function WithdrawFormStep({
|
|
|
556
556
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
|
|
557
557
|
] }),
|
|
558
558
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
559
|
-
|
|
559
|
+
_chunkEUQEECI3cjs.ChevronDownIcon,
|
|
560
560
|
{
|
|
561
561
|
className: "rs-withdraw-dropdown-arrow",
|
|
562
562
|
style: {
|
|
@@ -578,7 +578,7 @@ function WithdrawFormStep({
|
|
|
578
578
|
},
|
|
579
579
|
children: [
|
|
580
580
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
581
|
-
|
|
581
|
+
_chunkEUQEECI3cjs.TokenIcon,
|
|
582
582
|
{
|
|
583
583
|
symbol: option.symbol,
|
|
584
584
|
className: "rs-withdraw-dropdown-icon"
|
|
@@ -594,10 +594,10 @@ function WithdrawFormStep({
|
|
|
594
594
|
)
|
|
595
595
|
] })
|
|
596
596
|
] }),
|
|
597
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
598
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
597
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.Callout, { variant: "error", children: error }),
|
|
598
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.Callout, { variant: "error", children: registrationError }),
|
|
599
599
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
600
|
-
|
|
600
|
+
_chunkEUQEECI3cjs.Button,
|
|
601
601
|
{
|
|
602
602
|
onClick: handleWithdraw,
|
|
603
603
|
fullWidth: true,
|
|
@@ -607,7 +607,7 @@ function WithdrawFormStep({
|
|
|
607
607
|
}
|
|
608
608
|
)
|
|
609
609
|
] }),
|
|
610
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
610
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.PoweredBy, {})
|
|
611
611
|
] });
|
|
612
612
|
}
|
|
613
613
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -635,22 +635,22 @@ function WithdrawReviewStep({
|
|
|
635
635
|
}) {
|
|
636
636
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
637
637
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
638
|
-
const sourceChainName =
|
|
639
|
-
const sourceChainIcon =
|
|
640
|
-
const targetSymbol =
|
|
641
|
-
const targetChainName =
|
|
642
|
-
const targetChainIcon =
|
|
638
|
+
const sourceChainName = _chunkH577RJN5cjs.getChainName.call(void 0, sourceChain);
|
|
639
|
+
const sourceChainIcon = _chunkH577RJN5cjs.getChainIcon.call(void 0, sourceChain);
|
|
640
|
+
const targetSymbol = _chunkH577RJN5cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
641
|
+
const targetChainName = _chunkH577RJN5cjs.getChainName.call(void 0, targetChain);
|
|
642
|
+
const targetChainIcon = _chunkH577RJN5cjs.getChainIcon.call(void 0, targetChain);
|
|
643
643
|
const amountNumber = Number(amount);
|
|
644
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
645
|
-
const prices =
|
|
644
|
+
const formattedSendAmount = _nullishCoalesce(_chunkEUQEECI3cjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
|
|
645
|
+
const prices = _chunkNB2NKQTCcjs.useTokenPrices.call(void 0, service, [
|
|
646
646
|
{ chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
|
|
647
647
|
{ chainId: targetChain, address: targetToken, symbol: targetSymbol }
|
|
648
648
|
]);
|
|
649
|
-
const receiveDisplay = _nullishCoalesce(
|
|
649
|
+
const receiveDisplay = _nullishCoalesce(_chunkEUQEECI3cjs.formatReceiveEstimate.call(void 0, {
|
|
650
650
|
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
651
651
|
sourceSymbol,
|
|
652
652
|
targetSymbol,
|
|
653
|
-
sourceTrusted:
|
|
653
|
+
sourceTrusted: _chunkEUQEECI3cjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
|
|
654
654
|
prices
|
|
655
655
|
}), () => ( // No price for the target token — an honest dash beats a wrong number.
|
|
656
656
|
"\u2014"));
|
|
@@ -661,7 +661,7 @@ function WithdrawReviewStep({
|
|
|
661
661
|
await onConfirm();
|
|
662
662
|
} catch (err) {
|
|
663
663
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
664
|
-
const message =
|
|
664
|
+
const message = _chunkEUQEECI3cjs.formatUserError.call(void 0, raw);
|
|
665
665
|
setError(message);
|
|
666
666
|
_optionalChain([onError, 'optionalCall', _7 => _7(message, "WITHDRAW_REVIEW_ERROR")]);
|
|
667
667
|
} finally {
|
|
@@ -672,9 +672,9 @@ function WithdrawReviewStep({
|
|
|
672
672
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
673
673
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
674
674
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
675
|
-
|
|
675
|
+
_chunkEUQEECI3cjs.BodyHeader,
|
|
676
676
|
{
|
|
677
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
677
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.CircleArrowOutUpLeftIcon, {}),
|
|
678
678
|
title: "Review withdrawal"
|
|
679
679
|
}
|
|
680
680
|
),
|
|
@@ -687,14 +687,14 @@ function WithdrawReviewStep({
|
|
|
687
687
|
" ",
|
|
688
688
|
sourceSymbol
|
|
689
689
|
] }),
|
|
690
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
690
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
691
691
|
] })
|
|
692
692
|
] }),
|
|
693
693
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
694
694
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
695
695
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
696
696
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
697
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
697
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.CdnIcon, { src: sourceChainIcon }) })
|
|
698
698
|
] })
|
|
699
699
|
] }),
|
|
700
700
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -705,14 +705,14 @@ function WithdrawReviewStep({
|
|
|
705
705
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
706
706
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
707
707
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
708
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
708
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.TokenIcon, { symbol: targetSymbol }) })
|
|
709
709
|
] })
|
|
710
710
|
] }),
|
|
711
711
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
712
712
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
713
713
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
714
714
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
715
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
715
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.CdnIcon, { src: targetChainIcon }) })
|
|
716
716
|
] })
|
|
717
717
|
] }),
|
|
718
718
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -720,10 +720,10 @@ function WithdrawReviewStep({
|
|
|
720
720
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
721
721
|
] })
|
|
722
722
|
] }),
|
|
723
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
724
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
723
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.Callout, { variant: "error", children: error }),
|
|
724
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.Callout, { variant: "error", children: registrationError }),
|
|
725
725
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
726
|
-
|
|
726
|
+
_chunkEUQEECI3cjs.Button,
|
|
727
727
|
{
|
|
728
728
|
onClick: handleConfirm,
|
|
729
729
|
loading: isSubmitting,
|
|
@@ -734,7 +734,7 @@ function WithdrawReviewStep({
|
|
|
734
734
|
}
|
|
735
735
|
)
|
|
736
736
|
] }),
|
|
737
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
737
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.PoweredBy, {})
|
|
738
738
|
] });
|
|
739
739
|
}
|
|
740
740
|
WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
@@ -767,11 +767,11 @@ function WithdrawFlow({
|
|
|
767
767
|
onError,
|
|
768
768
|
debug
|
|
769
769
|
}) {
|
|
770
|
-
const rpcUrls =
|
|
771
|
-
const onStepChangeRef =
|
|
772
|
-
const onEventRef =
|
|
773
|
-
const onLifecycleRef =
|
|
774
|
-
const onErrorRef =
|
|
770
|
+
const rpcUrls = _chunkEUQEECI3cjs.useRpcUrls.call(void 0, );
|
|
771
|
+
const onStepChangeRef = _chunkEUQEECI3cjs.useLatestRef.call(void 0, onStepChange);
|
|
772
|
+
const onEventRef = _chunkEUQEECI3cjs.useLatestRef.call(void 0, onEvent);
|
|
773
|
+
const onLifecycleRef = _chunkEUQEECI3cjs.useLatestRef.call(void 0, onLifecycle);
|
|
774
|
+
const onErrorRef = _chunkEUQEECI3cjs.useLatestRef.call(void 0, onError);
|
|
775
775
|
const isFlowActiveRef = _react.useRef.call(void 0, true);
|
|
776
776
|
const submitGenerationRef = _react.useRef.call(void 0, 0);
|
|
777
777
|
_react.useEffect.call(void 0, () => {
|
|
@@ -782,13 +782,13 @@ function WithdrawFlow({
|
|
|
782
782
|
}, []);
|
|
783
783
|
const logFlow = _react.useCallback.call(void 0,
|
|
784
784
|
(message, data) => {
|
|
785
|
-
|
|
785
|
+
_chunkEUQEECI3cjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
786
786
|
},
|
|
787
787
|
[debug]
|
|
788
788
|
);
|
|
789
789
|
const logFlowError = _react.useCallback.call(void 0,
|
|
790
790
|
(message, error, data) => {
|
|
791
|
-
|
|
791
|
+
_chunkEUQEECI3cjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
792
792
|
},
|
|
793
793
|
[debug]
|
|
794
794
|
);
|
|
@@ -812,7 +812,7 @@ function WithdrawFlow({
|
|
|
812
812
|
const flowStep = useWithdrawStore((s) => s.step);
|
|
813
813
|
const reviewedRecipient = useWithdrawStore((s) => s.recipient);
|
|
814
814
|
const publicClient = _react.useMemo.call(void 0,
|
|
815
|
-
() =>
|
|
815
|
+
() => _chunkNB2NKQTCcjs.getPublicClient.call(void 0, sourceChain, rpcUrls),
|
|
816
816
|
[sourceChain, rpcUrls]
|
|
817
817
|
);
|
|
818
818
|
const recipientForRegistration = _react.useMemo.call(void 0, () => {
|
|
@@ -840,7 +840,7 @@ function WithdrawFlow({
|
|
|
840
840
|
targetToken,
|
|
841
841
|
recipient: recipientForRegistration
|
|
842
842
|
});
|
|
843
|
-
const salt =
|
|
843
|
+
const salt = _chunkNB2NKQTCcjs.deriveAccountSalt.call(void 0, {
|
|
844
844
|
recipient: recipientForRegistration,
|
|
845
845
|
targetChain,
|
|
846
846
|
targetToken
|
|
@@ -848,7 +848,7 @@ function WithdrawFlow({
|
|
|
848
848
|
const { evmDepositAddress } = await service.registerManagedAccount({
|
|
849
849
|
salt,
|
|
850
850
|
target: {
|
|
851
|
-
chain:
|
|
851
|
+
chain: _chunkH577RJN5cjs.targetChainToCaip2.call(void 0, targetChain),
|
|
852
852
|
token: targetToken,
|
|
853
853
|
recipient: recipientForRegistration
|
|
854
854
|
}
|
|
@@ -870,7 +870,7 @@ function WithdrawFlow({
|
|
|
870
870
|
} catch (err) {
|
|
871
871
|
if (cancelled) return;
|
|
872
872
|
const raw = err instanceof Error ? err.message : "Registration failed";
|
|
873
|
-
const message =
|
|
873
|
+
const message = _chunkEUQEECI3cjs.formatUserError.call(void 0, raw);
|
|
874
874
|
logFlowError("auto-register:failed", err, {
|
|
875
875
|
accountAddress,
|
|
876
876
|
targetChain,
|
|
@@ -901,10 +901,10 @@ function WithdrawFlow({
|
|
|
901
901
|
onErrorRef
|
|
902
902
|
]);
|
|
903
903
|
const asset = _react.useMemo.call(void 0, () => {
|
|
904
|
-
const symbol =
|
|
905
|
-
const decimals =
|
|
904
|
+
const symbol = _chunkH577RJN5cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
905
|
+
const decimals = _chunkH577RJN5cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
906
906
|
return {
|
|
907
|
-
id:
|
|
907
|
+
id: _chunkEUQEECI3cjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
908
908
|
chainId: sourceChain,
|
|
909
909
|
token: sourceToken,
|
|
910
910
|
symbol,
|
|
@@ -912,7 +912,7 @@ function WithdrawFlow({
|
|
|
912
912
|
decimals
|
|
913
913
|
};
|
|
914
914
|
}, [sourceChain, sourceToken]);
|
|
915
|
-
const isSourceNative = sourceToken.toLowerCase() ===
|
|
915
|
+
const isSourceNative = sourceToken.toLowerCase() === _chunkH577RJN5cjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
916
916
|
const isSameRoute = targetChain === sourceChain && targetToken.toLowerCase() === sourceToken.toLowerCase();
|
|
917
917
|
const reviewedTarget = reviewedRecipient ? {
|
|
918
918
|
chain: targetChain,
|
|
@@ -937,8 +937,8 @@ function WithdrawFlow({
|
|
|
937
937
|
}
|
|
938
938
|
if (lastStepOpenEventKeyRef.current === "form") return;
|
|
939
939
|
lastStepOpenEventKeyRef.current = "form";
|
|
940
|
-
const tokenSymbol =
|
|
941
|
-
const chainName =
|
|
940
|
+
const tokenSymbol = _chunkH577RJN5cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
941
|
+
const chainName = _chunkH577RJN5cjs.getChainName.call(void 0, targetChain);
|
|
942
942
|
_optionalChain([onEventRef, 'access', _20 => _20.current, 'optionalCall', _21 => _21({
|
|
943
943
|
type: "withdraw_modal_select_amount_open",
|
|
944
944
|
pred_balance: totalBalanceUsd,
|
|
@@ -973,8 +973,8 @@ function WithdrawFlow({
|
|
|
973
973
|
);
|
|
974
974
|
const handleFormContinue = _react.useCallback.call(void 0,
|
|
975
975
|
(recipient, amountValue) => {
|
|
976
|
-
const tokenSymbol =
|
|
977
|
-
const chainName =
|
|
976
|
+
const tokenSymbol = _chunkH577RJN5cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
977
|
+
const chainName = _chunkH577RJN5cjs.getChainName.call(void 0, targetChain);
|
|
978
978
|
_optionalChain([onEventRef, 'access', _24 => _24.current, 'optionalCall', _25 => _25({
|
|
979
979
|
type: "withdraw_modal_select_amount_cta_click",
|
|
980
980
|
pred_balance: totalBalanceUsd,
|
|
@@ -1084,7 +1084,7 @@ function WithdrawFlow({
|
|
|
1084
1084
|
targetChain,
|
|
1085
1085
|
targetToken
|
|
1086
1086
|
});
|
|
1087
|
-
handleError(
|
|
1087
|
+
handleError(_chunkEUQEECI3cjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1088
1088
|
throw err;
|
|
1089
1089
|
}
|
|
1090
1090
|
},
|
|
@@ -1138,13 +1138,13 @@ function WithdrawFlow({
|
|
|
1138
1138
|
[logFlowError, onLifecycleRef, storeApi]
|
|
1139
1139
|
);
|
|
1140
1140
|
const targetChainOptions = _react.useMemo.call(void 0,
|
|
1141
|
-
() =>
|
|
1142
|
-
(chain) =>
|
|
1141
|
+
() => _chunkH577RJN5cjs.SOURCE_CHAINS.filter(
|
|
1142
|
+
(chain) => _chunkH577RJN5cjs.getSupportedTargetTokens.call(void 0, chain.id).length > 0
|
|
1143
1143
|
),
|
|
1144
1144
|
[]
|
|
1145
1145
|
);
|
|
1146
1146
|
const targetTokenOptions = _react.useMemo.call(void 0,
|
|
1147
|
-
() =>
|
|
1147
|
+
() => _chunkH577RJN5cjs.getSupportedTargetTokens.call(void 0, targetChain),
|
|
1148
1148
|
[targetChain]
|
|
1149
1149
|
);
|
|
1150
1150
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1157,7 +1157,7 @@ function WithdrawFlow({
|
|
|
1157
1157
|
const handleTargetChainChange = _react.useCallback.call(void 0,
|
|
1158
1158
|
(chainId) => {
|
|
1159
1159
|
setTargetChain(chainId);
|
|
1160
|
-
const options =
|
|
1160
|
+
const options = _chunkH577RJN5cjs.getSupportedTargetTokens.call(void 0, chainId);
|
|
1161
1161
|
if (options.length === 0) return;
|
|
1162
1162
|
const currentlySupported = options.some(
|
|
1163
1163
|
(option) => option.address.toLowerCase() === targetToken.toLowerCase()
|
|
@@ -1214,7 +1214,7 @@ function WithdrawFlow({
|
|
|
1214
1214
|
}
|
|
1215
1215
|
),
|
|
1216
1216
|
stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1217
|
-
|
|
1217
|
+
_chunkNB2NKQTCcjs.ProcessingStep,
|
|
1218
1218
|
{
|
|
1219
1219
|
smartAccount: _nullishCoalesce(storeApi.getState().processingSmartAccount, () => ( (registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0"))),
|
|
1220
1220
|
txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
|
|
@@ -1284,22 +1284,22 @@ function WithdrawModal({
|
|
|
1284
1284
|
// one only ever applied to the deposit flow.
|
|
1285
1285
|
...removedProps
|
|
1286
1286
|
}) {
|
|
1287
|
-
|
|
1288
|
-
|
|
1287
|
+
_chunkNB2NKQTCcjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
|
|
1288
|
+
_chunkEUQEECI3cjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
|
|
1289
1289
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1290
|
-
const onReadyRef =
|
|
1290
|
+
const onReadyRef = _chunkEUQEECI3cjs.useLatestRef.call(void 0, onReady);
|
|
1291
1291
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
1292
1292
|
void 0
|
|
1293
1293
|
);
|
|
1294
|
-
const targetChain =
|
|
1295
|
-
const sourceChain =
|
|
1296
|
-
const rpcUrls =
|
|
1294
|
+
const targetChain = _chunkH577RJN5cjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
|
|
1295
|
+
const sourceChain = _chunkH577RJN5cjs.getChainId.call(void 0, sourceChainProp);
|
|
1296
|
+
const rpcUrls = _chunkEUQEECI3cjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
1297
1297
|
const service = _react.useMemo.call(void 0,
|
|
1298
|
-
() =>
|
|
1298
|
+
() => _chunkEUQEECI3cjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1299
1299
|
[backendUrl, debug]
|
|
1300
1300
|
);
|
|
1301
1301
|
const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
|
|
1302
|
-
const onErrorRef =
|
|
1302
|
+
const onErrorRef = _chunkEUQEECI3cjs.useLatestRef.call(void 0, onError);
|
|
1303
1303
|
_react.useEffect.call(void 0, () => {
|
|
1304
1304
|
if (isOpen && typeof onSendTransaction !== "function") {
|
|
1305
1305
|
_optionalChain([onErrorRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34({
|
|
@@ -1310,7 +1310,7 @@ function WithdrawModal({
|
|
|
1310
1310
|
}, [isOpen, onSendTransaction, onErrorRef]);
|
|
1311
1311
|
_react.useEffect.call(void 0, () => {
|
|
1312
1312
|
if (isOpen && modalRef.current) {
|
|
1313
|
-
|
|
1313
|
+
_chunkEUQEECI3cjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1314
1314
|
}
|
|
1315
1315
|
}, [isOpen, theme]);
|
|
1316
1316
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1328,8 +1328,8 @@ function WithdrawModal({
|
|
|
1328
1328
|
}, []);
|
|
1329
1329
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _37 => _37.showBackButton]), () => ( true));
|
|
1330
1330
|
const canGoBack = backHandler !== void 0;
|
|
1331
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1332
|
-
|
|
1331
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1332
|
+
_chunkEUQEECI3cjs.Modal,
|
|
1333
1333
|
{
|
|
1334
1334
|
isOpen,
|
|
1335
1335
|
onClose,
|
|
@@ -1345,7 +1345,7 @@ function WithdrawModal({
|
|
|
1345
1345
|
className: "rs-modal-header-back",
|
|
1346
1346
|
"aria-label": "Go back",
|
|
1347
1347
|
onClick: backHandler,
|
|
1348
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1348
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.ChevronLeftIcon, {})
|
|
1349
1349
|
}
|
|
1350
1350
|
) }),
|
|
1351
1351
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1355,7 +1355,7 @@ function WithdrawModal({
|
|
|
1355
1355
|
onClick: onClose,
|
|
1356
1356
|
className: "rs-modal-close",
|
|
1357
1357
|
"aria-label": "Close",
|
|
1358
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1358
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEUQEECI3cjs.CloseIcon, {})
|
|
1359
1359
|
}
|
|
1360
1360
|
) })
|
|
1361
1361
|
] }),
|