@rhinestone/deposit-modal 0.19.0 → 0.20.0
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 +151 -61
- package/dist/BankOnrampStep-JG32OCM2.mjs +435 -0
- package/dist/BankOnrampStep-NPGXAA7U.cjs +435 -0
- package/dist/{DepositModalReown-XBNY6QCI.mjs → DepositModalReown-3FGTPER6.mjs} +6 -5
- package/dist/{DepositModalReown-UITYXJ6W.cjs → DepositModalReown-ALVWADG7.cjs} +21 -20
- package/dist/WithdrawModal-5YWFJSYY.cjs +12 -0
- package/dist/WithdrawModal-LL4Z5WZP.mjs +12 -0
- package/dist/{bearer-transport-CVHNBgoV.d.cts → bearer-transport-DZyeDG64.d.cts} +5 -1
- package/dist/{bearer-transport-CVHNBgoV.d.ts → bearer-transport-DZyeDG64.d.ts} +5 -1
- package/dist/{caip-BMi-9t09.d.cts → caip-nwFFL46o.d.cts} +2 -2
- package/dist/{caip-BMi-9t09.d.ts → caip-nwFFL46o.d.ts} +2 -2
- package/dist/{chunk-NITKDXHR.mjs → chunk-247GJH57.mjs} +480 -272
- package/dist/{chunk-FTWKAJGN.mjs → chunk-2FOPO4N5.mjs} +1 -1
- package/dist/{chunk-5NWLS5BQ.mjs → chunk-32ERBFMO.mjs} +1432 -961
- package/dist/chunk-5QUWEFD4.mjs +19 -0
- package/dist/chunk-6CTJFR3T.mjs +113 -0
- package/dist/{chunk-X6N2XPTO.mjs → chunk-B2LZQIGB.mjs} +1 -1
- package/dist/{chunk-EG4H7OMC.cjs → chunk-BTEG2VNZ.cjs} +171 -130
- package/dist/{chunk-HMUGY66O.cjs → chunk-CXRH5MKO.cjs} +1502 -1031
- package/dist/chunk-E7IMWVMN.mjs +346 -0
- package/dist/{chunk-PYOC6K24.cjs → chunk-EKFXUF5A.cjs} +1 -1
- package/dist/chunk-FKJ6EJHH.cjs +346 -0
- package/dist/chunk-FMUSY563.cjs +19 -0
- package/dist/{chunk-LVCD6RHF.cjs → chunk-FVJKUTHF.cjs} +2 -2
- package/dist/chunk-G264OM23.cjs +224 -0
- package/dist/{chunk-BIL4ENC3.mjs → chunk-HP7S7AD6.mjs} +73 -32
- package/dist/{chunk-ISLVD5HQ.cjs → chunk-OPT5EW6L.cjs} +10 -5
- package/dist/chunk-PYRXOP2Y.cjs +113 -0
- package/dist/{chunk-ZGHVJ2XM.mjs → chunk-XBJCZYBX.mjs} +8 -3
- package/dist/chunk-YY4ZOAH5.mjs +224 -0
- package/dist/{chunk-OCWSMLOP.cjs → chunk-Z4RBTNKX.cjs} +980 -772
- package/dist/compliance.cjs +4 -7
- package/dist/compliance.d.cts +26 -3
- package/dist/compliance.d.ts +26 -3
- package/dist/compliance.mjs +6 -9
- package/dist/constants-BQDxVNgr.d.cts +29 -0
- package/dist/constants-DjGQW5N5.d.ts +29 -0
- package/dist/constants.cjs +3 -37
- package/dist/constants.d.cts +4 -20
- package/dist/constants.d.ts +4 -20
- package/dist/constants.mjs +4 -38
- package/dist/deposit.cjs +7 -6
- package/dist/deposit.d.cts +5 -3
- package/dist/deposit.d.ts +5 -3
- package/dist/deposit.mjs +6 -5
- package/dist/embed.cjs +21 -20
- package/dist/embed.d.cts +3 -2
- package/dist/embed.d.ts +3 -2
- package/dist/embed.mjs +7 -6
- package/dist/index.cjs +8 -35
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.mjs +9 -36
- package/dist/onramp.cjs +4 -33
- package/dist/onramp.d.cts +51 -33
- package/dist/onramp.d.ts +51 -33
- package/dist/onramp.mjs +5 -34
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +2 -2
- package/dist/ramp-types-HYWd7CW0.d.cts +108 -0
- package/dist/ramp-types-HYWd7CW0.d.ts +108 -0
- package/dist/styles.css +255 -0
- package/dist/{types-BShYNpvO.d.cts → types-BxSrazbq.d.ts} +20 -2
- package/dist/{types-BOxa1DE-.d.ts → types-CixUBhrM.d.cts} +20 -2
- package/dist/withdraw.cjs +6 -5
- package/dist/withdraw.d.cts +4 -3
- package/dist/withdraw.d.ts +4 -3
- package/dist/withdraw.mjs +5 -4
- package/package.json +9 -17
- package/dist/WithdrawModal-DY6A55OA.mjs +0 -11
- package/dist/WithdrawModal-V42OK7L3.cjs +0 -11
- package/dist/chunk-ADEWTBSN.cjs +0 -19
- package/dist/chunk-EAGMY3QE.mjs +0 -962
- package/dist/chunk-OY5N3E6L.cjs +0 -962
- package/dist/chunk-PP4QE32S.mjs +0 -19
- package/dist/constants-BT4ctuHo.d.cts +0 -64
- package/dist/constants-D21ZdNOP.d.ts +0 -64
- package/dist/offramp.cjs +0 -25
- package/dist/offramp.d.cts +0 -28
- package/dist/offramp.d.ts +0 -28
- package/dist/offramp.mjs +0 -25
- package/dist/ramp-types-C6aUz4SZ.d.cts +0 -43
- package/dist/ramp-types-C6aUz4SZ.d.ts +0 -43
|
@@ -40,20 +40,23 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
var _chunkCXRH5MKOcjs = require('./chunk-CXRH5MKO.cjs');
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
var _chunkHMUGY66Ocjs = require('./chunk-HMUGY66O.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
+
var _chunkG264OM23cjs = require('./chunk-G264OM23.cjs');
|
|
52
53
|
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
var _chunkFKJ6EJHHcjs = require('./chunk-FKJ6EJHH.cjs');
|
|
57
60
|
|
|
58
61
|
// src/WithdrawModal.tsx
|
|
59
62
|
var _react = require('react');
|
|
@@ -223,10 +226,12 @@ function WithdrawFormStep({
|
|
|
223
226
|
submitting = false,
|
|
224
227
|
registrationPending = false,
|
|
225
228
|
registrationError = null,
|
|
229
|
+
decimalsStatus = "ready",
|
|
226
230
|
onRecipientChange,
|
|
227
231
|
onSubmit,
|
|
228
232
|
onFriction
|
|
229
233
|
}) {
|
|
234
|
+
const decimalsReady = decimalsStatus === "ready";
|
|
230
235
|
const [recipient, setRecipient] = _react.useState.call(void 0, _nullishCoalesce(defaultRecipient, () => ( "")));
|
|
231
236
|
const [amount, setAmount] = _react.useState.call(void 0, _nullishCoalesce(defaultAmount, () => ( "")));
|
|
232
237
|
const [balance, setBalance] = _react.useState.call(void 0, null);
|
|
@@ -238,11 +243,15 @@ function WithdrawFormStep({
|
|
|
238
243
|
const chainDropdownRef = _react.useRef.call(void 0, null);
|
|
239
244
|
const tokenDropdownRef = _react.useRef.call(void 0, null);
|
|
240
245
|
const publicClientChainId = _optionalChain([publicClient, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]);
|
|
241
|
-
const onFrictionRef =
|
|
246
|
+
const onFrictionRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onFriction);
|
|
242
247
|
useClickOutside(chainDropdownRef, () => setShowChainDropdown(false));
|
|
243
248
|
useClickOutside(tokenDropdownRef, () => setShowTokenDropdown(false));
|
|
244
|
-
const
|
|
245
|
-
|
|
249
|
+
const offeredTarget = targetTokenOptions.find(
|
|
250
|
+
(option) => option.address.toLowerCase() === targetToken.toLowerCase()
|
|
251
|
+
);
|
|
252
|
+
const resolvedTargetSymbol = _chunkCXRH5MKOcjs.useTokenDisplay.call(void 0, targetChain, targetToken).symbol;
|
|
253
|
+
const targetSymbol = _nullishCoalesce(_optionalChain([offeredTarget, 'optionalAccess', _3 => _3.symbol]), () => ( resolvedTargetSymbol));
|
|
254
|
+
const targetChainName = _chunkFKJ6EJHHcjs.getChainName.call(void 0, targetChain);
|
|
246
255
|
const isBusy = submitting || isSubmitting;
|
|
247
256
|
const seededRecipientRef = _react.useRef.call(void 0, _nullishCoalesce(defaultRecipient, () => ( "")));
|
|
248
257
|
_react.useEffect.call(void 0, () => {
|
|
@@ -266,7 +275,7 @@ function WithdrawFormStep({
|
|
|
266
275
|
return;
|
|
267
276
|
}
|
|
268
277
|
try {
|
|
269
|
-
const bal =
|
|
278
|
+
const bal = _chunkCXRH5MKOcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
|
|
270
279
|
address: asset.token,
|
|
271
280
|
abi: _viem.erc20Abi,
|
|
272
281
|
functionName: "balanceOf",
|
|
@@ -279,7 +288,7 @@ function WithdrawFormStep({
|
|
|
279
288
|
} catch (e2) {
|
|
280
289
|
if (active) {
|
|
281
290
|
setBalance(null);
|
|
282
|
-
_optionalChain([onFrictionRef, 'access',
|
|
291
|
+
_optionalChain([onFrictionRef, 'access', _4 => _4.current, 'optionalCall', _5 => _5("wallet_balance_unavailable")]);
|
|
283
292
|
timeoutId = setTimeout(fetchBalance, retryDelayMs);
|
|
284
293
|
retryDelayMs = Math.min(Math.round(retryDelayMs * 1.5), 3e4);
|
|
285
294
|
}
|
|
@@ -297,6 +306,7 @@ function WithdrawFormStep({
|
|
|
297
306
|
}, [accountAddress, publicClient, publicClientChainId, asset, onFrictionRef]);
|
|
298
307
|
const formattedBalance = _react.useMemo.call(void 0, () => {
|
|
299
308
|
if (balance === null) return "...";
|
|
309
|
+
if (!decimalsReady) return "\u2014";
|
|
300
310
|
try {
|
|
301
311
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
302
312
|
const numeric = Number(raw);
|
|
@@ -307,10 +317,10 @@ function WithdrawFormStep({
|
|
|
307
317
|
} catch (e3) {
|
|
308
318
|
return "...";
|
|
309
319
|
}
|
|
310
|
-
}, [balance, asset.decimals]);
|
|
320
|
+
}, [balance, asset.decimals, decimalsReady]);
|
|
311
321
|
_react.useEffect.call(void 0, () => {
|
|
312
322
|
if (targetTokenOptions.length > 0 || !recipient || !amount) return;
|
|
313
|
-
_optionalChain([onFrictionRef, 'access',
|
|
323
|
+
_optionalChain([onFrictionRef, 'access', _6 => _6.current, 'optionalCall', _7 => _7("route_target_tokens_unavailable")]);
|
|
314
324
|
}, [targetTokenOptions.length, recipient, amount, onFrictionRef]);
|
|
315
325
|
const amountUsd = _react.useMemo.call(void 0, () => {
|
|
316
326
|
if (!amount) return null;
|
|
@@ -323,29 +333,30 @@ function WithdrawFormStep({
|
|
|
323
333
|
return null;
|
|
324
334
|
}, [amount, asset.symbol]);
|
|
325
335
|
const handleMaxClick = _react.useCallback.call(void 0, () => {
|
|
326
|
-
if (balance === null) return;
|
|
336
|
+
if (balance === null || !decimalsReady) return;
|
|
327
337
|
const maxAmount = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
328
338
|
setAmount(maxAmount);
|
|
329
339
|
setError(null);
|
|
330
|
-
}, [balance, asset.decimals]);
|
|
340
|
+
}, [balance, asset.decimals, decimalsReady]);
|
|
331
341
|
const handleWithdraw = _react.useCallback.call(void 0, async () => {
|
|
342
|
+
if (!decimalsReady) return;
|
|
332
343
|
if (!recipient || !/^0x[a-fA-F0-9]{40}$/.test(recipient)) {
|
|
333
344
|
setError("Enter a valid recipient address");
|
|
334
|
-
_optionalChain([onFriction, 'optionalCall',
|
|
345
|
+
_optionalChain([onFriction, 'optionalCall', _8 => _8("recipient_invalid")]);
|
|
335
346
|
return;
|
|
336
347
|
}
|
|
337
348
|
const lowerRecipient = recipient.toLowerCase();
|
|
338
|
-
if (lowerRecipient === accountAddress.toLowerCase() || lowerRecipient === _optionalChain([depositAddress, 'optionalAccess',
|
|
349
|
+
if (lowerRecipient === accountAddress.toLowerCase() || lowerRecipient === _optionalChain([depositAddress, 'optionalAccess', _9 => _9.toLowerCase, 'call', _10 => _10()])) {
|
|
339
350
|
setError(
|
|
340
351
|
"Recipient can't be your own account. Send to a different wallet."
|
|
341
352
|
);
|
|
342
|
-
_optionalChain([onFriction, 'optionalCall',
|
|
353
|
+
_optionalChain([onFriction, 'optionalCall', _11 => _11("recipient_not_allowed")]);
|
|
343
354
|
return;
|
|
344
355
|
}
|
|
345
356
|
const parsed = Number(amount);
|
|
346
357
|
if (!amount || !Number.isFinite(parsed) || parsed <= 0) {
|
|
347
358
|
setError("Enter a valid amount");
|
|
348
|
-
_optionalChain([onFriction, 'optionalCall',
|
|
359
|
+
_optionalChain([onFriction, 'optionalCall', _12 => _12("amount_invalid")]);
|
|
349
360
|
return;
|
|
350
361
|
}
|
|
351
362
|
if (balance !== null) {
|
|
@@ -353,12 +364,12 @@ function WithdrawFormStep({
|
|
|
353
364
|
const amountInUnits = _viem.parseUnits.call(void 0, amount, asset.decimals);
|
|
354
365
|
if (amountInUnits > balance) {
|
|
355
366
|
setError("Insufficient balance");
|
|
356
|
-
_optionalChain([onFriction, 'optionalCall',
|
|
367
|
+
_optionalChain([onFriction, 'optionalCall', _13 => _13("amount_insufficient_balance")]);
|
|
357
368
|
return;
|
|
358
369
|
}
|
|
359
370
|
} catch (e4) {
|
|
360
371
|
setError("Invalid amount");
|
|
361
|
-
_optionalChain([onFriction, 'optionalCall',
|
|
372
|
+
_optionalChain([onFriction, 'optionalCall', _14 => _14("amount_invalid")]);
|
|
362
373
|
return;
|
|
363
374
|
}
|
|
364
375
|
}
|
|
@@ -368,7 +379,7 @@ function WithdrawFormStep({
|
|
|
368
379
|
await onSubmit(recipient, amount);
|
|
369
380
|
} catch (err) {
|
|
370
381
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
371
|
-
setError(
|
|
382
|
+
setError(_chunkCXRH5MKOcjs.formatUserError.call(void 0, raw));
|
|
372
383
|
} finally {
|
|
373
384
|
setIsSubmitting(false);
|
|
374
385
|
}
|
|
@@ -377,6 +388,7 @@ function WithdrawFormStep({
|
|
|
377
388
|
amount,
|
|
378
389
|
balance,
|
|
379
390
|
asset.decimals,
|
|
391
|
+
decimalsReady,
|
|
380
392
|
accountAddress,
|
|
381
393
|
depositAddress,
|
|
382
394
|
onSubmit,
|
|
@@ -385,16 +397,16 @@ function WithdrawFormStep({
|
|
|
385
397
|
if (isBalanceLoading) {
|
|
386
398
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
387
399
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
|
|
388
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
400
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.Spinner, { className: "rs-spinner--lg" }),
|
|
389
401
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
390
402
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: "Please wait before withdrawing." })
|
|
391
403
|
] }),
|
|
392
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
404
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.PoweredBy, {})
|
|
393
405
|
] });
|
|
394
406
|
}
|
|
395
407
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
396
408
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
397
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
409
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
|
|
398
410
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
|
|
399
411
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
400
412
|
"label",
|
|
@@ -415,7 +427,7 @@ function WithdrawFormStep({
|
|
|
415
427
|
onChange: (e) => {
|
|
416
428
|
const next = e.target.value.trim();
|
|
417
429
|
setRecipient(next);
|
|
418
|
-
_optionalChain([onRecipientChange, 'optionalCall',
|
|
430
|
+
_optionalChain([onRecipientChange, 'optionalCall', _15 => _15(next)]);
|
|
419
431
|
if (error) setError(null);
|
|
420
432
|
}
|
|
421
433
|
}
|
|
@@ -448,13 +460,13 @@ function WithdrawFormStep({
|
|
|
448
460
|
type: "button",
|
|
449
461
|
className: "rs-withdraw-max-btn",
|
|
450
462
|
onClick: handleMaxClick,
|
|
451
|
-
disabled: balance === null,
|
|
463
|
+
disabled: balance === null || !decimalsReady,
|
|
452
464
|
children: "Max"
|
|
453
465
|
}
|
|
454
466
|
) })
|
|
455
467
|
] }),
|
|
456
468
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
457
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${
|
|
469
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunkCXRH5MKOcjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
|
|
458
470
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
459
471
|
"Balance: ",
|
|
460
472
|
formattedBalance,
|
|
@@ -485,9 +497,9 @@ function WithdrawFormStep({
|
|
|
485
497
|
children: [
|
|
486
498
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
487
499
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
488
|
-
|
|
500
|
+
_chunkCXRH5MKOcjs.CdnIcon,
|
|
489
501
|
{
|
|
490
|
-
src:
|
|
502
|
+
src: _chunkFKJ6EJHHcjs.getChainIcon.call(void 0, targetChain),
|
|
491
503
|
alt: targetChainName,
|
|
492
504
|
className: "rs-withdraw-dropdown-icon"
|
|
493
505
|
}
|
|
@@ -495,7 +507,7 @@ function WithdrawFormStep({
|
|
|
495
507
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
|
|
496
508
|
] }),
|
|
497
509
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
498
|
-
|
|
510
|
+
_chunkG264OM23cjs.ChevronDownIcon,
|
|
499
511
|
{
|
|
500
512
|
className: "rs-withdraw-dropdown-arrow",
|
|
501
513
|
style: {
|
|
@@ -517,9 +529,9 @@ function WithdrawFormStep({
|
|
|
517
529
|
},
|
|
518
530
|
children: [
|
|
519
531
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
520
|
-
|
|
532
|
+
_chunkCXRH5MKOcjs.CdnIcon,
|
|
521
533
|
{
|
|
522
|
-
src:
|
|
534
|
+
src: _chunkFKJ6EJHHcjs.getChainIcon.call(void 0, chain.id),
|
|
523
535
|
alt: chain.name,
|
|
524
536
|
className: "rs-withdraw-dropdown-icon"
|
|
525
537
|
}
|
|
@@ -554,8 +566,9 @@ function WithdrawFormStep({
|
|
|
554
566
|
children: [
|
|
555
567
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
556
568
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
557
|
-
|
|
569
|
+
_chunkCXRH5MKOcjs.TokenIcon,
|
|
558
570
|
{
|
|
571
|
+
token: { chain: targetChain, address: targetToken },
|
|
559
572
|
symbol: targetSymbol,
|
|
560
573
|
className: "rs-withdraw-dropdown-icon"
|
|
561
574
|
}
|
|
@@ -563,7 +576,7 @@ function WithdrawFormStep({
|
|
|
563
576
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
|
|
564
577
|
] }),
|
|
565
578
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
566
|
-
|
|
579
|
+
_chunkG264OM23cjs.ChevronDownIcon,
|
|
567
580
|
{
|
|
568
581
|
className: "rs-withdraw-dropdown-arrow",
|
|
569
582
|
style: {
|
|
@@ -585,8 +598,9 @@ function WithdrawFormStep({
|
|
|
585
598
|
},
|
|
586
599
|
children: [
|
|
587
600
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
588
|
-
|
|
601
|
+
_chunkCXRH5MKOcjs.TokenIcon,
|
|
589
602
|
{
|
|
603
|
+
token: { chain: targetChain, address: option.address },
|
|
590
604
|
symbol: option.symbol,
|
|
591
605
|
className: "rs-withdraw-dropdown-icon"
|
|
592
606
|
}
|
|
@@ -601,25 +615,26 @@ function WithdrawFormStep({
|
|
|
601
615
|
)
|
|
602
616
|
] })
|
|
603
617
|
] }),
|
|
604
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
605
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
618
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.Callout, { variant: "error", children: error }),
|
|
619
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.Callout, { variant: "error", children: registrationError }),
|
|
620
|
+
decimalsStatus === "unresolved" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.Callout, { variant: "error", children: "This token's decimals couldn't be determined, so this withdrawal can't be prepared." }),
|
|
606
621
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
607
|
-
|
|
622
|
+
_chunkCXRH5MKOcjs.Button,
|
|
608
623
|
{
|
|
609
624
|
onClick: handleWithdraw,
|
|
610
625
|
fullWidth: true,
|
|
611
626
|
loading: isBusy,
|
|
612
|
-
disabled: !recipient || !amount || isBusy || Boolean(registrationError) || // No token list for the selected chain yet. A destination published
|
|
627
|
+
disabled: !recipient || !amount || isBusy || !decimalsReady || Boolean(registrationError) || // No token list for the selected chain yet. A destination published
|
|
613
628
|
// at runtime becomes selectable as soon as `/chains` resolves, which
|
|
614
629
|
// can precede its addresses; submitting in that window would send
|
|
615
630
|
// the previously selected chain's token address to a chain it does
|
|
616
631
|
// not exist on.
|
|
617
632
|
targetTokenOptions.length === 0,
|
|
618
|
-
children: isBusy ? "Preparing..." : registrationPending ? "Preparing session..." : targetTokenOptions.length === 0 ? "Loading tokens..." : !recipient ? "Enter Recipient Address" : !amount ? "Enter Withdraw Amount" : "Withdraw"
|
|
633
|
+
children: isBusy ? "Preparing..." : decimalsStatus === "pending" ? "Loading token..." : registrationPending ? "Preparing session..." : targetTokenOptions.length === 0 ? "Loading tokens..." : !recipient ? "Enter Recipient Address" : !amount ? "Enter Withdraw Amount" : "Withdraw"
|
|
619
634
|
}
|
|
620
635
|
)
|
|
621
636
|
] }),
|
|
622
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
637
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.PoweredBy, {})
|
|
623
638
|
] });
|
|
624
639
|
}
|
|
625
640
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -641,7 +656,7 @@ function WithdrawReviewStep({
|
|
|
641
656
|
estimatedTime = "< 1 min",
|
|
642
657
|
registrationPending = false,
|
|
643
658
|
registrationError = null,
|
|
644
|
-
|
|
659
|
+
targetSymbol: offeredTargetSymbol,
|
|
645
660
|
onSubmittingChange,
|
|
646
661
|
onConfirm,
|
|
647
662
|
onError
|
|
@@ -651,25 +666,29 @@ function WithdrawReviewStep({
|
|
|
651
666
|
const onSubmittingChangeRef = _react.useRef.call(void 0, onSubmittingChange);
|
|
652
667
|
onSubmittingChangeRef.current = onSubmittingChange;
|
|
653
668
|
_react.useEffect.call(void 0, () => {
|
|
654
|
-
_optionalChain([onSubmittingChangeRef, 'access',
|
|
655
|
-
return () => _optionalChain([onSubmittingChangeRef, 'access',
|
|
669
|
+
_optionalChain([onSubmittingChangeRef, 'access', _16 => _16.current, 'optionalCall', _17 => _17(isSubmitting)]);
|
|
670
|
+
return () => _optionalChain([onSubmittingChangeRef, 'access', _18 => _18.current, 'optionalCall', _19 => _19(false)]);
|
|
656
671
|
}, [isSubmitting]);
|
|
657
|
-
const sourceChainName =
|
|
658
|
-
const sourceChainIcon =
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
|
|
672
|
+
const sourceChainName = _chunkFKJ6EJHHcjs.getChainName.call(void 0, sourceChain);
|
|
673
|
+
const sourceChainIcon = _chunkFKJ6EJHHcjs.getChainIcon.call(void 0, sourceChain);
|
|
674
|
+
const [sourceDisplay, targetDisplay] = _chunkCXRH5MKOcjs.useTokenDisplays.call(void 0, [
|
|
675
|
+
{ chain: sourceChain, address: sourceToken },
|
|
676
|
+
{ chain: targetChain, address: targetToken }
|
|
677
|
+
]);
|
|
678
|
+
const targetSymbol = _nullishCoalesce(offeredTargetSymbol, () => ( targetDisplay.symbol));
|
|
679
|
+
const targetChainName = _chunkFKJ6EJHHcjs.getChainName.call(void 0, targetChain);
|
|
680
|
+
const targetChainIcon = _chunkFKJ6EJHHcjs.getChainIcon.call(void 0, targetChain);
|
|
662
681
|
const amountNumber = Number(amount);
|
|
663
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
664
|
-
const prices =
|
|
682
|
+
const formattedSendAmount = _nullishCoalesce(_chunkCXRH5MKOcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
|
|
683
|
+
const prices = _chunkCXRH5MKOcjs.useTokenPrices.call(void 0, [
|
|
665
684
|
{ chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
|
|
666
685
|
{ chainId: targetChain, address: targetToken, symbol: targetSymbol }
|
|
667
686
|
]);
|
|
668
|
-
const receiveDisplay = _nullishCoalesce(
|
|
687
|
+
const receiveDisplay = _nullishCoalesce(_chunkCXRH5MKOcjs.formatReceiveEstimate.call(void 0, {
|
|
669
688
|
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
670
689
|
sourceSymbol,
|
|
671
690
|
targetSymbol,
|
|
672
|
-
sourceTrusted:
|
|
691
|
+
sourceTrusted: sourceDisplay.curated,
|
|
673
692
|
prices
|
|
674
693
|
}), () => ( // No price for the target token — an honest dash beats a wrong number.
|
|
675
694
|
"\u2014"));
|
|
@@ -681,11 +700,11 @@ function WithdrawReviewStep({
|
|
|
681
700
|
await onConfirm();
|
|
682
701
|
} catch (err) {
|
|
683
702
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
684
|
-
const uncertain =
|
|
685
|
-
const message = uncertain ? "Withdrawal status is uncertain. Check your activity before trying again." :
|
|
703
|
+
const uncertain = _chunkCXRH5MKOcjs.isSubmissionUncertain.call(void 0, err);
|
|
704
|
+
const message = uncertain ? "Withdrawal status is uncertain. Check your activity before trying again." : _chunkCXRH5MKOcjs.formatUserError.call(void 0, raw);
|
|
686
705
|
if (uncertain) setSubmissionUncertain(true);
|
|
687
706
|
setError(message);
|
|
688
|
-
_optionalChain([onError, 'optionalCall',
|
|
707
|
+
_optionalChain([onError, 'optionalCall', _20 => _20(message, "WITHDRAW_REVIEW_ERROR", raw)]);
|
|
689
708
|
} finally {
|
|
690
709
|
setIsSubmitting(false);
|
|
691
710
|
}
|
|
@@ -694,9 +713,9 @@ function WithdrawReviewStep({
|
|
|
694
713
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
695
714
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
696
715
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
697
|
-
|
|
716
|
+
_chunkG264OM23cjs.BodyHeader,
|
|
698
717
|
{
|
|
699
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
718
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.CircleArrowOutUpLeftIcon, {}),
|
|
700
719
|
title: "Review withdrawal"
|
|
701
720
|
}
|
|
702
721
|
),
|
|
@@ -709,14 +728,20 @@ function WithdrawReviewStep({
|
|
|
709
728
|
" ",
|
|
710
729
|
sourceSymbol
|
|
711
730
|
] }),
|
|
712
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
731
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
732
|
+
_chunkCXRH5MKOcjs.TokenIcon,
|
|
733
|
+
{
|
|
734
|
+
token: { chain: sourceChain, address: sourceToken },
|
|
735
|
+
symbol: sourceSymbol
|
|
736
|
+
}
|
|
737
|
+
) })
|
|
713
738
|
] })
|
|
714
739
|
] }),
|
|
715
740
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
716
741
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
717
742
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
718
743
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
719
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
744
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
720
745
|
] })
|
|
721
746
|
] }),
|
|
722
747
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -727,14 +752,20 @@ function WithdrawReviewStep({
|
|
|
727
752
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
728
753
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
729
754
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
730
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
755
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
756
|
+
_chunkCXRH5MKOcjs.TokenIcon,
|
|
757
|
+
{
|
|
758
|
+
token: { chain: targetChain, address: targetToken },
|
|
759
|
+
symbol: targetSymbol
|
|
760
|
+
}
|
|
761
|
+
) })
|
|
731
762
|
] })
|
|
732
763
|
] }),
|
|
733
764
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
734
765
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
735
766
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
736
767
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
737
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
768
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.CdnIcon, { src: targetChainIcon }) })
|
|
738
769
|
] })
|
|
739
770
|
] }),
|
|
740
771
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -742,10 +773,10 @@ function WithdrawReviewStep({
|
|
|
742
773
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
743
774
|
] })
|
|
744
775
|
] }),
|
|
745
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
746
|
-
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
776
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.Callout, { variant: "error", children: error }),
|
|
777
|
+
!error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.Callout, { variant: "error", children: registrationError }),
|
|
747
778
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
748
|
-
|
|
779
|
+
_chunkCXRH5MKOcjs.Button,
|
|
749
780
|
{
|
|
750
781
|
onClick: handleConfirm,
|
|
751
782
|
loading: isSubmitting,
|
|
@@ -756,7 +787,7 @@ function WithdrawReviewStep({
|
|
|
756
787
|
}
|
|
757
788
|
)
|
|
758
789
|
] }),
|
|
759
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
790
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.PoweredBy, {})
|
|
760
791
|
] });
|
|
761
792
|
}
|
|
762
793
|
WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
@@ -772,7 +803,7 @@ WithdrawReviewStep.displayName = "WithdrawReviewStep";
|
|
|
772
803
|
|
|
773
804
|
|
|
774
805
|
function withdrawFailureReasonForError(error) {
|
|
775
|
-
if (
|
|
806
|
+
if (_chunkCXRH5MKOcjs.isSubmissionUncertain.call(void 0, error)) return "submission_uncertain";
|
|
776
807
|
const message = (error instanceof Error ? error.message : String(_nullishCoalesce(error, () => ( "")))).toLowerCase();
|
|
777
808
|
if (message.includes("changed before submission")) {
|
|
778
809
|
return "registration_target_changed";
|
|
@@ -931,7 +962,7 @@ function WithdrawAnalyticsControllerProvider({
|
|
|
931
962
|
children,
|
|
932
963
|
controllerRef
|
|
933
964
|
}) {
|
|
934
|
-
const emit =
|
|
965
|
+
const emit = _chunkCXRH5MKOcjs.useWithdrawAnalyticsEmitter.call(void 0, );
|
|
935
966
|
const controller = _react.useMemo.call(void 0,
|
|
936
967
|
() => createWithdrawAnalyticsController(emit),
|
|
937
968
|
[emit]
|
|
@@ -950,7 +981,7 @@ var REGISTRATION_DEBOUNCE_MS = 600;
|
|
|
950
981
|
var WITHDRAW_INDEXING_DELAY_MS = 2e3;
|
|
951
982
|
function targetsEqual(a, b) {
|
|
952
983
|
if (!a) return false;
|
|
953
|
-
return a.chain === b.chain && a.token.toLowerCase() === b.token.toLowerCase() && (_nullishCoalesce(_optionalChain([a, 'access',
|
|
984
|
+
return a.chain === b.chain && a.token.toLowerCase() === b.token.toLowerCase() && (_nullishCoalesce(_optionalChain([a, 'access', _21 => _21.recipient, 'optionalAccess', _22 => _22.toLowerCase, 'call', _23 => _23()]), () => ( ""))) === (_nullishCoalesce(_optionalChain([b, 'access', _24 => _24.recipient, 'optionalAccess', _25 => _25.toLowerCase, 'call', _26 => _26()]), () => ( "")));
|
|
954
985
|
}
|
|
955
986
|
function WithdrawFlow({
|
|
956
987
|
accountAddress,
|
|
@@ -971,11 +1002,11 @@ function WithdrawFlow({
|
|
|
971
1002
|
onError,
|
|
972
1003
|
debug
|
|
973
1004
|
}) {
|
|
974
|
-
const rpcUrls =
|
|
975
|
-
const onStepChangeRef =
|
|
1005
|
+
const rpcUrls = _chunkCXRH5MKOcjs.useRpcUrls.call(void 0, );
|
|
1006
|
+
const onStepChangeRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onStepChange);
|
|
976
1007
|
const analytics = useWithdrawAnalyticsController();
|
|
977
|
-
const onLifecycleRef =
|
|
978
|
-
const onErrorRef =
|
|
1008
|
+
const onLifecycleRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onLifecycle);
|
|
1009
|
+
const onErrorRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onError);
|
|
979
1010
|
const isFlowActiveRef = _react.useRef.call(void 0, true);
|
|
980
1011
|
const submitGenerationRef = _react.useRef.call(void 0, 0);
|
|
981
1012
|
const lastSubmitFailureRef = _react.useRef.call(void 0,
|
|
@@ -989,13 +1020,13 @@ function WithdrawFlow({
|
|
|
989
1020
|
}, []);
|
|
990
1021
|
const logFlow = _react.useCallback.call(void 0,
|
|
991
1022
|
(message, data) => {
|
|
992
|
-
|
|
1023
|
+
_chunkCXRH5MKOcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
993
1024
|
},
|
|
994
1025
|
[debug]
|
|
995
1026
|
);
|
|
996
1027
|
const logFlowError = _react.useCallback.call(void 0,
|
|
997
1028
|
(message, error, data) => {
|
|
998
|
-
|
|
1029
|
+
_chunkCXRH5MKOcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
999
1030
|
},
|
|
1000
1031
|
[debug]
|
|
1001
1032
|
);
|
|
@@ -1017,18 +1048,18 @@ function WithdrawFlow({
|
|
|
1017
1048
|
const registration = useWithdrawStore((s) => s.registration);
|
|
1018
1049
|
const flowStep = useWithdrawStore((s) => s.step);
|
|
1019
1050
|
const reviewedRecipient = useWithdrawStore((s) => s.recipient);
|
|
1020
|
-
const publicClient =
|
|
1051
|
+
const publicClient = _chunkCXRH5MKOcjs.useReadClient.call(void 0, sourceChain, rpcUrls);
|
|
1021
1052
|
const recipientForRegistration = _react.useMemo.call(void 0, () => {
|
|
1022
1053
|
if (!recipientInput) return void 0;
|
|
1023
1054
|
return ADDR_REGEX.test(recipientInput) ? recipientInput : void 0;
|
|
1024
1055
|
}, [recipientInput]);
|
|
1025
|
-
const onDestinationChangeRef =
|
|
1056
|
+
const onDestinationChangeRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onDestinationChange);
|
|
1026
1057
|
const reportedDestinationRef = _react.useRef.call(void 0, void 0);
|
|
1027
1058
|
_react.useEffect.call(void 0, () => {
|
|
1028
1059
|
if (reportedDestinationRef.current === recipientForRegistration) return;
|
|
1029
1060
|
const report = () => {
|
|
1030
1061
|
reportedDestinationRef.current = recipientForRegistration;
|
|
1031
|
-
_optionalChain([onDestinationChangeRef, 'access',
|
|
1062
|
+
_optionalChain([onDestinationChangeRef, 'access', _27 => _27.current, 'optionalCall', _28 => _28(recipientForRegistration)]);
|
|
1032
1063
|
};
|
|
1033
1064
|
if (!reportedDestinationRef.current) {
|
|
1034
1065
|
report();
|
|
@@ -1058,7 +1089,7 @@ function WithdrawFlow({
|
|
|
1058
1089
|
targetToken,
|
|
1059
1090
|
recipient: recipientForRegistration
|
|
1060
1091
|
});
|
|
1061
|
-
const salt =
|
|
1092
|
+
const salt = _chunkCXRH5MKOcjs.deriveAccountSalt.call(void 0, {
|
|
1062
1093
|
recipient: recipientForRegistration,
|
|
1063
1094
|
targetChain,
|
|
1064
1095
|
targetToken
|
|
@@ -1066,7 +1097,7 @@ function WithdrawFlow({
|
|
|
1066
1097
|
const { evmDepositAddress } = await service.registerManagedAccount({
|
|
1067
1098
|
salt,
|
|
1068
1099
|
target: {
|
|
1069
|
-
chain:
|
|
1100
|
+
chain: _chunkFKJ6EJHHcjs.targetChainToCaip2.call(void 0, targetChain),
|
|
1070
1101
|
token: targetToken,
|
|
1071
1102
|
recipient: recipientForRegistration
|
|
1072
1103
|
}
|
|
@@ -1080,7 +1111,7 @@ function WithdrawFlow({
|
|
|
1080
1111
|
smartAccount: evmDepositAddress,
|
|
1081
1112
|
registeredTarget: desiredTarget
|
|
1082
1113
|
});
|
|
1083
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
1114
|
+
_optionalChain([onLifecycleRef, 'access', _29 => _29.current, 'optionalCall', _30 => _30({
|
|
1084
1115
|
type: "connected",
|
|
1085
1116
|
address: accountAddress,
|
|
1086
1117
|
smartAccount: evmDepositAddress
|
|
@@ -1088,7 +1119,7 @@ function WithdrawFlow({
|
|
|
1088
1119
|
} catch (err) {
|
|
1089
1120
|
if (cancelled) return;
|
|
1090
1121
|
const raw = err instanceof Error ? err.message : "Registration failed";
|
|
1091
|
-
const message =
|
|
1122
|
+
const message = _chunkCXRH5MKOcjs.formatUserError.call(void 0, raw);
|
|
1092
1123
|
logFlowError("auto-register:failed", err, {
|
|
1093
1124
|
accountAddress,
|
|
1094
1125
|
targetChain,
|
|
@@ -1098,7 +1129,7 @@ function WithdrawFlow({
|
|
|
1098
1129
|
type: "registration/failed",
|
|
1099
1130
|
error: message
|
|
1100
1131
|
});
|
|
1101
|
-
_optionalChain([onErrorRef, 'access',
|
|
1132
|
+
_optionalChain([onErrorRef, 'access', _31 => _31.current, 'optionalCall', _32 => _32({ message, code: "WITHDRAW_REGISTER_FAILED" })]);
|
|
1102
1133
|
}
|
|
1103
1134
|
}, REGISTRATION_DEBOUNCE_MS);
|
|
1104
1135
|
return () => {
|
|
@@ -1118,19 +1149,22 @@ function WithdrawFlow({
|
|
|
1118
1149
|
onLifecycleRef,
|
|
1119
1150
|
onErrorRef
|
|
1120
1151
|
]);
|
|
1152
|
+
const sourceDisplay = _chunkCXRH5MKOcjs.useTokenDisplay.call(void 0, sourceChain, sourceToken);
|
|
1153
|
+
const { isLoading: catalogLoading } = _chunkCXRH5MKOcjs.useChainCatalog.call(void 0, );
|
|
1154
|
+
const decimalsStatus = sourceDisplay.decimals !== void 0 ? "ready" : sourceDisplay.pending || catalogLoading ? "pending" : "unresolved";
|
|
1121
1155
|
const asset = _react.useMemo.call(void 0, () => {
|
|
1122
|
-
const symbol =
|
|
1123
|
-
const decimals = _chunkOY5N3E6Lcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
1156
|
+
const symbol = sourceDisplay.symbol;
|
|
1124
1157
|
return {
|
|
1125
|
-
id:
|
|
1158
|
+
id: _chunkCXRH5MKOcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1126
1159
|
chainId: sourceChain,
|
|
1127
1160
|
token: sourceToken,
|
|
1128
1161
|
symbol,
|
|
1129
1162
|
name: symbol,
|
|
1130
|
-
|
|
1163
|
+
// Only read once `decimalsStatus` is ready; the form is blocked before.
|
|
1164
|
+
decimals: _nullishCoalesce(sourceDisplay.decimals, () => ( 0))
|
|
1131
1165
|
};
|
|
1132
|
-
}, [sourceChain, sourceToken]);
|
|
1133
|
-
const isSourceNative = sourceToken.toLowerCase() ===
|
|
1166
|
+
}, [sourceChain, sourceToken, sourceDisplay.symbol, sourceDisplay.decimals]);
|
|
1167
|
+
const isSourceNative = sourceToken.toLowerCase() === _chunkFKJ6EJHHcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
1134
1168
|
const isSameRoute = targetChain === sourceChain && targetToken.toLowerCase() === sourceToken.toLowerCase();
|
|
1135
1169
|
const reviewedTarget = reviewedRecipient ? {
|
|
1136
1170
|
chain: targetChain,
|
|
@@ -1149,7 +1183,7 @@ function WithdrawFlow({
|
|
|
1149
1183
|
storeApi.dispatch({ type: "review/back" });
|
|
1150
1184
|
}, [analytics, storeApi]);
|
|
1151
1185
|
_react.useEffect.call(void 0, () => {
|
|
1152
|
-
_optionalChain([onStepChangeRef, 'access',
|
|
1186
|
+
_optionalChain([onStepChangeRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34(
|
|
1153
1187
|
flowStep === "review" ? reviewBackHandler : void 0,
|
|
1154
1188
|
flowStep
|
|
1155
1189
|
)]);
|
|
@@ -1191,7 +1225,7 @@ function WithdrawFlow({
|
|
|
1191
1225
|
analytics.friction("processor_status_poll_failed", "processing");
|
|
1192
1226
|
}
|
|
1193
1227
|
logFlowError("flow:error", _nullishCoalesce(cause, () => ( message)), { code });
|
|
1194
|
-
_optionalChain([onErrorRef, 'access',
|
|
1228
|
+
_optionalChain([onErrorRef, 'access', _35 => _35.current, 'optionalCall', _36 => _36({ message, code, cause })]);
|
|
1195
1229
|
},
|
|
1196
1230
|
[analytics, logFlowError, onErrorRef]
|
|
1197
1231
|
);
|
|
@@ -1262,6 +1296,9 @@ function WithdrawFlow({
|
|
|
1262
1296
|
targetChain,
|
|
1263
1297
|
targetToken
|
|
1264
1298
|
});
|
|
1299
|
+
if (decimalsStatus !== "ready") {
|
|
1300
|
+
throw new Error("Token decimals are unknown");
|
|
1301
|
+
}
|
|
1265
1302
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1266
1303
|
const result = await onSendTransaction({
|
|
1267
1304
|
chainId: sourceChain,
|
|
@@ -1273,7 +1310,7 @@ function WithdrawFlow({
|
|
|
1273
1310
|
if (!getMatchingRegistration()) {
|
|
1274
1311
|
throw new Error("Withdrawal target changed before submission");
|
|
1275
1312
|
}
|
|
1276
|
-
if (!_optionalChain([result, 'optionalAccess',
|
|
1313
|
+
if (!_optionalChain([result, 'optionalAccess', _37 => _37.txHash])) {
|
|
1277
1314
|
throw new Error("onSendTransaction did not return a txHash");
|
|
1278
1315
|
}
|
|
1279
1316
|
analytics.handoff(
|
|
@@ -1292,7 +1329,7 @@ function WithdrawFlow({
|
|
|
1292
1329
|
sourceChain,
|
|
1293
1330
|
sourceToken
|
|
1294
1331
|
});
|
|
1295
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
1332
|
+
_optionalChain([onLifecycleRef, 'access', _38 => _38.current, 'optionalCall', _39 => _39({
|
|
1296
1333
|
type: "submitted",
|
|
1297
1334
|
txHash: result.txHash,
|
|
1298
1335
|
sourceChain,
|
|
@@ -1320,7 +1357,7 @@ function WithdrawFlow({
|
|
|
1320
1357
|
targetChain,
|
|
1321
1358
|
targetToken
|
|
1322
1359
|
});
|
|
1323
|
-
handleError(
|
|
1360
|
+
handleError(_chunkCXRH5MKOcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1324
1361
|
throw err;
|
|
1325
1362
|
}
|
|
1326
1363
|
},
|
|
@@ -1329,6 +1366,7 @@ function WithdrawFlow({
|
|
|
1329
1366
|
targetChain,
|
|
1330
1367
|
targetToken,
|
|
1331
1368
|
asset.decimals,
|
|
1369
|
+
decimalsStatus,
|
|
1332
1370
|
accountAddress,
|
|
1333
1371
|
sourceToken,
|
|
1334
1372
|
sourceChain,
|
|
@@ -1346,7 +1384,7 @@ function WithdrawFlow({
|
|
|
1346
1384
|
analytics.openStep("processing");
|
|
1347
1385
|
analytics.outcome("completed");
|
|
1348
1386
|
logFlow("withdraw:complete", { txHash, destinationTxHash, ...context });
|
|
1349
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
1387
|
+
_optionalChain([onLifecycleRef, 'access', _40 => _40.current, 'optionalCall', _41 => _41({
|
|
1350
1388
|
type: "complete",
|
|
1351
1389
|
txHash,
|
|
1352
1390
|
destinationTxHash,
|
|
@@ -1370,7 +1408,7 @@ function WithdrawFlow({
|
|
|
1370
1408
|
analytics.outcome("failed");
|
|
1371
1409
|
analytics.failure("processor_failed", false, "processing");
|
|
1372
1410
|
logFlowError("withdraw:failed", error, { txHash });
|
|
1373
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
1411
|
+
_optionalChain([onLifecycleRef, 'access', _42 => _42.current, 'optionalCall', _43 => _43({
|
|
1374
1412
|
type: "failed",
|
|
1375
1413
|
txHash,
|
|
1376
1414
|
error
|
|
@@ -1379,8 +1417,8 @@ function WithdrawFlow({
|
|
|
1379
1417
|
},
|
|
1380
1418
|
[analytics, logFlowError, onLifecycleRef, storeApi]
|
|
1381
1419
|
);
|
|
1382
|
-
const targetChainOptions =
|
|
1383
|
-
const targetTokensFor =
|
|
1420
|
+
const targetChainOptions = _chunkCXRH5MKOcjs.useDestinationChains.call(void 0, );
|
|
1421
|
+
const targetTokensFor = _chunkCXRH5MKOcjs.useTargetTokens.call(void 0, );
|
|
1384
1422
|
const targetTokenOptions = _react.useMemo.call(void 0,
|
|
1385
1423
|
() => targetTokensFor(targetChain),
|
|
1386
1424
|
[targetChain, targetTokensFor]
|
|
@@ -1435,6 +1473,7 @@ function WithdrawFlow({
|
|
|
1435
1473
|
onTargetTokenChange: handleTargetTokenChange,
|
|
1436
1474
|
registrationPending: registration.kind === "pending" || registration.kind === "stale",
|
|
1437
1475
|
registrationError: registration.kind === "failed" ? registration.error : null,
|
|
1476
|
+
decimalsStatus,
|
|
1438
1477
|
onRecipientChange: setRecipientInput,
|
|
1439
1478
|
onSubmit: async (r, a) => handleFormContinue(r, a),
|
|
1440
1479
|
onFriction: handleFormFriction
|
|
@@ -1450,7 +1489,9 @@ function WithdrawFlow({
|
|
|
1450
1489
|
targetToken,
|
|
1451
1490
|
amount: _nullishCoalesce(storeApi.getState().amount, () => ( "0")),
|
|
1452
1491
|
recipient: _nullishCoalesce(_nullishCoalesce(storeApi.getState().recipient, () => ( recipientForRegistration)), () => ( "0x0")),
|
|
1453
|
-
|
|
1492
|
+
targetSymbol: _optionalChain([targetTokenOptions, 'access', _44 => _44.find, 'call', _45 => _45(
|
|
1493
|
+
(option) => option.address.toLowerCase() === targetToken.toLowerCase()
|
|
1494
|
+
), 'optionalAccess', _46 => _46.symbol]),
|
|
1454
1495
|
registrationPending: registration.kind === "pending" || registration.kind === "stale" || !isReviewedTargetReady,
|
|
1455
1496
|
registrationError: registration.kind === "failed" ? registration.error : null,
|
|
1456
1497
|
onSubmittingChange,
|
|
@@ -1459,7 +1500,7 @@ function WithdrawFlow({
|
|
|
1459
1500
|
}
|
|
1460
1501
|
),
|
|
1461
1502
|
stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1462
|
-
|
|
1503
|
+
_chunkCXRH5MKOcjs.ProcessingStep,
|
|
1463
1504
|
{
|
|
1464
1505
|
smartAccount: _nullishCoalesce(storeApi.getState().processingSmartAccount, () => ( (registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0"))),
|
|
1465
1506
|
txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
|
|
@@ -1529,7 +1570,7 @@ function buildWithdrawAnalyticsSessionProperties({
|
|
|
1529
1570
|
recipient: recipient !== void 0,
|
|
1530
1571
|
amount: defaultAmount !== void 0
|
|
1531
1572
|
},
|
|
1532
|
-
...
|
|
1573
|
+
..._chunkCXRH5MKOcjs.analyticsTargetProperties.call(void 0, {
|
|
1533
1574
|
targetChain: seedTargetChain,
|
|
1534
1575
|
targetToken: seedTargetToken
|
|
1535
1576
|
})
|
|
@@ -1570,10 +1611,10 @@ function WithdrawModal({
|
|
|
1570
1611
|
onUiState,
|
|
1571
1612
|
...removedProps
|
|
1572
1613
|
}) {
|
|
1573
|
-
|
|
1574
|
-
|
|
1614
|
+
_chunkCXRH5MKOcjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
|
|
1615
|
+
_chunkCXRH5MKOcjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
|
|
1575
1616
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1576
|
-
const onReadyRef =
|
|
1617
|
+
const onReadyRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onReady);
|
|
1577
1618
|
const analyticsControllerRef = _react.useRef.call(void 0,
|
|
1578
1619
|
null
|
|
1579
1620
|
);
|
|
@@ -1587,23 +1628,23 @@ function WithdrawModal({
|
|
|
1587
1628
|
const [historyRecipient, setHistoryRecipient] = _react.useState.call(void 0,
|
|
1588
1629
|
recipient
|
|
1589
1630
|
);
|
|
1590
|
-
const onUiStateRef =
|
|
1591
|
-
const targetChain =
|
|
1592
|
-
const sourceChain =
|
|
1593
|
-
const rpcUrls =
|
|
1631
|
+
const onUiStateRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onUiState);
|
|
1632
|
+
const targetChain = _chunkFKJ6EJHHcjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
|
|
1633
|
+
const sourceChain = _chunkFKJ6EJHHcjs.getChainId.call(void 0, sourceChainProp);
|
|
1634
|
+
const rpcUrls = _chunkCXRH5MKOcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
1594
1635
|
const service = _react.useMemo.call(void 0,
|
|
1595
|
-
() =>
|
|
1636
|
+
() => _chunkCXRH5MKOcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1596
1637
|
[backendUrl, debug]
|
|
1597
1638
|
);
|
|
1598
1639
|
const historyAnalytics = _react.useMemo.call(void 0,
|
|
1599
|
-
() =>
|
|
1640
|
+
() => _chunkCXRH5MKOcjs.createHistoryAnalytics.call(void 0, {
|
|
1600
1641
|
modal: "withdraw",
|
|
1601
1642
|
controllerRef: analyticsControllerRef,
|
|
1602
1643
|
sessionIdRef: analyticsSessionIdRef
|
|
1603
1644
|
}),
|
|
1604
1645
|
[]
|
|
1605
1646
|
);
|
|
1606
|
-
const history =
|
|
1647
|
+
const history = _chunkCXRH5MKOcjs.useHistoryPanel.call(void 0, {
|
|
1607
1648
|
isOpen,
|
|
1608
1649
|
recipient: historyRecipient,
|
|
1609
1650
|
service,
|
|
@@ -1611,20 +1652,20 @@ function WithdrawModal({
|
|
|
1611
1652
|
analytics: historyAnalytics
|
|
1612
1653
|
});
|
|
1613
1654
|
const { markStale: markHistoryStale, recoverySubmitting } = history;
|
|
1614
|
-
const historyButtonVisible =
|
|
1655
|
+
const historyButtonVisible = _chunkCXRH5MKOcjs.isHistoryEntryVisible.call(void 0, {
|
|
1615
1656
|
screen,
|
|
1616
1657
|
submitting,
|
|
1617
1658
|
settled: false
|
|
1618
1659
|
});
|
|
1619
1660
|
const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
|
|
1620
|
-
const onErrorRef =
|
|
1661
|
+
const onErrorRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onError);
|
|
1621
1662
|
_react.useEffect.call(void 0, () => {
|
|
1622
1663
|
if (isOpen && typeof onSendTransaction !== "function") {
|
|
1623
|
-
_optionalChain([onErrorRef, 'access',
|
|
1664
|
+
_optionalChain([onErrorRef, 'access', _47 => _47.current, 'optionalCall', _48 => _48({
|
|
1624
1665
|
message: "WithdrawModal requires an `onSendTransaction` function.",
|
|
1625
1666
|
code: "WITHDRAW_MISSING_SEND_TRANSACTION"
|
|
1626
1667
|
})]);
|
|
1627
|
-
_optionalChain([analyticsControllerRef, 'access',
|
|
1668
|
+
_optionalChain([analyticsControllerRef, 'access', _49 => _49.current, 'optionalAccess', _50 => _50.failure, 'call', _51 => _51(
|
|
1628
1669
|
"submission_handler_missing",
|
|
1629
1670
|
false,
|
|
1630
1671
|
"form"
|
|
@@ -1635,8 +1676,8 @@ function WithdrawModal({
|
|
|
1635
1676
|
(source) => {
|
|
1636
1677
|
if (submitting || recoverySubmitting) return;
|
|
1637
1678
|
const analytics = analyticsControllerRef.current;
|
|
1638
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
1639
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
1679
|
+
_optionalChain([analytics, 'optionalAccess', _52 => _52.abandon, 'call', _53 => _53("modal_close")]);
|
|
1680
|
+
_optionalChain([analytics, 'optionalAccess', _54 => _54.close, 'call', _55 => _55(source)]);
|
|
1640
1681
|
onClose();
|
|
1641
1682
|
},
|
|
1642
1683
|
[onClose, submitting, recoverySubmitting]
|
|
@@ -1652,18 +1693,18 @@ function WithdrawModal({
|
|
|
1652
1693
|
_react.useEffect.call(void 0, () => {
|
|
1653
1694
|
if (previousOpenRef.current && !isOpen) {
|
|
1654
1695
|
const analytics = analyticsControllerRef.current;
|
|
1655
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
1656
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
1696
|
+
_optionalChain([analytics, 'optionalAccess', _56 => _56.abandon, 'call', _57 => _57("modal_close")]);
|
|
1697
|
+
_optionalChain([analytics, 'optionalAccess', _58 => _58.close, 'call', _59 => _59("host_controlled")]);
|
|
1657
1698
|
}
|
|
1658
1699
|
previousOpenRef.current = isOpen;
|
|
1659
1700
|
}, [isOpen]);
|
|
1660
1701
|
_react.useEffect.call(void 0, () => {
|
|
1661
1702
|
if (!isOpen || !modalRef.current) return;
|
|
1662
|
-
return
|
|
1703
|
+
return _chunkCXRH5MKOcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1663
1704
|
}, [isOpen, theme]);
|
|
1664
1705
|
_react.useEffect.call(void 0, () => {
|
|
1665
1706
|
if (isOpen) {
|
|
1666
|
-
_optionalChain([onReadyRef, 'access',
|
|
1707
|
+
_optionalChain([onReadyRef, 'access', _60 => _60.current, 'optionalCall', _61 => _61()]);
|
|
1667
1708
|
}
|
|
1668
1709
|
}, [isOpen, onReadyRef]);
|
|
1669
1710
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1677,7 +1718,7 @@ function WithdrawModal({
|
|
|
1677
1718
|
if (next) setScreen(next);
|
|
1678
1719
|
}, []);
|
|
1679
1720
|
_react.useEffect.call(void 0, () => {
|
|
1680
|
-
_optionalChain([onUiStateRef, 'access',
|
|
1721
|
+
_optionalChain([onUiStateRef, 'access', _62 => _62.current, 'optionalCall', _63 => _63({
|
|
1681
1722
|
screen,
|
|
1682
1723
|
back: backHandler,
|
|
1683
1724
|
// A transfer or a recovery in flight is a submission whose outcome is
|
|
@@ -1685,10 +1726,10 @@ function WithdrawModal({
|
|
|
1685
1726
|
submitting: submitting || recoverySubmitting
|
|
1686
1727
|
})]);
|
|
1687
1728
|
}, [screen, backHandler, submitting, recoverySubmitting, onUiStateRef]);
|
|
1688
|
-
const onLifecycleRef =
|
|
1729
|
+
const onLifecycleRef = _chunkG264OM23cjs.useLatestRef.call(void 0, onLifecycle);
|
|
1689
1730
|
const handleLifecycle = _react.useCallback.call(void 0,
|
|
1690
1731
|
(event) => {
|
|
1691
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
1732
|
+
_optionalChain([onLifecycleRef, 'access', _64 => _64.current, 'optionalCall', _65 => _65(event)]);
|
|
1692
1733
|
if (event.type === "submitted" || event.type === "complete" || event.type === "failed") {
|
|
1693
1734
|
markHistoryStale();
|
|
1694
1735
|
}
|
|
@@ -1705,10 +1746,10 @@ function WithdrawModal({
|
|
|
1705
1746
|
seedTargetChain: targetChain,
|
|
1706
1747
|
seedTargetToken: _nullishCoalesce(targetToken, () => ( sourceToken))
|
|
1707
1748
|
});
|
|
1708
|
-
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
1749
|
+
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _66 => _66.showBackButton]), () => ( true));
|
|
1709
1750
|
const canGoBack = backHandler !== void 0 && !submitting;
|
|
1710
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1711
|
-
|
|
1751
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXRH5MKOcjs.AssetMetadataProvider, { service, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1752
|
+
_chunkCXRH5MKOcjs.Modal,
|
|
1712
1753
|
{
|
|
1713
1754
|
isOpen,
|
|
1714
1755
|
onClose: handleModalDismiss,
|
|
@@ -1717,7 +1758,7 @@ function WithdrawModal({
|
|
|
1717
1758
|
closeOnOverlayClick,
|
|
1718
1759
|
ariaLabel: "Withdraw",
|
|
1719
1760
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1720
|
-
|
|
1761
|
+
_chunkCXRH5MKOcjs.AnalyticsSession,
|
|
1721
1762
|
{
|
|
1722
1763
|
modal: "withdraw",
|
|
1723
1764
|
sessionProperties: analyticsSessionProperties,
|
|
@@ -1739,12 +1780,12 @@ function WithdrawModal({
|
|
|
1739
1780
|
className: "rs-modal-header-back",
|
|
1740
1781
|
"aria-label": "Go back",
|
|
1741
1782
|
onClick: backHandler,
|
|
1742
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1783
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.ChevronLeftIcon, {})
|
|
1743
1784
|
}
|
|
1744
1785
|
) }),
|
|
1745
1786
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
|
|
1746
1787
|
historyButtonVisible && historyRecipient && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1747
|
-
|
|
1788
|
+
_chunkCXRH5MKOcjs.HistoryEntryButton,
|
|
1748
1789
|
{
|
|
1749
1790
|
badge: history.badge,
|
|
1750
1791
|
onClick: history.openPanel
|
|
@@ -1757,7 +1798,7 @@ function WithdrawModal({
|
|
|
1757
1798
|
onClick: () => closeWithSource("header_button"),
|
|
1758
1799
|
className: "rs-modal-close",
|
|
1759
1800
|
"aria-label": "Close",
|
|
1760
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1801
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkG264OM23cjs.CloseIcon, {})
|
|
1761
1802
|
}
|
|
1762
1803
|
)
|
|
1763
1804
|
] })
|
|
@@ -1785,7 +1826,7 @@ function WithdrawModal({
|
|
|
1785
1826
|
}
|
|
1786
1827
|
),
|
|
1787
1828
|
history.isPanelOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1788
|
-
|
|
1829
|
+
_chunkCXRH5MKOcjs.HistoryOverlay,
|
|
1789
1830
|
{
|
|
1790
1831
|
controller: history,
|
|
1791
1832
|
backLabel: "Withdraw",
|
|
@@ -1810,7 +1851,7 @@ function WithdrawModal({
|
|
|
1810
1851
|
}
|
|
1811
1852
|
)
|
|
1812
1853
|
}
|
|
1813
|
-
) }) }) });
|
|
1854
|
+
) }) }) }) });
|
|
1814
1855
|
}
|
|
1815
1856
|
|
|
1816
1857
|
|