@rhinestone/deposit-modal 0.1.28 → 0.1.29
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-6IXFIXR6.cjs → DepositModalReown-4PFOMSC6.cjs} +4 -4
- package/dist/{DepositModalReown-FF4YU5VV.mjs → DepositModalReown-BVHWFWIG.mjs} +3 -3
- package/dist/{WithdrawModalReown-LIYQG2BW.mjs → WithdrawModalReown-CJCNT7SA.mjs} +3 -3
- package/dist/{WithdrawModalReown-GMIE6AWA.cjs → WithdrawModalReown-YREQR7DV.cjs} +4 -4
- package/dist/{chunk-XJ4G6RO6.cjs → chunk-5QJNOPNF.cjs} +100 -100
- package/dist/{chunk-VW3QQWEL.cjs → chunk-7ZCUANBT.cjs} +29 -29
- package/dist/{chunk-LP6DQCKV.cjs → chunk-CPIQJR47.cjs} +54 -54
- package/dist/{chunk-A6QLADED.mjs → chunk-CSQRKM4Y.mjs} +123 -2
- package/dist/{chunk-CEIWN53N.cjs → chunk-DLYVHOME.cjs} +130 -9
- package/dist/{chunk-XF7M4TTT.mjs → chunk-K6YG3I6O.mjs} +3 -3
- package/dist/{chunk-RQSAANC3.mjs → chunk-N6T4TKXI.mjs} +1 -1
- package/dist/{chunk-YXTWMYHK.mjs → chunk-XTTTHW3W.mjs} +3 -3
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +11 -2
- package/dist/constants.d.ts +11 -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.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.mjs +4 -4
- package/dist/reown.cjs +5 -5
- package/dist/reown.mjs +4 -4
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.mjs +3 -3
- package/package.json +56 -9
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunk7ZCUANBTcjs = require('./chunk-7ZCUANBT.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -36,7 +36,7 @@ var _chunkVW3QQWELcjs = require('./chunk-VW3QQWEL.cjs');
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkDLYVHOMEcjs = require('./chunk-DLYVHOME.cjs');
|
|
40
40
|
|
|
41
41
|
// src/DepositModal.tsx
|
|
42
42
|
|
|
@@ -56,15 +56,15 @@ var _react = require('react');
|
|
|
56
56
|
|
|
57
57
|
var _jsxruntime = require('react/jsx-runtime');
|
|
58
58
|
async function resolveSessionOwner(eoaAddress) {
|
|
59
|
-
const localOwner =
|
|
59
|
+
const localOwner = _chunk7ZCUANBTcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
60
60
|
if (localOwner) {
|
|
61
61
|
return {
|
|
62
|
-
account:
|
|
62
|
+
account: _chunk7ZCUANBTcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
63
63
|
address: localOwner.address
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
const created =
|
|
67
|
-
|
|
66
|
+
const created = _chunk7ZCUANBTcjs.createSessionOwnerKey.call(void 0, );
|
|
67
|
+
_chunk7ZCUANBTcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
68
68
|
return {
|
|
69
69
|
account: created.account,
|
|
70
70
|
address: created.address
|
|
@@ -126,7 +126,7 @@ function SetupStep({
|
|
|
126
126
|
primaryType: typedData.primaryType,
|
|
127
127
|
message: typedData.message
|
|
128
128
|
});
|
|
129
|
-
const sessionDetails =
|
|
129
|
+
const sessionDetails = _chunk7ZCUANBTcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
|
|
130
130
|
setState({ type: "registering" });
|
|
131
131
|
await service.registerAccount({
|
|
132
132
|
address: smartAccount,
|
|
@@ -197,7 +197,7 @@ function SetupStep({
|
|
|
197
197
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
198
198
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
|
|
199
199
|
isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
200
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
200
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7ZCUANBTcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
|
|
201
201
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
|
|
202
202
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
|
|
203
203
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
|
|
@@ -234,7 +234,7 @@ function SetupStep({
|
|
|
234
234
|
] })
|
|
235
235
|
] })
|
|
236
236
|
] }),
|
|
237
|
-
isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
237
|
+
isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7ZCUANBTcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
|
|
238
238
|
] });
|
|
239
239
|
}
|
|
240
240
|
|
|
@@ -257,7 +257,7 @@ function AssetSelectStep({
|
|
|
257
257
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
258
258
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
259
259
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
260
|
-
return
|
|
260
|
+
return _chunk7ZCUANBTcjs.getAssetId.call(void 0, {
|
|
261
261
|
chainId: defaultSourceChain,
|
|
262
262
|
token: defaultSourceToken
|
|
263
263
|
});
|
|
@@ -274,10 +274,10 @@ function AssetSelectStep({
|
|
|
274
274
|
try {
|
|
275
275
|
const portfolio = await service.fetchPortfolio(address);
|
|
276
276
|
if (!active) return;
|
|
277
|
-
const portfolioAssets =
|
|
277
|
+
const portfolioAssets = _chunk7ZCUANBTcjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
278
278
|
setAssets(portfolioAssets);
|
|
279
279
|
const hasNative = portfolioAssets.some(
|
|
280
|
-
(asset) => asset.token.toLowerCase() ===
|
|
280
|
+
(asset) => asset.token.toLowerCase() === _chunkDLYVHOMEcjs.NATIVE_TOKEN_ADDRESS
|
|
281
281
|
);
|
|
282
282
|
if (!hasNative) {
|
|
283
283
|
const nativeAssets = await fetchNativeAssets(
|
|
@@ -342,7 +342,7 @@ function AssetSelectStep({
|
|
|
342
342
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
343
343
|
const numeric = Number(raw);
|
|
344
344
|
if (!Number.isFinite(numeric)) return raw;
|
|
345
|
-
return
|
|
345
|
+
return _chunk7ZCUANBTcjs.tokenFormatter.format(numeric);
|
|
346
346
|
} catch (e3) {
|
|
347
347
|
return asset.balance;
|
|
348
348
|
}
|
|
@@ -356,7 +356,7 @@ function AssetSelectStep({
|
|
|
356
356
|
style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
|
|
357
357
|
children: [
|
|
358
358
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
359
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
359
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7ZCUANBTcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
360
360
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
361
361
|
] }),
|
|
362
362
|
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 }) }),
|
|
@@ -389,9 +389,9 @@ function AssetSelectStep({
|
|
|
389
389
|
!loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((asset) => {
|
|
390
390
|
const isSelected = selectedAssetId === asset.id;
|
|
391
391
|
const tokenAmount = formatBalance(asset);
|
|
392
|
-
const badge =
|
|
393
|
-
const tokenIcon =
|
|
394
|
-
const chainIcon =
|
|
392
|
+
const badge = _chunkDLYVHOMEcjs.getChainBadge.call(void 0, asset.chainId);
|
|
393
|
+
const tokenIcon = _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, asset.symbol);
|
|
394
|
+
const chainIcon = _chunkDLYVHOMEcjs.getChainIcon.call(void 0, asset.chainId);
|
|
395
395
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
396
396
|
"button",
|
|
397
397
|
{
|
|
@@ -415,7 +415,7 @@ function AssetSelectStep({
|
|
|
415
415
|
"img",
|
|
416
416
|
{
|
|
417
417
|
src: chainIcon,
|
|
418
|
-
alt:
|
|
418
|
+
alt: _chunkDLYVHOMEcjs.getChainName.call(void 0, asset.chainId),
|
|
419
419
|
className: "rs-asset-chain-badge"
|
|
420
420
|
}
|
|
421
421
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -436,7 +436,7 @@ function AssetSelectStep({
|
|
|
436
436
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-asset-chain", children: [
|
|
437
437
|
" ",
|
|
438
438
|
"on ",
|
|
439
|
-
|
|
439
|
+
_chunkDLYVHOMEcjs.getChainName.call(void 0, asset.chainId)
|
|
440
440
|
] })
|
|
441
441
|
] }),
|
|
442
442
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-balance-small", children: [
|
|
@@ -446,7 +446,7 @@ function AssetSelectStep({
|
|
|
446
446
|
] })
|
|
447
447
|
] })
|
|
448
448
|
] }),
|
|
449
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 ?
|
|
449
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 ? _chunk7ZCUANBTcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
450
450
|
]
|
|
451
451
|
},
|
|
452
452
|
asset.id
|
|
@@ -456,7 +456,7 @@ function AssetSelectStep({
|
|
|
456
456
|
}
|
|
457
457
|
),
|
|
458
458
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
459
|
-
|
|
459
|
+
_chunk7ZCUANBTcjs.Button,
|
|
460
460
|
{
|
|
461
461
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
462
462
|
disabled: !selectedAsset,
|
|
@@ -464,17 +464,17 @@ function AssetSelectStep({
|
|
|
464
464
|
children: "Continue"
|
|
465
465
|
}
|
|
466
466
|
) }),
|
|
467
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
467
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7ZCUANBTcjs.PoweredBy, {})
|
|
468
468
|
] });
|
|
469
469
|
}
|
|
470
470
|
async function fetchNativeAssets(address, publicClient, existing) {
|
|
471
471
|
const existingIds = new Set(existing.map((asset) => asset.id));
|
|
472
472
|
const connectedChainId = _optionalChain([publicClient, 'access', _5 => _5.chain, 'optionalAccess', _6 => _6.id]);
|
|
473
473
|
if (!connectedChainId) return [];
|
|
474
|
-
if (!
|
|
475
|
-
const id =
|
|
474
|
+
if (!_chunkDLYVHOMEcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
|
|
475
|
+
const id = _chunk7ZCUANBTcjs.getAssetId.call(void 0, {
|
|
476
476
|
chainId: connectedChainId,
|
|
477
|
-
token:
|
|
477
|
+
token: _chunkDLYVHOMEcjs.NATIVE_TOKEN_ADDRESS
|
|
478
478
|
});
|
|
479
479
|
if (existingIds.has(id)) return [];
|
|
480
480
|
try {
|
|
@@ -483,7 +483,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
|
|
|
483
483
|
{
|
|
484
484
|
id,
|
|
485
485
|
chainId: connectedChainId,
|
|
486
|
-
token:
|
|
486
|
+
token: _chunkDLYVHOMEcjs.NATIVE_TOKEN_ADDRESS,
|
|
487
487
|
symbol: "ETH",
|
|
488
488
|
name: "Ethereum",
|
|
489
489
|
decimals: 18,
|
|
@@ -552,7 +552,7 @@ function AmountStep({
|
|
|
552
552
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
553
553
|
if (!balanceTarget || !publicClient) return;
|
|
554
554
|
try {
|
|
555
|
-
const bal =
|
|
555
|
+
const bal = _chunk7ZCUANBTcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
556
556
|
address: asset.token,
|
|
557
557
|
abi: _viem.erc20Abi,
|
|
558
558
|
functionName: "balanceOf",
|
|
@@ -613,7 +613,7 @@ function AmountStep({
|
|
|
613
613
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
614
614
|
const numeric = Number(raw);
|
|
615
615
|
if (!Number.isFinite(numeric)) return raw;
|
|
616
|
-
return
|
|
616
|
+
return _chunk7ZCUANBTcjs.tokenFormatter.format(numeric);
|
|
617
617
|
} catch (e8) {
|
|
618
618
|
return "...";
|
|
619
619
|
}
|
|
@@ -627,9 +627,9 @@ function AmountStep({
|
|
|
627
627
|
}, [amountUsd, tokenPriceUsd]);
|
|
628
628
|
const formattedTokenAmount = _react.useMemo.call(void 0, () => {
|
|
629
629
|
if (tokenAmount === null) return "0.00";
|
|
630
|
-
return
|
|
630
|
+
return _chunk7ZCUANBTcjs.tokenFormatter.format(tokenAmount);
|
|
631
631
|
}, [tokenAmount]);
|
|
632
|
-
const targetSymbol =
|
|
632
|
+
const targetSymbol = _chunkDLYVHOMEcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
633
633
|
const handlePresetClick = (percentage) => {
|
|
634
634
|
if (balanceUsd === null) return;
|
|
635
635
|
const value = balanceUsd * percentage / 100;
|
|
@@ -644,13 +644,13 @@ function AmountStep({
|
|
|
644
644
|
}
|
|
645
645
|
if (_optionalChain([uiConfig, 'optionalAccess', _10 => _10.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
|
|
646
646
|
setError(
|
|
647
|
-
`Maximum deposit is ${
|
|
647
|
+
`Maximum deposit is ${_chunk7ZCUANBTcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
|
|
648
648
|
);
|
|
649
649
|
return;
|
|
650
650
|
}
|
|
651
651
|
if (_optionalChain([uiConfig, 'optionalAccess', _11 => _11.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
|
|
652
652
|
setError(
|
|
653
|
-
`Minimum deposit is ${
|
|
653
|
+
`Minimum deposit is ${_chunk7ZCUANBTcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
|
|
654
654
|
);
|
|
655
655
|
return;
|
|
656
656
|
}
|
|
@@ -720,7 +720,7 @@ function AmountStep({
|
|
|
720
720
|
balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
|
|
721
721
|
" ",
|
|
722
722
|
"(",
|
|
723
|
-
|
|
723
|
+
_chunk7ZCUANBTcjs.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: _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, asset.symbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
738
738
|
"img",
|
|
739
739
|
{
|
|
740
|
-
src:
|
|
740
|
+
src: _chunkDLYVHOMEcjs.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 = _chunkDLYVHOMEcjs.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: _chunkDLYVHOMEcjs.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 = _chunkDLYVHOMEcjs.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: _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, targetSymbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
795
795
|
"img",
|
|
796
796
|
{
|
|
797
|
-
src:
|
|
797
|
+
src: _chunkDLYVHOMEcjs.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 = _chunkDLYVHOMEcjs.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: _chunkDLYVHOMEcjs.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 = _chunkDLYVHOMEcjs.getChainBadge.call(void 0, targetChain);
|
|
814
814
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
815
815
|
"div",
|
|
816
816
|
{
|
|
@@ -859,11 +859,11 @@ function AmountStep({
|
|
|
859
859
|
chainMismatch && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch", style: { marginTop: 16 }, children: [
|
|
860
860
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch-text", children: [
|
|
861
861
|
"Switch your wallet to ",
|
|
862
|
-
|
|
862
|
+
_chunkDLYVHOMEcjs.getChainName.call(void 0, asset.chainId),
|
|
863
863
|
" to continue."
|
|
864
864
|
] }),
|
|
865
865
|
switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
866
|
-
|
|
866
|
+
_chunk7ZCUANBTcjs.Button,
|
|
867
867
|
{
|
|
868
868
|
variant: "outline",
|
|
869
869
|
size: "small",
|
|
@@ -896,7 +896,7 @@ function AmountStep({
|
|
|
896
896
|
] })
|
|
897
897
|
] }),
|
|
898
898
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
899
|
-
|
|
899
|
+
_chunk7ZCUANBTcjs.Button,
|
|
900
900
|
{
|
|
901
901
|
onClick: handleContinue,
|
|
902
902
|
fullWidth: true,
|
|
@@ -904,7 +904,7 @@ function AmountStep({
|
|
|
904
904
|
children: "Continue"
|
|
905
905
|
}
|
|
906
906
|
) }),
|
|
907
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7ZCUANBTcjs.PoweredBy, {})
|
|
908
908
|
] });
|
|
909
909
|
}
|
|
910
910
|
|
|
@@ -933,7 +933,7 @@ function ConfirmStep({
|
|
|
933
933
|
const [isSwitching, setIsSwitching] = _react.useState.call(void 0, false);
|
|
934
934
|
const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _12 => _12.chain, 'optionalAccess', _13 => _13.id]) && walletClient.chain.id !== asset.chainId;
|
|
935
935
|
const sameRoute = targetChain === asset.chainId && targetToken.toLowerCase() === asset.token.toLowerCase();
|
|
936
|
-
const targetSymbol = sameRoute ? asset.symbol :
|
|
936
|
+
const targetSymbol = sameRoute ? asset.symbol : _chunkDLYVHOMEcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
937
937
|
const formattedAmount = amount && !Number.isNaN(Number(amount)) ? Number(amount).toLocaleString("en-US", { maximumFractionDigits: 6 }) : "0";
|
|
938
938
|
const tokenPriceUsd = _react.useMemo.call(void 0, () => {
|
|
939
939
|
if (asset.balanceUsd === void 0 || !asset.balance) return null;
|
|
@@ -986,7 +986,7 @@ function ConfirmStep({
|
|
|
986
986
|
return;
|
|
987
987
|
}
|
|
988
988
|
if (chainMismatch) {
|
|
989
|
-
setError(`Switch to ${
|
|
989
|
+
setError(`Switch to ${_chunkDLYVHOMEcjs.getChainName.call(void 0, asset.chainId)} to sign`);
|
|
990
990
|
return;
|
|
991
991
|
}
|
|
992
992
|
const parsedAmount = parseFloat(amount);
|
|
@@ -1014,7 +1014,7 @@ function ConfirmStep({
|
|
|
1014
1014
|
throw new Error("Wallet not properly connected");
|
|
1015
1015
|
}
|
|
1016
1016
|
const transferTo = sameRoute ? recipient : smartAccount;
|
|
1017
|
-
const hash =
|
|
1017
|
+
const hash = _chunk7ZCUANBTcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
|
|
1018
1018
|
account,
|
|
1019
1019
|
chain,
|
|
1020
1020
|
to: transferTo,
|
|
@@ -1031,7 +1031,7 @@ function ConfirmStep({
|
|
|
1031
1031
|
onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
|
|
1032
1032
|
} catch (err) {
|
|
1033
1033
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1034
|
-
const message =
|
|
1034
|
+
const message = _chunk7ZCUANBTcjs.formatUserError.call(void 0, raw);
|
|
1035
1035
|
setError(message);
|
|
1036
1036
|
_optionalChain([onError, 'optionalCall', _15 => _15(message, "TRANSFER_ERROR")]);
|
|
1037
1037
|
} finally {
|
|
@@ -1045,7 +1045,7 @@ function ConfirmStep({
|
|
|
1045
1045
|
await switchChain(asset.chainId);
|
|
1046
1046
|
} catch (err) {
|
|
1047
1047
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
1048
|
-
setError(
|
|
1048
|
+
setError(_chunk7ZCUANBTcjs.formatUserError.call(void 0, raw));
|
|
1049
1049
|
} finally {
|
|
1050
1050
|
setIsSwitching(false);
|
|
1051
1051
|
}
|
|
@@ -1062,15 +1062,15 @@ function ConfirmStep({
|
|
|
1062
1062
|
className: "rs-card-value",
|
|
1063
1063
|
style: { display: "flex", alignItems: "center", gap: 8 },
|
|
1064
1064
|
children: [
|
|
1065
|
-
|
|
1065
|
+
_chunkDLYVHOMEcjs.getChainIcon.call(void 0, asset.chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1066
1066
|
"img",
|
|
1067
1067
|
{
|
|
1068
|
-
src:
|
|
1068
|
+
src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, asset.chainId),
|
|
1069
1069
|
alt: "",
|
|
1070
1070
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1071
1071
|
}
|
|
1072
1072
|
),
|
|
1073
|
-
|
|
1073
|
+
_chunkDLYVHOMEcjs.getChainName.call(void 0, asset.chainId)
|
|
1074
1074
|
]
|
|
1075
1075
|
}
|
|
1076
1076
|
)
|
|
@@ -1083,15 +1083,15 @@ function ConfirmStep({
|
|
|
1083
1083
|
className: "rs-card-value",
|
|
1084
1084
|
style: { display: "flex", alignItems: "center", gap: 8 },
|
|
1085
1085
|
children: [
|
|
1086
|
-
|
|
1086
|
+
_chunkDLYVHOMEcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1087
1087
|
"img",
|
|
1088
1088
|
{
|
|
1089
|
-
src:
|
|
1089
|
+
src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, targetChain),
|
|
1090
1090
|
alt: "",
|
|
1091
1091
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1092
1092
|
}
|
|
1093
1093
|
),
|
|
1094
|
-
|
|
1094
|
+
_chunkDLYVHOMEcjs.getChainName.call(void 0, targetChain)
|
|
1095
1095
|
]
|
|
1096
1096
|
}
|
|
1097
1097
|
)
|
|
@@ -1110,10 +1110,10 @@ function ConfirmStep({
|
|
|
1110
1110
|
className: "rs-card-value",
|
|
1111
1111
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1112
1112
|
children: [
|
|
1113
|
-
|
|
1113
|
+
_chunkDLYVHOMEcjs.getTokenIcon.call(void 0, asset.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1114
1114
|
"img",
|
|
1115
1115
|
{
|
|
1116
|
-
src:
|
|
1116
|
+
src: _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, asset.symbol),
|
|
1117
1117
|
alt: "",
|
|
1118
1118
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1119
1119
|
}
|
|
@@ -1133,10 +1133,10 @@ function ConfirmStep({
|
|
|
1133
1133
|
className: "rs-card-value",
|
|
1134
1134
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1135
1135
|
children: [
|
|
1136
|
-
|
|
1136
|
+
_chunkDLYVHOMEcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1137
1137
|
"img",
|
|
1138
1138
|
{
|
|
1139
|
-
src:
|
|
1139
|
+
src: _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, targetSymbol),
|
|
1140
1140
|
alt: "",
|
|
1141
1141
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1142
1142
|
}
|
|
@@ -1150,17 +1150,17 @@ function ConfirmStep({
|
|
|
1150
1150
|
] }),
|
|
1151
1151
|
receiveAmountUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-card-row", children: [
|
|
1152
1152
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-label", children: "Value" }),
|
|
1153
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-value", children:
|
|
1153
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-value", children: _chunk7ZCUANBTcjs.currencyFormatter.format(receiveAmountUsd) })
|
|
1154
1154
|
] })
|
|
1155
1155
|
] }),
|
|
1156
1156
|
chainMismatch && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch", children: [
|
|
1157
1157
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch-text", children: [
|
|
1158
1158
|
"Switch your wallet to ",
|
|
1159
|
-
|
|
1159
|
+
_chunkDLYVHOMEcjs.getChainName.call(void 0, asset.chainId),
|
|
1160
1160
|
" to sign."
|
|
1161
1161
|
] }),
|
|
1162
1162
|
switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1163
|
-
|
|
1163
|
+
_chunk7ZCUANBTcjs.Button,
|
|
1164
1164
|
{
|
|
1165
1165
|
variant: "outline",
|
|
1166
1166
|
size: "small",
|
|
@@ -1193,7 +1193,7 @@ function ConfirmStep({
|
|
|
1193
1193
|
] })
|
|
1194
1194
|
] }),
|
|
1195
1195
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1196
|
-
|
|
1196
|
+
_chunk7ZCUANBTcjs.Button,
|
|
1197
1197
|
{
|
|
1198
1198
|
onClick: handleConfirm,
|
|
1199
1199
|
loading: isSubmitting,
|
|
@@ -1202,7 +1202,7 @@ function ConfirmStep({
|
|
|
1202
1202
|
children: "Confirm Order"
|
|
1203
1203
|
}
|
|
1204
1204
|
) }),
|
|
1205
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1205
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7ZCUANBTcjs.PoweredBy, {})
|
|
1206
1206
|
] });
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
@@ -1347,12 +1347,12 @@ function DepositAddressStep({
|
|
|
1347
1347
|
onDepositDetected,
|
|
1348
1348
|
onError
|
|
1349
1349
|
}) {
|
|
1350
|
-
const supportedChainIds = _react.useMemo.call(void 0, () =>
|
|
1350
|
+
const supportedChainIds = _react.useMemo.call(void 0, () => _chunkDLYVHOMEcjs.getSupportedChainIds.call(void 0, ), []);
|
|
1351
1351
|
const BASE_CHAIN_ID = 8453;
|
|
1352
1352
|
const defaultChainId = supportedChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : supportedChainIds[0];
|
|
1353
1353
|
const [sourceChainId, setSourceChainId] = _react.useState.call(void 0, defaultChainId);
|
|
1354
1354
|
const tokensForChain = _react.useMemo.call(void 0,
|
|
1355
|
-
() =>
|
|
1355
|
+
() => _chunkDLYVHOMEcjs.getSupportedTokenSymbolsForChain.call(void 0, sourceChainId),
|
|
1356
1356
|
[sourceChainId]
|
|
1357
1357
|
);
|
|
1358
1358
|
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
|
|
@@ -1407,7 +1407,7 @@ function DepositAddressStep({
|
|
|
1407
1407
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
1408
1408
|
if (cancelled || depositHandledRef.current) return;
|
|
1409
1409
|
const event = status.lastEvent;
|
|
1410
|
-
const eventTxHash =
|
|
1410
|
+
const eventTxHash = _chunk7ZCUANBTcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_optionalChain([_chunk7ZCUANBTcjs.getEventTxHash.call(void 0, event), 'optionalAccess', _19 => _19.toLowerCase, 'call', _20 => _20()]), () => ( null)) : null;
|
|
1411
1411
|
if (baselineTxHash === void 0) {
|
|
1412
1412
|
baselineTxHash = eventTxHash;
|
|
1413
1413
|
} else if (eventTxHash && eventTxHash !== baselineTxHash) {
|
|
@@ -1415,7 +1415,7 @@ function DepositAddressStep({
|
|
|
1415
1415
|
const fallback = sourceSelectionRef.current;
|
|
1416
1416
|
const chainId = _nullishCoalesce(details.chainId, () => ( fallback.chainId));
|
|
1417
1417
|
const amount = _nullishCoalesce(details.amount, () => ( "0"));
|
|
1418
|
-
const token = _nullishCoalesce(details.token, () => (
|
|
1418
|
+
const token = _nullishCoalesce(details.token, () => ( _chunkDLYVHOMEcjs.getTokenAddress.call(void 0, fallback.tokenSymbol, fallback.chainId)));
|
|
1419
1419
|
if (token) {
|
|
1420
1420
|
depositHandledRef.current = true;
|
|
1421
1421
|
onDepositDetected(eventTxHash, chainId, amount, token);
|
|
@@ -1440,7 +1440,7 @@ function DepositAddressStep({
|
|
|
1440
1440
|
clearTimeout(timeoutId);
|
|
1441
1441
|
};
|
|
1442
1442
|
}, [smartAccount, service, onDepositDetected, onError]);
|
|
1443
|
-
const chainIconSrc =
|
|
1443
|
+
const chainIconSrc = _chunkDLYVHOMEcjs.getChainIcon.call(void 0, sourceChainId);
|
|
1444
1444
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
1445
1445
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-body", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address", children: [
|
|
1446
1446
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
|
|
@@ -1456,10 +1456,10 @@ function DepositAddressStep({
|
|
|
1456
1456
|
setChainDropdownOpen(false);
|
|
1457
1457
|
},
|
|
1458
1458
|
children: [
|
|
1459
|
-
|
|
1459
|
+
_chunkDLYVHOMEcjs.getTokenIcon.call(void 0, sourceTokenSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1460
1460
|
"img",
|
|
1461
1461
|
{
|
|
1462
|
-
src:
|
|
1462
|
+
src: _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, sourceTokenSymbol),
|
|
1463
1463
|
alt: "",
|
|
1464
1464
|
className: "rs-deposit-address-dropdown-icon"
|
|
1465
1465
|
}
|
|
@@ -1496,10 +1496,10 @@ function DepositAddressStep({
|
|
|
1496
1496
|
setTokenDropdownOpen(false);
|
|
1497
1497
|
},
|
|
1498
1498
|
children: [
|
|
1499
|
-
|
|
1499
|
+
_chunkDLYVHOMEcjs.getTokenIcon.call(void 0, symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1500
1500
|
"img",
|
|
1501
1501
|
{
|
|
1502
|
-
src:
|
|
1502
|
+
src: _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, symbol),
|
|
1503
1503
|
alt: "",
|
|
1504
1504
|
className: "rs-deposit-address-dropdown-icon"
|
|
1505
1505
|
}
|
|
@@ -1522,15 +1522,15 @@ function DepositAddressStep({
|
|
|
1522
1522
|
setTokenDropdownOpen(false);
|
|
1523
1523
|
},
|
|
1524
1524
|
children: [
|
|
1525
|
-
|
|
1525
|
+
_chunkDLYVHOMEcjs.getChainIcon.call(void 0, sourceChainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1526
1526
|
"img",
|
|
1527
1527
|
{
|
|
1528
|
-
src:
|
|
1528
|
+
src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, sourceChainId),
|
|
1529
1529
|
alt: "",
|
|
1530
1530
|
className: "rs-deposit-address-dropdown-icon"
|
|
1531
1531
|
}
|
|
1532
1532
|
),
|
|
1533
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children:
|
|
1533
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkDLYVHOMEcjs.getChainName.call(void 0, sourceChainId) }),
|
|
1534
1534
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1535
1535
|
"svg",
|
|
1536
1536
|
{
|
|
@@ -1562,15 +1562,15 @@ function DepositAddressStep({
|
|
|
1562
1562
|
setChainDropdownOpen(false);
|
|
1563
1563
|
},
|
|
1564
1564
|
children: [
|
|
1565
|
-
|
|
1565
|
+
_chunkDLYVHOMEcjs.getChainIcon.call(void 0, chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1566
1566
|
"img",
|
|
1567
1567
|
{
|
|
1568
|
-
src:
|
|
1568
|
+
src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, chainId),
|
|
1569
1569
|
alt: "",
|
|
1570
1570
|
className: "rs-deposit-address-dropdown-icon"
|
|
1571
1571
|
}
|
|
1572
1572
|
),
|
|
1573
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children:
|
|
1573
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkDLYVHOMEcjs.getChainName.call(void 0, chainId) })
|
|
1574
1574
|
]
|
|
1575
1575
|
},
|
|
1576
1576
|
chainId
|
|
@@ -1620,7 +1620,7 @@ function DepositAddressStep({
|
|
|
1620
1620
|
] }),
|
|
1621
1621
|
pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
|
|
1622
1622
|
] }) }),
|
|
1623
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1623
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7ZCUANBTcjs.PoweredBy, {})
|
|
1624
1624
|
] });
|
|
1625
1625
|
}
|
|
1626
1626
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -1641,7 +1641,7 @@ function DepositFlow({
|
|
|
1641
1641
|
sourceToken: defaultSourceToken,
|
|
1642
1642
|
amount: defaultAmount,
|
|
1643
1643
|
recipient,
|
|
1644
|
-
signerAddress =
|
|
1644
|
+
signerAddress = _chunkDLYVHOMEcjs.DEFAULT_SIGNER_ADDRESS,
|
|
1645
1645
|
sessionChainIds,
|
|
1646
1646
|
forceRegister = false,
|
|
1647
1647
|
waitForFinalTx = true,
|
|
@@ -1705,7 +1705,7 @@ function DepositFlow({
|
|
|
1705
1705
|
return {
|
|
1706
1706
|
ownerAddress: dappAddress,
|
|
1707
1707
|
walletClient: void 0,
|
|
1708
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
1708
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7ZCUANBTcjs.getPublicClient.call(void 0, targetChain))),
|
|
1709
1709
|
switchChain: void 0
|
|
1710
1710
|
};
|
|
1711
1711
|
}
|
|
@@ -1714,7 +1714,7 @@ function DepositFlow({
|
|
|
1714
1714
|
return {
|
|
1715
1715
|
ownerAddress: dappWalletClient.account.address,
|
|
1716
1716
|
walletClient: dappWalletClient,
|
|
1717
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
1717
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7ZCUANBTcjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
1718
1718
|
switchChain: dappSwitchChain
|
|
1719
1719
|
};
|
|
1720
1720
|
}
|
|
@@ -1724,7 +1724,7 @@ function DepositFlow({
|
|
|
1724
1724
|
return {
|
|
1725
1725
|
ownerAddress: dappWalletClient.account.address,
|
|
1726
1726
|
walletClient: dappWalletClient,
|
|
1727
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
1727
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7ZCUANBTcjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
1728
1728
|
switchChain: dappSwitchChain
|
|
1729
1729
|
};
|
|
1730
1730
|
}
|
|
@@ -1932,7 +1932,7 @@ function DepositFlow({
|
|
|
1932
1932
|
}, [walletOptionsKey, selectedConnectAddressEffective]);
|
|
1933
1933
|
if (showConnectStep) {
|
|
1934
1934
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1935
|
-
|
|
1935
|
+
_chunk7ZCUANBTcjs.ConnectStep,
|
|
1936
1936
|
{
|
|
1937
1937
|
walletOptions,
|
|
1938
1938
|
selectedAddress: selectedConnectAddressEffective,
|
|
@@ -1983,7 +1983,7 @@ function DepositFlow({
|
|
|
1983
1983
|
}
|
|
1984
1984
|
),
|
|
1985
1985
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1986
|
-
|
|
1986
|
+
_chunk7ZCUANBTcjs.ProcessingStep,
|
|
1987
1987
|
{
|
|
1988
1988
|
smartAccount: step.smartAccount,
|
|
1989
1989
|
txHash: step.txHash,
|
|
@@ -2014,7 +2014,7 @@ function DepositFlow({
|
|
|
2014
2014
|
if (_optionalChain([signerContext, 'access', _55 => _55.publicClient, 'access', _56 => _56.chain, 'optionalAccess', _57 => _57.id]) === chainId) {
|
|
2015
2015
|
return signerContext.publicClient;
|
|
2016
2016
|
}
|
|
2017
|
-
return
|
|
2017
|
+
return _chunk7ZCUANBTcjs.getPublicClient.call(void 0, chainId);
|
|
2018
2018
|
};
|
|
2019
2019
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
2020
2020
|
step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2080,7 +2080,7 @@ function DepositFlow({
|
|
|
2080
2080
|
}
|
|
2081
2081
|
),
|
|
2082
2082
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2083
|
-
|
|
2083
|
+
_chunk7ZCUANBTcjs.ProcessingStep,
|
|
2084
2084
|
{
|
|
2085
2085
|
smartAccount: step.smartAccount,
|
|
2086
2086
|
txHash: step.txHash,
|
|
@@ -2105,7 +2105,7 @@ function DepositFlow({
|
|
|
2105
2105
|
// src/DepositModal.tsx
|
|
2106
2106
|
|
|
2107
2107
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
2108
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
2108
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-4PFOMSC6.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
2109
2109
|
);
|
|
2110
2110
|
function DepositModal(props) {
|
|
2111
2111
|
const needsReown = !!props.reownAppId;
|
|
@@ -2128,8 +2128,8 @@ function DepositModalInner({
|
|
|
2128
2128
|
sourceToken,
|
|
2129
2129
|
defaultAmount,
|
|
2130
2130
|
recipient,
|
|
2131
|
-
backendUrl =
|
|
2132
|
-
signerAddress =
|
|
2131
|
+
backendUrl = _chunkDLYVHOMEcjs.DEFAULT_BACKEND_URL,
|
|
2132
|
+
signerAddress = _chunkDLYVHOMEcjs.DEFAULT_SIGNER_ADDRESS,
|
|
2133
2133
|
sessionChainIds,
|
|
2134
2134
|
forceRegister = false,
|
|
2135
2135
|
waitForFinalTx = true,
|
|
@@ -2153,12 +2153,12 @@ function DepositModalInner({
|
|
|
2153
2153
|
const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
|
|
2154
2154
|
const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
|
|
2155
2155
|
const backHandlerRef = _react.useRef.call(void 0, void 0);
|
|
2156
|
-
const targetChain =
|
|
2157
|
-
const sourceChain = sourceChainProp ?
|
|
2158
|
-
const service = _react.useMemo.call(void 0, () =>
|
|
2156
|
+
const targetChain = _chunkDLYVHOMEcjs.getChainId.call(void 0, targetChainProp);
|
|
2157
|
+
const sourceChain = sourceChainProp ? _chunkDLYVHOMEcjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
2158
|
+
const service = _react.useMemo.call(void 0, () => _chunk7ZCUANBTcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
|
|
2159
2159
|
_react.useEffect.call(void 0, () => {
|
|
2160
2160
|
if (isOpen && modalRef.current) {
|
|
2161
|
-
|
|
2161
|
+
_chunk7ZCUANBTcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
2162
2162
|
}
|
|
2163
2163
|
}, [isOpen, theme]);
|
|
2164
2164
|
const hasCalledReady = _react.useRef.call(void 0, false);
|
|
@@ -2194,7 +2194,7 @@ function DepositModalInner({
|
|
|
2194
2194
|
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _66 => _66.title]), () => ( "Deposit"));
|
|
2195
2195
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
|
|
2196
2196
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2197
|
-
|
|
2197
|
+
_chunk7ZCUANBTcjs.Modal,
|
|
2198
2198
|
{
|
|
2199
2199
|
isOpen,
|
|
2200
2200
|
onClose,
|
|
@@ -2255,7 +2255,7 @@ function DepositModalInner({
|
|
|
2255
2255
|
balanceTitle,
|
|
2256
2256
|
":"
|
|
2257
2257
|
] }),
|
|
2258
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children:
|
|
2258
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunk7ZCUANBTcjs.currencyFormatter.format(totalBalanceUsd) })
|
|
2259
2259
|
] })
|
|
2260
2260
|
] }),
|
|
2261
2261
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|