@rhinestone/deposit-modal 0.1.36 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-25YB4LPZ.mjs → DepositModalReown-BJWM3JMC.mjs} +3 -3
- package/dist/{DepositModalReown-TLKQ7Y4X.cjs → DepositModalReown-M6GRPFJW.cjs} +4 -4
- package/dist/{WithdrawModalReown-BYOEPR3E.cjs → WithdrawModalReown-OGPBUDZU.cjs} +4 -4
- package/dist/{WithdrawModalReown-4AKKZCLY.mjs → WithdrawModalReown-OIG2DANP.mjs} +3 -3
- package/dist/{chunk-YCXVHPGZ.cjs → chunk-4ZOF4A2N.cjs} +160 -140
- package/dist/{chunk-DL5M5QZZ.mjs → chunk-7HJ7TUHX.mjs} +27 -7
- package/dist/{chunk-N2SJUU4I.cjs → chunk-G4EYX7SO.cjs} +75 -59
- package/dist/{chunk-S4UBVD3H.cjs → chunk-HYUITBRV.cjs} +23 -7
- package/dist/{chunk-YIHOACM3.cjs → chunk-NULE6WII.cjs} +26 -26
- package/dist/{chunk-G6YFXESU.mjs → chunk-P7B7B6LU.mjs} +26 -10
- package/dist/{chunk-DLFUXLAM.mjs → chunk-UBPIPY3L.mjs} +1 -1
- package/dist/{chunk-C6I5TFSL.mjs → chunk-ZL4KPLWE.mjs} +23 -7
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +4 -4
- package/dist/reown.cjs +5 -5
- package/dist/reown.mjs +4 -4
- package/dist/styles.css +24 -0
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.mjs +3 -3
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkNULE6WIIcjs = require('./chunk-NULE6WII.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -37,7 +37,7 @@ var _chunkYIHOACM3cjs = require('./chunk-YIHOACM3.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkHYUITBRVcjs = require('./chunk-HYUITBRV.cjs');
|
|
41
41
|
|
|
42
42
|
// src/DepositModal.tsx
|
|
43
43
|
|
|
@@ -57,15 +57,15 @@ var _react = require('react');
|
|
|
57
57
|
|
|
58
58
|
var _jsxruntime = require('react/jsx-runtime');
|
|
59
59
|
async function resolveSessionOwner(eoaAddress) {
|
|
60
|
-
const localOwner =
|
|
60
|
+
const localOwner = _chunkNULE6WIIcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
61
61
|
if (localOwner) {
|
|
62
62
|
return {
|
|
63
|
-
account:
|
|
63
|
+
account: _chunkNULE6WIIcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
64
64
|
address: localOwner.address
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
const created =
|
|
68
|
-
|
|
67
|
+
const created = _chunkNULE6WIIcjs.createSessionOwnerKey.call(void 0, );
|
|
68
|
+
_chunkNULE6WIIcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
69
69
|
return {
|
|
70
70
|
account: created.account,
|
|
71
71
|
address: created.address
|
|
@@ -127,7 +127,7 @@ function SetupStep({
|
|
|
127
127
|
primaryType: typedData.primaryType,
|
|
128
128
|
message: typedData.message
|
|
129
129
|
});
|
|
130
|
-
const sessionDetails =
|
|
130
|
+
const sessionDetails = _chunkNULE6WIIcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
|
|
131
131
|
setState({ type: "registering" });
|
|
132
132
|
await service.registerAccount({
|
|
133
133
|
address: smartAccount,
|
|
@@ -198,7 +198,7 @@ function SetupStep({
|
|
|
198
198
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
199
199
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
|
|
200
200
|
isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
201
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
201
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
|
|
202
202
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
|
|
203
203
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
|
|
204
204
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
|
|
@@ -235,7 +235,7 @@ function SetupStep({
|
|
|
235
235
|
] })
|
|
236
236
|
] })
|
|
237
237
|
] }),
|
|
238
|
-
isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
238
|
+
isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
|
|
239
239
|
] });
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -259,7 +259,7 @@ function AssetSelectStep({
|
|
|
259
259
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
260
260
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
261
261
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
262
|
-
return
|
|
262
|
+
return _chunkNULE6WIIcjs.getAssetId.call(void 0, {
|
|
263
263
|
chainId: defaultSourceChain,
|
|
264
264
|
token: defaultSourceToken
|
|
265
265
|
});
|
|
@@ -276,10 +276,10 @@ function AssetSelectStep({
|
|
|
276
276
|
try {
|
|
277
277
|
const portfolio = await service.fetchPortfolio(address);
|
|
278
278
|
if (!active) return;
|
|
279
|
-
const portfolioAssets =
|
|
279
|
+
const portfolioAssets = _chunkNULE6WIIcjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
280
280
|
setAssets(portfolioAssets);
|
|
281
281
|
const hasNative = portfolioAssets.some(
|
|
282
|
-
(asset) => asset.token.toLowerCase() ===
|
|
282
|
+
(asset) => asset.token.toLowerCase() === _chunkHYUITBRVcjs.NATIVE_TOKEN_ADDRESS
|
|
283
283
|
);
|
|
284
284
|
if (!hasNative) {
|
|
285
285
|
const nativeAssets = await fetchNativeAssets(
|
|
@@ -345,7 +345,7 @@ function AssetSelectStep({
|
|
|
345
345
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
346
346
|
const numeric = Number(raw);
|
|
347
347
|
if (!Number.isFinite(numeric)) return raw;
|
|
348
|
-
return
|
|
348
|
+
return _chunkNULE6WIIcjs.tokenFormatter.format(numeric);
|
|
349
349
|
} catch (e3) {
|
|
350
350
|
return asset.balance;
|
|
351
351
|
}
|
|
@@ -359,7 +359,7 @@ function AssetSelectStep({
|
|
|
359
359
|
style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
|
|
360
360
|
children: [
|
|
361
361
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
362
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
362
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
363
363
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
364
364
|
] }),
|
|
365
365
|
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-alert rs-alert--error", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-alert-text", children: error }) }),
|
|
@@ -392,9 +392,9 @@ function AssetSelectStep({
|
|
|
392
392
|
!loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((asset) => {
|
|
393
393
|
const isSelected = selectedAssetId === asset.id;
|
|
394
394
|
const tokenAmount = formatBalance(asset);
|
|
395
|
-
const badge =
|
|
396
|
-
const tokenIcon =
|
|
397
|
-
const chainIcon =
|
|
395
|
+
const badge = _chunkHYUITBRVcjs.getChainBadge.call(void 0, asset.chainId);
|
|
396
|
+
const tokenIcon = _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol);
|
|
397
|
+
const chainIcon = _chunkHYUITBRVcjs.getChainIcon.call(void 0, asset.chainId);
|
|
398
398
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
399
399
|
"button",
|
|
400
400
|
{
|
|
@@ -418,7 +418,7 @@ function AssetSelectStep({
|
|
|
418
418
|
"img",
|
|
419
419
|
{
|
|
420
420
|
src: chainIcon,
|
|
421
|
-
alt:
|
|
421
|
+
alt: _chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId),
|
|
422
422
|
className: "rs-asset-chain-badge"
|
|
423
423
|
}
|
|
424
424
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -439,7 +439,7 @@ function AssetSelectStep({
|
|
|
439
439
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-asset-chain", children: [
|
|
440
440
|
" ",
|
|
441
441
|
"on ",
|
|
442
|
-
|
|
442
|
+
_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)
|
|
443
443
|
] })
|
|
444
444
|
] }),
|
|
445
445
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-balance-small", children: [
|
|
@@ -449,7 +449,7 @@ function AssetSelectStep({
|
|
|
449
449
|
] })
|
|
450
450
|
] })
|
|
451
451
|
] }),
|
|
452
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ?
|
|
452
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkNULE6WIIcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
453
453
|
]
|
|
454
454
|
},
|
|
455
455
|
asset.id
|
|
@@ -459,7 +459,7 @@ function AssetSelectStep({
|
|
|
459
459
|
}
|
|
460
460
|
),
|
|
461
461
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
462
|
-
|
|
462
|
+
_chunkNULE6WIIcjs.Button,
|
|
463
463
|
{
|
|
464
464
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
465
465
|
disabled: !selectedAsset,
|
|
@@ -467,17 +467,17 @@ function AssetSelectStep({
|
|
|
467
467
|
children: "Continue"
|
|
468
468
|
}
|
|
469
469
|
) }),
|
|
470
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
470
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.PoweredBy, {})
|
|
471
471
|
] });
|
|
472
472
|
}
|
|
473
473
|
async function fetchNativeAssets(address, publicClient, existing) {
|
|
474
474
|
const existingIds = new Set(existing.map((asset) => asset.id));
|
|
475
475
|
const connectedChainId = _optionalChain([publicClient, 'access', _6 => _6.chain, 'optionalAccess', _7 => _7.id]);
|
|
476
476
|
if (!connectedChainId) return [];
|
|
477
|
-
if (!
|
|
478
|
-
const id =
|
|
477
|
+
if (!_chunkHYUITBRVcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
|
|
478
|
+
const id = _chunkNULE6WIIcjs.getAssetId.call(void 0, {
|
|
479
479
|
chainId: connectedChainId,
|
|
480
|
-
token:
|
|
480
|
+
token: _chunkHYUITBRVcjs.NATIVE_TOKEN_ADDRESS
|
|
481
481
|
});
|
|
482
482
|
if (existingIds.has(id)) return [];
|
|
483
483
|
try {
|
|
@@ -486,7 +486,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
|
|
|
486
486
|
{
|
|
487
487
|
id,
|
|
488
488
|
chainId: connectedChainId,
|
|
489
|
-
token:
|
|
489
|
+
token: _chunkHYUITBRVcjs.NATIVE_TOKEN_ADDRESS,
|
|
490
490
|
symbol: "ETH",
|
|
491
491
|
name: "Ethereum",
|
|
492
492
|
decimals: 18,
|
|
@@ -536,8 +536,8 @@ function AmountStep({
|
|
|
536
536
|
const chainMismatch = Boolean(
|
|
537
537
|
_optionalChain([walletClient, 'optionalAccess', _8 => _8.chain, 'optionalAccess', _9 => _9.id]) && walletClient.chain.id !== asset.chainId
|
|
538
538
|
);
|
|
539
|
-
const targetSymbol =
|
|
540
|
-
const isSourceStablecoin =
|
|
539
|
+
const targetSymbol = _chunkHYUITBRVcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
540
|
+
const isSourceStablecoin = _chunkHYUITBRVcjs.isStablecoinSymbol.call(void 0, asset.symbol);
|
|
541
541
|
const tokenPriceUsd = _react.useMemo.call(void 0, () => {
|
|
542
542
|
if (tokenPriceUsdOverride !== void 0 && tokenPriceUsdOverride > 0)
|
|
543
543
|
return tokenPriceUsdOverride;
|
|
@@ -561,7 +561,7 @@ function AmountStep({
|
|
|
561
561
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
562
562
|
if (!balanceTarget || !publicClient) return;
|
|
563
563
|
try {
|
|
564
|
-
const bal =
|
|
564
|
+
const bal = _chunkNULE6WIIcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
565
565
|
address: asset.token,
|
|
566
566
|
abi: _viem.erc20Abi,
|
|
567
567
|
functionName: "balanceOf",
|
|
@@ -587,7 +587,7 @@ function AmountStep({
|
|
|
587
587
|
setIsSwitching(true);
|
|
588
588
|
switchChain(asset.chainId).catch((err) => {
|
|
589
589
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
590
|
-
setError(
|
|
590
|
+
setError(_chunkNULE6WIIcjs.formatUserError.call(void 0, raw));
|
|
591
591
|
}).finally(() => {
|
|
592
592
|
setIsSwitching(false);
|
|
593
593
|
});
|
|
@@ -623,7 +623,7 @@ function AmountStep({
|
|
|
623
623
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
624
624
|
const numeric = Number(raw);
|
|
625
625
|
if (!Number.isFinite(numeric)) return raw;
|
|
626
|
-
return
|
|
626
|
+
return _chunkNULE6WIIcjs.tokenFormatter.format(numeric);
|
|
627
627
|
} catch (e8) {
|
|
628
628
|
return "...";
|
|
629
629
|
}
|
|
@@ -665,13 +665,13 @@ function AmountStep({
|
|
|
665
665
|
const usdValue = numericAmount;
|
|
666
666
|
if (_optionalChain([uiConfig, 'optionalAccess', _11 => _11.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
|
|
667
667
|
setError(
|
|
668
|
-
`Maximum deposit is ${
|
|
668
|
+
`Maximum deposit is ${_chunkNULE6WIIcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
|
|
669
669
|
);
|
|
670
670
|
return;
|
|
671
671
|
}
|
|
672
672
|
if (_optionalChain([uiConfig, 'optionalAccess', _12 => _12.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
|
|
673
673
|
setError(
|
|
674
|
-
`Minimum deposit is ${
|
|
674
|
+
`Minimum deposit is ${_chunkNULE6WIIcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
|
|
675
675
|
);
|
|
676
676
|
return;
|
|
677
677
|
}
|
|
@@ -720,7 +720,7 @@ function AmountStep({
|
|
|
720
720
|
hasPricing && balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
|
|
721
721
|
" ",
|
|
722
722
|
"(",
|
|
723
|
-
|
|
723
|
+
_chunkNULE6WIIcjs.currencyFormatter.format(balanceUsd),
|
|
724
724
|
")"
|
|
725
725
|
] })
|
|
726
726
|
] }) })
|
|
@@ -734,26 +734,26 @@ function AmountStep({
|
|
|
734
734
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-flow-pill-label", children: "You send" }),
|
|
735
735
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token", children: [
|
|
736
736
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token-icon-wrapper", children: [
|
|
737
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children:
|
|
737
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
738
738
|
"img",
|
|
739
739
|
{
|
|
740
|
-
src:
|
|
740
|
+
src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol),
|
|
741
741
|
alt: asset.symbol
|
|
742
742
|
}
|
|
743
743
|
) : asset.symbol.slice(0, 2) }),
|
|
744
744
|
(() => {
|
|
745
|
-
const chainIcon =
|
|
745
|
+
const chainIcon = _chunkHYUITBRVcjs.getChainIcon.call(void 0, asset.chainId);
|
|
746
746
|
if (chainIcon) {
|
|
747
747
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
748
748
|
"img",
|
|
749
749
|
{
|
|
750
750
|
src: chainIcon,
|
|
751
|
-
alt:
|
|
751
|
+
alt: _chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId),
|
|
752
752
|
className: "rs-flow-pill-chain-badge"
|
|
753
753
|
}
|
|
754
754
|
);
|
|
755
755
|
}
|
|
756
|
-
const badge =
|
|
756
|
+
const badge = _chunkHYUITBRVcjs.getChainBadge.call(void 0, asset.chainId);
|
|
757
757
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
758
758
|
"div",
|
|
759
759
|
{
|
|
@@ -791,26 +791,26 @@ function AmountStep({
|
|
|
791
791
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-flow-pill-label", children: "You receive" }),
|
|
792
792
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token", children: [
|
|
793
793
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token-icon-wrapper", children: [
|
|
794
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children:
|
|
794
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, targetSymbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
795
795
|
"img",
|
|
796
796
|
{
|
|
797
|
-
src:
|
|
797
|
+
src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, targetSymbol),
|
|
798
798
|
alt: targetSymbol
|
|
799
799
|
}
|
|
800
800
|
) : targetSymbol.slice(0, 2) }),
|
|
801
801
|
(() => {
|
|
802
|
-
const chainIcon =
|
|
802
|
+
const chainIcon = _chunkHYUITBRVcjs.getChainIcon.call(void 0, targetChain);
|
|
803
803
|
if (chainIcon) {
|
|
804
804
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
805
805
|
"img",
|
|
806
806
|
{
|
|
807
807
|
src: chainIcon,
|
|
808
|
-
alt:
|
|
808
|
+
alt: _chunkHYUITBRVcjs.getChainName.call(void 0, targetChain),
|
|
809
809
|
className: "rs-flow-pill-chain-badge"
|
|
810
810
|
}
|
|
811
811
|
);
|
|
812
812
|
}
|
|
813
|
-
const badge =
|
|
813
|
+
const badge = _chunkHYUITBRVcjs.getChainBadge.call(void 0, targetChain);
|
|
814
814
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
815
815
|
"div",
|
|
816
816
|
{
|
|
@@ -856,7 +856,7 @@ function AmountStep({
|
|
|
856
856
|
}
|
|
857
857
|
)
|
|
858
858
|
] }),
|
|
859
|
-
chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", style: { marginTop: 16 }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${
|
|
859
|
+
chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", style: { marginTop: 16 }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch your wallet to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
|
|
860
860
|
error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
|
|
861
861
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
862
862
|
"svg",
|
|
@@ -880,7 +880,7 @@ function AmountStep({
|
|
|
880
880
|
] })
|
|
881
881
|
] }),
|
|
882
882
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
883
|
-
|
|
883
|
+
_chunkNULE6WIIcjs.Button,
|
|
884
884
|
{
|
|
885
885
|
onClick: handleContinue,
|
|
886
886
|
fullWidth: true,
|
|
@@ -888,7 +888,7 @@ function AmountStep({
|
|
|
888
888
|
children: "Continue"
|
|
889
889
|
}
|
|
890
890
|
) }),
|
|
891
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
891
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.PoweredBy, {})
|
|
892
892
|
] });
|
|
893
893
|
}
|
|
894
894
|
|
|
@@ -919,7 +919,7 @@ function ConfirmStep({
|
|
|
919
919
|
const hasAttemptedSwitch = _react.useRef.call(void 0, false);
|
|
920
920
|
const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _13 => _13.chain, 'optionalAccess', _14 => _14.id]) && walletClient.chain.id !== asset.chainId;
|
|
921
921
|
const sameRoute = targetChain === asset.chainId && targetToken.toLowerCase() === asset.token.toLowerCase();
|
|
922
|
-
const targetSymbol = sameRoute ? asset.symbol :
|
|
922
|
+
const targetSymbol = sameRoute ? asset.symbol : _chunkHYUITBRVcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
923
923
|
const formattedSendAmount = amount && !Number.isNaN(Number(amount)) ? Number(amount).toLocaleString("en-US", { maximumFractionDigits: 6 }) : "0";
|
|
924
924
|
const formattedReceiveAmount = (() => {
|
|
925
925
|
if (sameRoute) return formattedSendAmount;
|
|
@@ -938,7 +938,7 @@ function ConfirmStep({
|
|
|
938
938
|
setIsSwitching(true);
|
|
939
939
|
switchChain(asset.chainId).catch((err) => {
|
|
940
940
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
941
|
-
setError(
|
|
941
|
+
setError(_chunkNULE6WIIcjs.formatUserError.call(void 0, raw));
|
|
942
942
|
}).finally(() => {
|
|
943
943
|
setIsSwitching(false);
|
|
944
944
|
});
|
|
@@ -953,7 +953,7 @@ function ConfirmStep({
|
|
|
953
953
|
return;
|
|
954
954
|
}
|
|
955
955
|
if (chainMismatch) {
|
|
956
|
-
setError(`Switch to ${
|
|
956
|
+
setError(`Switch to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)} to sign`);
|
|
957
957
|
return;
|
|
958
958
|
}
|
|
959
959
|
const parsedAmount = parseFloat(amount);
|
|
@@ -981,7 +981,7 @@ function ConfirmStep({
|
|
|
981
981
|
throw new Error("Wallet not properly connected");
|
|
982
982
|
}
|
|
983
983
|
const transferTo = sameRoute ? recipient : smartAccount;
|
|
984
|
-
const hash =
|
|
984
|
+
const hash = _chunkNULE6WIIcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
|
|
985
985
|
account,
|
|
986
986
|
chain,
|
|
987
987
|
to: transferTo,
|
|
@@ -998,7 +998,7 @@ function ConfirmStep({
|
|
|
998
998
|
onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
|
|
999
999
|
} catch (err) {
|
|
1000
1000
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1001
|
-
const message =
|
|
1001
|
+
const message = _chunkNULE6WIIcjs.formatUserError.call(void 0, raw);
|
|
1002
1002
|
setError(message);
|
|
1003
1003
|
_optionalChain([onError, 'optionalCall', _16 => _16(message, "TRANSFER_ERROR")]);
|
|
1004
1004
|
} finally {
|
|
@@ -1017,15 +1017,15 @@ function ConfirmStep({
|
|
|
1017
1017
|
className: "rs-card-value",
|
|
1018
1018
|
style: { display: "flex", alignItems: "center", gap: 8 },
|
|
1019
1019
|
children: [
|
|
1020
|
-
|
|
1020
|
+
_chunkHYUITBRVcjs.getChainIcon.call(void 0, asset.chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1021
1021
|
"img",
|
|
1022
1022
|
{
|
|
1023
|
-
src:
|
|
1023
|
+
src: _chunkHYUITBRVcjs.getChainIcon.call(void 0, asset.chainId),
|
|
1024
1024
|
alt: "",
|
|
1025
1025
|
style: { width: 16, height: 16, borderRadius: 3 }
|
|
1026
1026
|
}
|
|
1027
1027
|
),
|
|
1028
|
-
|
|
1028
|
+
_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)
|
|
1029
1029
|
]
|
|
1030
1030
|
}
|
|
1031
1031
|
)
|
|
@@ -1038,15 +1038,15 @@ function ConfirmStep({
|
|
|
1038
1038
|
className: "rs-card-value",
|
|
1039
1039
|
style: { display: "flex", alignItems: "center", gap: 8 },
|
|
1040
1040
|
children: [
|
|
1041
|
-
|
|
1041
|
+
_chunkHYUITBRVcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1042
1042
|
"img",
|
|
1043
1043
|
{
|
|
1044
|
-
src:
|
|
1044
|
+
src: _chunkHYUITBRVcjs.getChainIcon.call(void 0, targetChain),
|
|
1045
1045
|
alt: "",
|
|
1046
1046
|
style: { width: 16, height: 16, borderRadius: 3 }
|
|
1047
1047
|
}
|
|
1048
1048
|
),
|
|
1049
|
-
|
|
1049
|
+
_chunkHYUITBRVcjs.getChainName.call(void 0, targetChain)
|
|
1050
1050
|
]
|
|
1051
1051
|
}
|
|
1052
1052
|
)
|
|
@@ -1065,10 +1065,10 @@ function ConfirmStep({
|
|
|
1065
1065
|
className: "rs-card-value",
|
|
1066
1066
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1067
1067
|
children: [
|
|
1068
|
-
|
|
1068
|
+
_chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1069
1069
|
"img",
|
|
1070
1070
|
{
|
|
1071
|
-
src:
|
|
1071
|
+
src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol),
|
|
1072
1072
|
alt: "",
|
|
1073
1073
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1074
1074
|
}
|
|
@@ -1088,10 +1088,10 @@ function ConfirmStep({
|
|
|
1088
1088
|
className: "rs-card-value",
|
|
1089
1089
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1090
1090
|
children: [
|
|
1091
|
-
|
|
1091
|
+
_chunkHYUITBRVcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1092
1092
|
"img",
|
|
1093
1093
|
{
|
|
1094
|
-
src:
|
|
1094
|
+
src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, targetSymbol),
|
|
1095
1095
|
alt: "",
|
|
1096
1096
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1097
1097
|
}
|
|
@@ -1104,7 +1104,7 @@ function ConfirmStep({
|
|
|
1104
1104
|
)
|
|
1105
1105
|
] })
|
|
1106
1106
|
] }),
|
|
1107
|
-
chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${
|
|
1107
|
+
chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch your wallet to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)} to sign.` }) }),
|
|
1108
1108
|
error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-alert rs-alert--error", children: [
|
|
1109
1109
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1110
1110
|
"svg",
|
|
@@ -1128,7 +1128,7 @@ function ConfirmStep({
|
|
|
1128
1128
|
] })
|
|
1129
1129
|
] }),
|
|
1130
1130
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1131
|
-
|
|
1131
|
+
_chunkNULE6WIIcjs.Button,
|
|
1132
1132
|
{
|
|
1133
1133
|
onClick: handleConfirm,
|
|
1134
1134
|
loading: isSubmitting,
|
|
@@ -1137,7 +1137,7 @@ function ConfirmStep({
|
|
|
1137
1137
|
children: "Confirm Order"
|
|
1138
1138
|
}
|
|
1139
1139
|
) }),
|
|
1140
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1140
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.PoweredBy, {})
|
|
1141
1141
|
] });
|
|
1142
1142
|
}
|
|
1143
1143
|
|
|
@@ -1282,12 +1282,12 @@ function DepositAddressStep({
|
|
|
1282
1282
|
onDepositDetected,
|
|
1283
1283
|
onError
|
|
1284
1284
|
}) {
|
|
1285
|
-
const supportedChainIds = _react.useMemo.call(void 0, () =>
|
|
1285
|
+
const supportedChainIds = _react.useMemo.call(void 0, () => _chunkHYUITBRVcjs.getSupportedChainIds.call(void 0, ), []);
|
|
1286
1286
|
const BASE_CHAIN_ID = 8453;
|
|
1287
1287
|
const defaultChainId = supportedChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : supportedChainIds[0];
|
|
1288
1288
|
const [sourceChainId, setSourceChainId] = _react.useState.call(void 0, defaultChainId);
|
|
1289
1289
|
const tokensForChain = _react.useMemo.call(void 0,
|
|
1290
|
-
() =>
|
|
1290
|
+
() => _chunkHYUITBRVcjs.getTargetTokenSymbolsForChain.call(void 0, sourceChainId),
|
|
1291
1291
|
[sourceChainId]
|
|
1292
1292
|
);
|
|
1293
1293
|
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
|
|
@@ -1301,6 +1301,8 @@ function DepositAddressStep({
|
|
|
1301
1301
|
const [pollingError, setPollingError] = _react.useState.call(void 0, null);
|
|
1302
1302
|
const [chainDropdownOpen, setChainDropdownOpen] = _react.useState.call(void 0, false);
|
|
1303
1303
|
const [tokenDropdownOpen, setTokenDropdownOpen] = _react.useState.call(void 0, false);
|
|
1304
|
+
const chainDropdownRef = _react.useRef.call(void 0, null);
|
|
1305
|
+
const tokenDropdownRef = _react.useRef.call(void 0, null);
|
|
1304
1306
|
const depositHandledRef = _react.useRef.call(void 0, false);
|
|
1305
1307
|
const sourceSelectionRef = _react.useRef.call(void 0, {
|
|
1306
1308
|
chainId: defaultChainId,
|
|
@@ -1312,6 +1314,24 @@ function DepositAddressStep({
|
|
|
1312
1314
|
tokenSymbol: sourceTokenSymbol
|
|
1313
1315
|
};
|
|
1314
1316
|
}, [sourceChainId, sourceTokenSymbol]);
|
|
1317
|
+
_react.useEffect.call(void 0, () => {
|
|
1318
|
+
if (!chainDropdownOpen && !tokenDropdownOpen) return;
|
|
1319
|
+
function handlePointerDown(event) {
|
|
1320
|
+
const target = event.target;
|
|
1321
|
+
if (!target) return;
|
|
1322
|
+
const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _20 => _20.current, 'optionalAccess', _21 => _21.contains, 'call', _22 => _22(target)]);
|
|
1323
|
+
const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _23 => _23.current, 'optionalAccess', _24 => _24.contains, 'call', _25 => _25(target)]);
|
|
1324
|
+
if (clickedChainDropdown || clickedTokenDropdown) return;
|
|
1325
|
+
setChainDropdownOpen(false);
|
|
1326
|
+
setTokenDropdownOpen(false);
|
|
1327
|
+
}
|
|
1328
|
+
document.addEventListener("mousedown", handlePointerDown);
|
|
1329
|
+
document.addEventListener("touchstart", handlePointerDown);
|
|
1330
|
+
return () => {
|
|
1331
|
+
document.removeEventListener("mousedown", handlePointerDown);
|
|
1332
|
+
document.removeEventListener("touchstart", handlePointerDown);
|
|
1333
|
+
};
|
|
1334
|
+
}, [chainDropdownOpen, tokenDropdownOpen]);
|
|
1315
1335
|
const handleCopy = _react.useCallback.call(void 0, async () => {
|
|
1316
1336
|
try {
|
|
1317
1337
|
await navigator.clipboard.writeText(smartAccount);
|
|
@@ -1342,7 +1362,7 @@ function DepositAddressStep({
|
|
|
1342
1362
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
1343
1363
|
if (cancelled || depositHandledRef.current) return;
|
|
1344
1364
|
const event = status.lastEvent;
|
|
1345
|
-
const eventTxHash =
|
|
1365
|
+
const eventTxHash = _chunkNULE6WIIcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_optionalChain([_chunkNULE6WIIcjs.getEventTxHash.call(void 0, event), 'optionalAccess', _26 => _26.toLowerCase, 'call', _27 => _27()]), () => ( null)) : null;
|
|
1346
1366
|
if (baselineTxHash === void 0) {
|
|
1347
1367
|
baselineTxHash = eventTxHash;
|
|
1348
1368
|
} else if (eventTxHash && eventTxHash !== baselineTxHash) {
|
|
@@ -1350,7 +1370,7 @@ function DepositAddressStep({
|
|
|
1350
1370
|
const fallback = sourceSelectionRef.current;
|
|
1351
1371
|
const chainId = _nullishCoalesce(details.chainId, () => ( fallback.chainId));
|
|
1352
1372
|
const amount = _nullishCoalesce(details.amount, () => ( "0"));
|
|
1353
|
-
const token = _nullishCoalesce(details.token, () => (
|
|
1373
|
+
const token = _nullishCoalesce(details.token, () => ( _chunkHYUITBRVcjs.getTokenAddress.call(void 0, fallback.tokenSymbol, fallback.chainId)));
|
|
1354
1374
|
if (token) {
|
|
1355
1375
|
depositHandledRef.current = true;
|
|
1356
1376
|
onDepositDetected(eventTxHash, chainId, amount, token);
|
|
@@ -1362,7 +1382,7 @@ function DepositAddressStep({
|
|
|
1362
1382
|
if (!cancelled) {
|
|
1363
1383
|
const msg = err instanceof Error ? err.message : "Failed to check status";
|
|
1364
1384
|
setPollingError(msg);
|
|
1365
|
-
_optionalChain([onError, 'optionalCall',
|
|
1385
|
+
_optionalChain([onError, 'optionalCall', _28 => _28(msg, "STATUS_POLL_ERROR")]);
|
|
1366
1386
|
}
|
|
1367
1387
|
}
|
|
1368
1388
|
if (!cancelled && !depositHandledRef.current) {
|
|
@@ -1375,12 +1395,12 @@ function DepositAddressStep({
|
|
|
1375
1395
|
clearTimeout(timeoutId);
|
|
1376
1396
|
};
|
|
1377
1397
|
}, [smartAccount, service, onDepositDetected, onError]);
|
|
1378
|
-
const chainIconSrc =
|
|
1398
|
+
const chainIconSrc = _chunkHYUITBRVcjs.getChainIcon.call(void 0, sourceChainId);
|
|
1379
1399
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
1380
1400
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-body", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address", children: [
|
|
1381
1401
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
|
|
1382
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
1383
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "
|
|
1402
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: tokenDropdownRef, children: [
|
|
1403
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported token" }),
|
|
1384
1404
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1385
1405
|
"button",
|
|
1386
1406
|
{
|
|
@@ -1391,10 +1411,10 @@ function DepositAddressStep({
|
|
|
1391
1411
|
setChainDropdownOpen(false);
|
|
1392
1412
|
},
|
|
1393
1413
|
children: [
|
|
1394
|
-
|
|
1414
|
+
_chunkHYUITBRVcjs.getTokenIcon.call(void 0, sourceTokenSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1395
1415
|
"img",
|
|
1396
1416
|
{
|
|
1397
|
-
src:
|
|
1417
|
+
src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, sourceTokenSymbol),
|
|
1398
1418
|
alt: "",
|
|
1399
1419
|
className: "rs-deposit-address-dropdown-icon"
|
|
1400
1420
|
}
|
|
@@ -1431,10 +1451,10 @@ function DepositAddressStep({
|
|
|
1431
1451
|
setTokenDropdownOpen(false);
|
|
1432
1452
|
},
|
|
1433
1453
|
children: [
|
|
1434
|
-
|
|
1454
|
+
_chunkHYUITBRVcjs.getTokenIcon.call(void 0, symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1435
1455
|
"img",
|
|
1436
1456
|
{
|
|
1437
|
-
src:
|
|
1457
|
+
src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, symbol),
|
|
1438
1458
|
alt: "",
|
|
1439
1459
|
className: "rs-deposit-address-dropdown-icon"
|
|
1440
1460
|
}
|
|
@@ -1445,8 +1465,8 @@ function DepositAddressStep({
|
|
|
1445
1465
|
symbol
|
|
1446
1466
|
)) })
|
|
1447
1467
|
] }),
|
|
1448
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
1449
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "
|
|
1468
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
1469
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
1450
1470
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1451
1471
|
"button",
|
|
1452
1472
|
{
|
|
@@ -1457,15 +1477,15 @@ function DepositAddressStep({
|
|
|
1457
1477
|
setTokenDropdownOpen(false);
|
|
1458
1478
|
},
|
|
1459
1479
|
children: [
|
|
1460
|
-
|
|
1480
|
+
_chunkHYUITBRVcjs.getChainIcon.call(void 0, sourceChainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1461
1481
|
"img",
|
|
1462
1482
|
{
|
|
1463
|
-
src:
|
|
1483
|
+
src: _chunkHYUITBRVcjs.getChainIcon.call(void 0, sourceChainId),
|
|
1464
1484
|
alt: "",
|
|
1465
1485
|
className: "rs-deposit-address-dropdown-icon"
|
|
1466
1486
|
}
|
|
1467
1487
|
),
|
|
1468
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children:
|
|
1488
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkHYUITBRVcjs.getChainName.call(void 0, sourceChainId) }),
|
|
1469
1489
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1470
1490
|
"svg",
|
|
1471
1491
|
{
|
|
@@ -1497,15 +1517,15 @@ function DepositAddressStep({
|
|
|
1497
1517
|
setChainDropdownOpen(false);
|
|
1498
1518
|
},
|
|
1499
1519
|
children: [
|
|
1500
|
-
|
|
1520
|
+
_chunkHYUITBRVcjs.getChainIcon.call(void 0, chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1501
1521
|
"img",
|
|
1502
1522
|
{
|
|
1503
|
-
src:
|
|
1523
|
+
src: _chunkHYUITBRVcjs.getChainIcon.call(void 0, chainId),
|
|
1504
1524
|
alt: "",
|
|
1505
1525
|
className: "rs-deposit-address-dropdown-icon"
|
|
1506
1526
|
}
|
|
1507
1527
|
),
|
|
1508
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children:
|
|
1528
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkHYUITBRVcjs.getChainName.call(void 0, chainId) })
|
|
1509
1529
|
]
|
|
1510
1530
|
},
|
|
1511
1531
|
chainId
|
|
@@ -1555,7 +1575,7 @@ function DepositAddressStep({
|
|
|
1555
1575
|
] }),
|
|
1556
1576
|
pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
|
|
1557
1577
|
] }) }),
|
|
1558
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1578
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.PoweredBy, {})
|
|
1559
1579
|
] });
|
|
1560
1580
|
}
|
|
1561
1581
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -1576,7 +1596,7 @@ function DepositFlow({
|
|
|
1576
1596
|
sourceToken: defaultSourceToken,
|
|
1577
1597
|
amount: defaultAmount,
|
|
1578
1598
|
recipient,
|
|
1579
|
-
signerAddress =
|
|
1599
|
+
signerAddress = _chunkHYUITBRVcjs.DEFAULT_SIGNER_ADDRESS,
|
|
1580
1600
|
sessionChainIds,
|
|
1581
1601
|
forceRegister = false,
|
|
1582
1602
|
waitForFinalTx = true,
|
|
@@ -1619,15 +1639,15 @@ function DepositFlow({
|
|
|
1619
1639
|
return null;
|
|
1620
1640
|
}, []);
|
|
1621
1641
|
const dappSwitchChain = _react.useMemo.call(void 0, () => {
|
|
1622
|
-
if (!_optionalChain([dappWalletClient, 'optionalAccess',
|
|
1642
|
+
if (!_optionalChain([dappWalletClient, 'optionalAccess', _29 => _29.switchChain])) return void 0;
|
|
1623
1643
|
return async (chainId) => {
|
|
1624
|
-
await _optionalChain([dappWalletClient, 'access',
|
|
1644
|
+
await _optionalChain([dappWalletClient, 'access', _30 => _30.switchChain, 'optionalCall', _31 => _31({ id: chainId })]);
|
|
1625
1645
|
};
|
|
1626
1646
|
}, [dappWalletClient]);
|
|
1627
1647
|
const walletOptions = _react.useMemo.call(void 0, () => {
|
|
1628
1648
|
const options = [];
|
|
1629
1649
|
const seen = /* @__PURE__ */ new Set();
|
|
1630
|
-
if (_optionalChain([dappWalletClient, 'optionalAccess',
|
|
1650
|
+
if (_optionalChain([dappWalletClient, 'optionalAccess', _32 => _32.account]) && dappAddress) {
|
|
1631
1651
|
options.push({
|
|
1632
1652
|
address: dappWalletClient.account.address,
|
|
1633
1653
|
label: "Connected Wallet",
|
|
@@ -1635,7 +1655,7 @@ function DepositFlow({
|
|
|
1635
1655
|
});
|
|
1636
1656
|
seen.add(dappWalletClient.account.address.toLowerCase());
|
|
1637
1657
|
}
|
|
1638
|
-
if (_optionalChain([reownWallet, 'optionalAccess',
|
|
1658
|
+
if (_optionalChain([reownWallet, 'optionalAccess', _33 => _33.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(reownWallet.address.toLowerCase())) {
|
|
1639
1659
|
options.push({
|
|
1640
1660
|
address: reownWallet.address,
|
|
1641
1661
|
label: "External Wallet",
|
|
@@ -1647,15 +1667,15 @@ function DepositFlow({
|
|
|
1647
1667
|
}, [
|
|
1648
1668
|
dappWalletClient,
|
|
1649
1669
|
dappAddress,
|
|
1650
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
1651
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
1652
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
1653
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
1654
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
1670
|
+
_optionalChain([reownWallet, 'optionalAccess', _34 => _34.address]),
|
|
1671
|
+
_optionalChain([reownWallet, 'optionalAccess', _35 => _35.isConnected]),
|
|
1672
|
+
_optionalChain([reownWallet, 'optionalAccess', _36 => _36.walletClient]),
|
|
1673
|
+
_optionalChain([reownWallet, 'optionalAccess', _37 => _37.publicClient]),
|
|
1674
|
+
_optionalChain([reownWallet, 'optionalAccess', _38 => _38.icon])
|
|
1655
1675
|
]);
|
|
1656
|
-
const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess',
|
|
1676
|
+
const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _39 => _39.account]) && dappAddress && !reownWallet;
|
|
1657
1677
|
const hasWalletOptions = walletOptions.length > 0;
|
|
1658
|
-
const hasReownSession = Boolean(_optionalChain([reownWallet, 'optionalAccess',
|
|
1678
|
+
const hasReownSession = Boolean(_optionalChain([reownWallet, 'optionalAccess', _40 => _40.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _41 => _41.address]));
|
|
1659
1679
|
const showConnectStep = !canAutoLock && !isConnectSelectionConfirmed;
|
|
1660
1680
|
const signerContext = _react.useMemo.call(void 0, () => {
|
|
1661
1681
|
if (flowMode === "deposit-address") {
|
|
@@ -1663,30 +1683,30 @@ function DepositFlow({
|
|
|
1663
1683
|
return {
|
|
1664
1684
|
ownerAddress: dappAddress,
|
|
1665
1685
|
walletClient: void 0,
|
|
1666
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
1686
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNULE6WIIcjs.getPublicClient.call(void 0, targetChain))),
|
|
1667
1687
|
switchChain: void 0
|
|
1668
1688
|
};
|
|
1669
1689
|
}
|
|
1670
1690
|
if (canAutoLock) {
|
|
1671
|
-
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess',
|
|
1691
|
+
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _42 => _42.chain, 'optionalAccess', _43 => _43.id]), () => ( targetChain));
|
|
1672
1692
|
return {
|
|
1673
1693
|
ownerAddress: dappWalletClient.account.address,
|
|
1674
1694
|
walletClient: dappWalletClient,
|
|
1675
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
1695
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNULE6WIIcjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
1676
1696
|
switchChain: dappSwitchChain
|
|
1677
1697
|
};
|
|
1678
1698
|
}
|
|
1679
1699
|
if (!isConnectSelectionConfirmed || !selectedConnectAddress) return null;
|
|
1680
|
-
if (_optionalChain([dappWalletClient, 'optionalAccess',
|
|
1681
|
-
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess',
|
|
1700
|
+
if (_optionalChain([dappWalletClient, 'optionalAccess', _44 => _44.account]) && dappWalletClient.account.address.toLowerCase() === selectedConnectAddress.toLowerCase()) {
|
|
1701
|
+
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _45 => _45.chain, 'optionalAccess', _46 => _46.id]), () => ( targetChain));
|
|
1682
1702
|
return {
|
|
1683
1703
|
ownerAddress: dappWalletClient.account.address,
|
|
1684
1704
|
walletClient: dappWalletClient,
|
|
1685
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
1705
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNULE6WIIcjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
1686
1706
|
switchChain: dappSwitchChain
|
|
1687
1707
|
};
|
|
1688
1708
|
}
|
|
1689
|
-
if (_optionalChain([reownWallet, 'optionalAccess',
|
|
1709
|
+
if (_optionalChain([reownWallet, 'optionalAccess', _47 => _47.address, 'optionalAccess', _48 => _48.toLowerCase, 'call', _49 => _49()]) === selectedConnectAddress.toLowerCase() && reownWallet.walletClient && reownWallet.publicClient) {
|
|
1690
1710
|
return {
|
|
1691
1711
|
ownerAddress: reownWallet.address,
|
|
1692
1712
|
walletClient: reownWallet.walletClient,
|
|
@@ -1707,7 +1727,7 @@ function DepositFlow({
|
|
|
1707
1727
|
reownWallet,
|
|
1708
1728
|
targetChain
|
|
1709
1729
|
]);
|
|
1710
|
-
const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess',
|
|
1730
|
+
const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _50 => _50.ownerAddress]))), () => ( null));
|
|
1711
1731
|
const lastTargetRef = _react.useRef.call(void 0, null);
|
|
1712
1732
|
_react.useEffect.call(void 0, () => {
|
|
1713
1733
|
const prev = lastTargetRef.current;
|
|
@@ -1751,10 +1771,10 @@ function DepositFlow({
|
|
|
1751
1771
|
const stepIndex = step.type === "setup" ? 0 : step.type === "deposit-address" ? 1 : step.type === "select-asset" ? 1 : step.type === "amount" ? 2 : step.type === "confirm" ? 3 : 4;
|
|
1752
1772
|
const currentBackHandler = step.type === "deposit-address" ? handleBackFromDepositAddress : step.type === "select-asset" && signerContext && !canAutoLock ? handleBackFromSelectAsset : step.type === "amount" ? handleBackFromAmount : step.type === "confirm" ? handleBackFromConfirm : void 0;
|
|
1753
1773
|
_react.useEffect.call(void 0, () => {
|
|
1754
|
-
_optionalChain([onStepChange, 'optionalCall',
|
|
1774
|
+
_optionalChain([onStepChange, 'optionalCall', _51 => _51(stepIndex, currentBackHandler)]);
|
|
1755
1775
|
}, [stepIndex, currentBackHandler, onStepChange]);
|
|
1756
1776
|
_react.useEffect.call(void 0, () => {
|
|
1757
|
-
_optionalChain([onTotalBalanceChange, 'optionalCall',
|
|
1777
|
+
_optionalChain([onTotalBalanceChange, 'optionalCall', _52 => _52(totalBalanceUsd)]);
|
|
1758
1778
|
}, [totalBalanceUsd, onTotalBalanceChange]);
|
|
1759
1779
|
const isDepositAddressMode = flowMode === "deposit-address";
|
|
1760
1780
|
const handleSelectProvider = _react.useCallback.call(void 0, () => {
|
|
@@ -1792,13 +1812,13 @@ function DepositFlow({
|
|
|
1792
1812
|
directTransfer: isSameRoute(chainId, token, targetChain, targetToken)
|
|
1793
1813
|
};
|
|
1794
1814
|
});
|
|
1795
|
-
_optionalChain([onDepositSubmitted, 'optionalCall',
|
|
1815
|
+
_optionalChain([onDepositSubmitted, 'optionalCall', _53 => _53({ txHash, sourceChain: chainId, amount })]);
|
|
1796
1816
|
},
|
|
1797
1817
|
[onDepositSubmitted, targetChain, targetToken]
|
|
1798
1818
|
);
|
|
1799
1819
|
const handleConnected = _react.useCallback.call(void 0,
|
|
1800
1820
|
(addr, smartAccount) => {
|
|
1801
|
-
_optionalChain([onConnected, 'optionalCall',
|
|
1821
|
+
_optionalChain([onConnected, 'optionalCall', _54 => _54({ address: addr, smartAccount })]);
|
|
1802
1822
|
},
|
|
1803
1823
|
[onConnected]
|
|
1804
1824
|
);
|
|
@@ -1818,8 +1838,8 @@ function DepositFlow({
|
|
|
1818
1838
|
);
|
|
1819
1839
|
const handleAmountContinue = _react.useCallback.call(void 0,
|
|
1820
1840
|
(amount, targetAmount, balance) => {
|
|
1821
|
-
const targetSym =
|
|
1822
|
-
const isTargetStable =
|
|
1841
|
+
const targetSym = _chunkHYUITBRVcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
1842
|
+
const isTargetStable = _chunkHYUITBRVcjs.isStablecoinSymbol.call(void 0, targetSym);
|
|
1823
1843
|
const targetTokenPriceUsd = isTargetStable ? 1 : getTokenPriceUsd(targetSym);
|
|
1824
1844
|
setStep((prev) => {
|
|
1825
1845
|
if (prev.type !== "amount") return prev;
|
|
@@ -1855,25 +1875,25 @@ function DepositFlow({
|
|
|
1855
1875
|
);
|
|
1856
1876
|
const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
|
|
1857
1877
|
(txHash, sourceChain, amount) => {
|
|
1858
|
-
_optionalChain([onDepositSubmitted, 'optionalCall',
|
|
1878
|
+
_optionalChain([onDepositSubmitted, 'optionalCall', _55 => _55({ txHash, sourceChain, amount })]);
|
|
1859
1879
|
},
|
|
1860
1880
|
[onDepositSubmitted]
|
|
1861
1881
|
);
|
|
1862
1882
|
const handleDepositComplete = _react.useCallback.call(void 0,
|
|
1863
1883
|
(txHash, destinationTxHash) => {
|
|
1864
|
-
_optionalChain([onDepositComplete, 'optionalCall',
|
|
1884
|
+
_optionalChain([onDepositComplete, 'optionalCall', _56 => _56({ txHash, destinationTxHash })]);
|
|
1865
1885
|
},
|
|
1866
1886
|
[onDepositComplete]
|
|
1867
1887
|
);
|
|
1868
1888
|
const handleDepositFailed = _react.useCallback.call(void 0,
|
|
1869
1889
|
(txHash, error) => {
|
|
1870
|
-
_optionalChain([onDepositFailed, 'optionalCall',
|
|
1890
|
+
_optionalChain([onDepositFailed, 'optionalCall', _57 => _57({ txHash, error })]);
|
|
1871
1891
|
},
|
|
1872
1892
|
[onDepositFailed]
|
|
1873
1893
|
);
|
|
1874
1894
|
const handleError = _react.useCallback.call(void 0,
|
|
1875
1895
|
(message, code) => {
|
|
1876
|
-
_optionalChain([onError, 'optionalCall',
|
|
1896
|
+
_optionalChain([onError, 'optionalCall', _58 => _58({ message, code })]);
|
|
1877
1897
|
},
|
|
1878
1898
|
[onError]
|
|
1879
1899
|
);
|
|
@@ -1924,7 +1944,7 @@ function DepositFlow({
|
|
|
1924
1944
|
]);
|
|
1925
1945
|
if (showConnectStep) {
|
|
1926
1946
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1927
|
-
|
|
1947
|
+
_chunkNULE6WIIcjs.ConnectStep,
|
|
1928
1948
|
{
|
|
1929
1949
|
walletOptions,
|
|
1930
1950
|
selectedAddress: selectedConnectAddressEffective,
|
|
@@ -1976,7 +1996,7 @@ function DepositFlow({
|
|
|
1976
1996
|
}
|
|
1977
1997
|
),
|
|
1978
1998
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1979
|
-
|
|
1999
|
+
_chunkNULE6WIIcjs.ProcessingStep,
|
|
1980
2000
|
{
|
|
1981
2001
|
smartAccount: step.smartAccount,
|
|
1982
2002
|
txHash: step.txHash,
|
|
@@ -1997,16 +2017,16 @@ function DepositFlow({
|
|
|
1997
2017
|
)
|
|
1998
2018
|
] });
|
|
1999
2019
|
}
|
|
2000
|
-
if (!_optionalChain([signerContext, 'optionalAccess',
|
|
2020
|
+
if (!_optionalChain([signerContext, 'optionalAccess', _59 => _59.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _60 => _60.publicClient])) {
|
|
2001
2021
|
return null;
|
|
2002
2022
|
}
|
|
2003
2023
|
const ownerAddress = signerContext.ownerAddress;
|
|
2004
|
-
const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access',
|
|
2024
|
+
const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _61 => _61.walletClient, 'optionalAccess', _62 => _62.chain, 'optionalAccess', _63 => _63.id]), () => ( _optionalChain([signerContext, 'access', _64 => _64.publicClient, 'access', _65 => _65.chain, 'optionalAccess', _66 => _66.id]))), () => ( targetChain));
|
|
2005
2025
|
const getReadClientForChain = (chainId) => {
|
|
2006
|
-
if (_optionalChain([signerContext, 'access',
|
|
2026
|
+
if (_optionalChain([signerContext, 'access', _67 => _67.publicClient, 'access', _68 => _68.chain, 'optionalAccess', _69 => _69.id]) === chainId) {
|
|
2007
2027
|
return signerContext.publicClient;
|
|
2008
2028
|
}
|
|
2009
|
-
return
|
|
2029
|
+
return _chunkNULE6WIIcjs.getPublicClient.call(void 0, chainId);
|
|
2010
2030
|
};
|
|
2011
2031
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
2012
2032
|
step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2075,7 +2095,7 @@ function DepositFlow({
|
|
|
2075
2095
|
}
|
|
2076
2096
|
),
|
|
2077
2097
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2078
|
-
|
|
2098
|
+
_chunkNULE6WIIcjs.ProcessingStep,
|
|
2079
2099
|
{
|
|
2080
2100
|
smartAccount: step.smartAccount,
|
|
2081
2101
|
txHash: step.txHash,
|
|
@@ -2099,7 +2119,7 @@ function DepositFlow({
|
|
|
2099
2119
|
// src/DepositModal.tsx
|
|
2100
2120
|
|
|
2101
2121
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
2102
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
2122
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-M6GRPFJW.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
2103
2123
|
);
|
|
2104
2124
|
function DepositModal(props) {
|
|
2105
2125
|
const needsReown = !!props.reownAppId;
|
|
@@ -2122,8 +2142,8 @@ function DepositModalInner({
|
|
|
2122
2142
|
sourceToken,
|
|
2123
2143
|
defaultAmount,
|
|
2124
2144
|
recipient,
|
|
2125
|
-
backendUrl =
|
|
2126
|
-
signerAddress =
|
|
2145
|
+
backendUrl = _chunkHYUITBRVcjs.DEFAULT_BACKEND_URL,
|
|
2146
|
+
signerAddress = _chunkHYUITBRVcjs.DEFAULT_SIGNER_ADDRESS,
|
|
2127
2147
|
sessionChainIds,
|
|
2128
2148
|
forceRegister = false,
|
|
2129
2149
|
waitForFinalTx = true,
|
|
@@ -2148,19 +2168,19 @@ function DepositModalInner({
|
|
|
2148
2168
|
const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
|
|
2149
2169
|
const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
|
|
2150
2170
|
const backHandlerRef = _react.useRef.call(void 0, void 0);
|
|
2151
|
-
const targetChain =
|
|
2152
|
-
const sourceChain = sourceChainProp ?
|
|
2153
|
-
const service = _react.useMemo.call(void 0, () =>
|
|
2171
|
+
const targetChain = _chunkHYUITBRVcjs.getChainId.call(void 0, targetChainProp);
|
|
2172
|
+
const sourceChain = sourceChainProp ? _chunkHYUITBRVcjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
2173
|
+
const service = _react.useMemo.call(void 0, () => _chunkNULE6WIIcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
|
|
2154
2174
|
_react.useEffect.call(void 0, () => {
|
|
2155
2175
|
if (isOpen && modalRef.current) {
|
|
2156
|
-
|
|
2176
|
+
_chunkNULE6WIIcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
2157
2177
|
}
|
|
2158
2178
|
}, [isOpen, theme]);
|
|
2159
2179
|
const hasCalledReady = _react.useRef.call(void 0, false);
|
|
2160
2180
|
_react.useEffect.call(void 0, () => {
|
|
2161
2181
|
if (isOpen && !hasCalledReady.current) {
|
|
2162
2182
|
hasCalledReady.current = true;
|
|
2163
|
-
_optionalChain([onReady, 'optionalCall',
|
|
2183
|
+
_optionalChain([onReady, 'optionalCall', _70 => _70()]);
|
|
2164
2184
|
}
|
|
2165
2185
|
}, [isOpen, onReady]);
|
|
2166
2186
|
_react.useEffect.call(void 0, () => {
|
|
@@ -2179,17 +2199,17 @@ function DepositModalInner({
|
|
|
2179
2199
|
setTotalBalanceUsd(balance2);
|
|
2180
2200
|
}, []);
|
|
2181
2201
|
const handleBack = _react.useCallback.call(void 0, () => {
|
|
2182
|
-
_optionalChain([backHandlerRef, 'access',
|
|
2202
|
+
_optionalChain([backHandlerRef, 'access', _71 => _71.current, 'optionalCall', _72 => _72()]);
|
|
2183
2203
|
}, []);
|
|
2184
|
-
const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
2185
|
-
const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
2186
|
-
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
2187
|
-
const balance = _optionalChain([uiConfig, 'optionalAccess',
|
|
2188
|
-
const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess',
|
|
2189
|
-
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess',
|
|
2204
|
+
const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _73 => _73.showLogo]), () => ( false));
|
|
2205
|
+
const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _74 => _74.showStepper]), () => ( false));
|
|
2206
|
+
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _75 => _75.showBackButton]), () => ( true));
|
|
2207
|
+
const balance = _optionalChain([uiConfig, 'optionalAccess', _76 => _76.balance]);
|
|
2208
|
+
const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _77 => _77.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
|
|
2209
|
+
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _78 => _78.title]), () => ( "Deposit"));
|
|
2190
2210
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
|
|
2191
2211
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2192
|
-
|
|
2212
|
+
_chunkNULE6WIIcjs.Modal,
|
|
2193
2213
|
{
|
|
2194
2214
|
isOpen,
|
|
2195
2215
|
onClose,
|
|
@@ -2250,7 +2270,7 @@ function DepositModalInner({
|
|
|
2250
2270
|
balance.title,
|
|
2251
2271
|
":"
|
|
2252
2272
|
] }),
|
|
2253
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ?
|
|
2273
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkNULE6WIIcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
|
|
2254
2274
|
] })
|
|
2255
2275
|
] }),
|
|
2256
2276
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|