@rhinestone/deposit-modal 0.1.51 → 0.1.52
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-BMHCHJ2P.mjs → DepositModalReown-63LD7KSU.mjs} +2 -2
- package/dist/{DepositModalReown-KT5MMNTJ.cjs → DepositModalReown-SXQJYLTX.cjs} +3 -3
- package/dist/{WithdrawModalReown-DULPL255.cjs → WithdrawModalReown-JD665MKM.cjs} +3 -3
- package/dist/{WithdrawModalReown-V5HYDMO2.mjs → WithdrawModalReown-PUIM36NO.mjs} +2 -2
- package/dist/{chunk-DKYHVAHN.cjs → chunk-JL3R3JT6.cjs} +33 -33
- package/dist/{chunk-BNSX25TA.mjs → chunk-MKSZIA74.mjs} +491 -363
- package/dist/{chunk-G2GXEC7C.mjs → chunk-R64A3IEI.mjs} +2 -2
- package/dist/{chunk-NU3ES4JY.cjs → chunk-RVKMKH2C.cjs} +502 -374
- package/dist/{chunk-SKL3JJP6.mjs → chunk-VYYJWMEI.mjs} +2 -2
- package/dist/{chunk-2AS2NAJ2.cjs → chunk-ZW4SRCW5.cjs} +82 -82
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +3 -3
- package/dist/reown.cjs +4 -4
- package/dist/reown.mjs +3 -3
- package/dist/styles.css +263 -0
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkRVKMKH2Ccjs = require('./chunk-RVKMKH2C.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -61,15 +61,15 @@ var _react = require('react');
|
|
|
61
61
|
|
|
62
62
|
var _jsxruntime = require('react/jsx-runtime');
|
|
63
63
|
async function resolveSessionOwner(eoaAddress) {
|
|
64
|
-
const localOwner =
|
|
64
|
+
const localOwner = _chunkRVKMKH2Ccjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
65
65
|
if (localOwner) {
|
|
66
66
|
return {
|
|
67
|
-
account:
|
|
67
|
+
account: _chunkRVKMKH2Ccjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
68
68
|
address: localOwner.address
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
const created =
|
|
72
|
-
|
|
71
|
+
const created = _chunkRVKMKH2Ccjs.createSessionOwnerKey.call(void 0, );
|
|
72
|
+
_chunkRVKMKH2Ccjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
73
73
|
return {
|
|
74
74
|
account: created.account,
|
|
75
75
|
address: created.address
|
|
@@ -105,7 +105,7 @@ function SetupStep({
|
|
|
105
105
|
const setup = await service.setupAccount({
|
|
106
106
|
ownerAddress: address,
|
|
107
107
|
sessionOwnerAddress: sessionOwner.address,
|
|
108
|
-
targetChain:
|
|
108
|
+
targetChain: _chunkRVKMKH2Ccjs.toEvmCaip2.call(void 0, targetChain),
|
|
109
109
|
targetToken,
|
|
110
110
|
signerAddress,
|
|
111
111
|
sessionChainIds,
|
|
@@ -135,7 +135,7 @@ function SetupStep({
|
|
|
135
135
|
primaryType: typedData.primaryType,
|
|
136
136
|
message: typedData.message
|
|
137
137
|
});
|
|
138
|
-
const sessionDetails =
|
|
138
|
+
const sessionDetails = _chunkRVKMKH2Ccjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
|
|
139
139
|
setState({ type: "registering" });
|
|
140
140
|
const registerResult = await service.registerAccount({
|
|
141
141
|
address: smartAccount,
|
|
@@ -147,7 +147,7 @@ function SetupStep({
|
|
|
147
147
|
eoaAddress: address,
|
|
148
148
|
sessionOwner: sessionOwner.address,
|
|
149
149
|
target: {
|
|
150
|
-
chain:
|
|
150
|
+
chain: _chunkRVKMKH2Ccjs.toEvmCaip2.call(void 0, targetChain),
|
|
151
151
|
token: targetToken,
|
|
152
152
|
...recipient && { recipient }
|
|
153
153
|
}
|
|
@@ -210,7 +210,7 @@ function SetupStep({
|
|
|
210
210
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
211
211
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
|
|
212
212
|
isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
213
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
213
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
|
|
214
214
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
|
|
215
215
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
|
|
216
216
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
|
|
@@ -247,7 +247,7 @@ function SetupStep({
|
|
|
247
247
|
] })
|
|
248
248
|
] })
|
|
249
249
|
] }),
|
|
250
|
-
isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
250
|
+
isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
|
|
251
251
|
] });
|
|
252
252
|
}
|
|
253
253
|
|
|
@@ -272,7 +272,7 @@ function AssetSelectStep({
|
|
|
272
272
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
273
273
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
274
274
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
275
|
-
return
|
|
275
|
+
return _chunkRVKMKH2Ccjs.getAssetId.call(void 0, {
|
|
276
276
|
chainId: defaultSourceChain,
|
|
277
277
|
token: defaultSourceToken
|
|
278
278
|
});
|
|
@@ -289,7 +289,7 @@ function AssetSelectStep({
|
|
|
289
289
|
try {
|
|
290
290
|
const portfolio = await service.fetchPortfolio(address);
|
|
291
291
|
if (!active) return;
|
|
292
|
-
const portfolioAssets =
|
|
292
|
+
const portfolioAssets = _chunkRVKMKH2Ccjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
293
293
|
setAssets(portfolioAssets);
|
|
294
294
|
const hasNative = portfolioAssets.some(
|
|
295
295
|
(asset) => asset.token.toLowerCase() === _chunkNELAYNA3cjs.NATIVE_TOKEN_ADDRESS
|
|
@@ -370,7 +370,7 @@ function AssetSelectStep({
|
|
|
370
370
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
371
371
|
const numeric = Number(raw);
|
|
372
372
|
if (!Number.isFinite(numeric)) return raw;
|
|
373
|
-
return
|
|
373
|
+
return _chunkRVKMKH2Ccjs.tokenFormatter.format(numeric);
|
|
374
374
|
} catch (e3) {
|
|
375
375
|
return asset.balance;
|
|
376
376
|
}
|
|
@@ -384,7 +384,7 @@ function AssetSelectStep({
|
|
|
384
384
|
style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
|
|
385
385
|
children: [
|
|
386
386
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
387
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
387
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.Spinner, { className: "rs-text-tertiary" }),
|
|
388
388
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
389
389
|
] }),
|
|
390
390
|
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 }) }),
|
|
@@ -474,7 +474,7 @@ function AssetSelectStep({
|
|
|
474
474
|
] })
|
|
475
475
|
] })
|
|
476
476
|
] }),
|
|
477
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ?
|
|
477
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkRVKMKH2Ccjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
478
478
|
]
|
|
479
479
|
},
|
|
480
480
|
asset.id
|
|
@@ -484,7 +484,7 @@ function AssetSelectStep({
|
|
|
484
484
|
}
|
|
485
485
|
),
|
|
486
486
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
487
|
-
|
|
487
|
+
_chunkRVKMKH2Ccjs.Button,
|
|
488
488
|
{
|
|
489
489
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
490
490
|
disabled: !selectedAsset,
|
|
@@ -492,7 +492,7 @@ function AssetSelectStep({
|
|
|
492
492
|
children: "Continue"
|
|
493
493
|
}
|
|
494
494
|
) }),
|
|
495
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
495
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.PoweredBy, {})
|
|
496
496
|
] });
|
|
497
497
|
}
|
|
498
498
|
async function fetchNativeAssets(address, publicClient, existing) {
|
|
@@ -500,7 +500,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
|
|
|
500
500
|
const connectedChainId = _optionalChain([publicClient, 'access', _10 => _10.chain, 'optionalAccess', _11 => _11.id]);
|
|
501
501
|
if (!connectedChainId) return [];
|
|
502
502
|
if (!_chunkNELAYNA3cjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
|
|
503
|
-
const id =
|
|
503
|
+
const id = _chunkRVKMKH2Ccjs.getAssetId.call(void 0, {
|
|
504
504
|
chainId: connectedChainId,
|
|
505
505
|
token: _chunkNELAYNA3cjs.NATIVE_TOKEN_ADDRESS
|
|
506
506
|
});
|
|
@@ -586,7 +586,7 @@ function AmountStep({
|
|
|
586
586
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
587
587
|
if (!balanceTarget || !publicClient) return;
|
|
588
588
|
try {
|
|
589
|
-
const bal =
|
|
589
|
+
const bal = _chunkRVKMKH2Ccjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
590
590
|
address: asset.token,
|
|
591
591
|
abi: _viem.erc20Abi,
|
|
592
592
|
functionName: "balanceOf",
|
|
@@ -612,7 +612,7 @@ function AmountStep({
|
|
|
612
612
|
setIsSwitching(true);
|
|
613
613
|
switchChain(asset.chainId).catch((err) => {
|
|
614
614
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
615
|
-
setError(
|
|
615
|
+
setError(_chunkRVKMKH2Ccjs.formatUserError.call(void 0, raw));
|
|
616
616
|
}).finally(() => {
|
|
617
617
|
setIsSwitching(false);
|
|
618
618
|
});
|
|
@@ -648,7 +648,7 @@ function AmountStep({
|
|
|
648
648
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
649
649
|
const numeric = Number(raw);
|
|
650
650
|
if (!Number.isFinite(numeric)) return raw;
|
|
651
|
-
return
|
|
651
|
+
return _chunkRVKMKH2Ccjs.tokenFormatter.format(numeric);
|
|
652
652
|
} catch (e8) {
|
|
653
653
|
return "...";
|
|
654
654
|
}
|
|
@@ -690,13 +690,13 @@ function AmountStep({
|
|
|
690
690
|
const usdValue = numericAmount;
|
|
691
691
|
if (_optionalChain([uiConfig, 'optionalAccess', _15 => _15.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
|
|
692
692
|
setError(
|
|
693
|
-
`Maximum deposit is ${
|
|
693
|
+
`Maximum deposit is ${_chunkRVKMKH2Ccjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
|
|
694
694
|
);
|
|
695
695
|
return;
|
|
696
696
|
}
|
|
697
697
|
if (_optionalChain([uiConfig, 'optionalAccess', _16 => _16.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
|
|
698
698
|
setError(
|
|
699
|
-
`Minimum deposit is ${
|
|
699
|
+
`Minimum deposit is ${_chunkRVKMKH2Ccjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
|
|
700
700
|
);
|
|
701
701
|
return;
|
|
702
702
|
}
|
|
@@ -745,7 +745,7 @@ function AmountStep({
|
|
|
745
745
|
hasPricing && balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
|
|
746
746
|
" ",
|
|
747
747
|
"(",
|
|
748
|
-
|
|
748
|
+
_chunkRVKMKH2Ccjs.currencyFormatter.format(balanceUsd),
|
|
749
749
|
")"
|
|
750
750
|
] })
|
|
751
751
|
] }) })
|
|
@@ -904,7 +904,7 @@ function AmountStep({
|
|
|
904
904
|
] })
|
|
905
905
|
] }),
|
|
906
906
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
907
|
-
|
|
907
|
+
_chunkRVKMKH2Ccjs.Button,
|
|
908
908
|
{
|
|
909
909
|
onClick: handleContinue,
|
|
910
910
|
fullWidth: true,
|
|
@@ -912,7 +912,7 @@ function AmountStep({
|
|
|
912
912
|
children: "Continue"
|
|
913
913
|
}
|
|
914
914
|
) }),
|
|
915
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
915
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.PoweredBy, {})
|
|
916
916
|
] });
|
|
917
917
|
}
|
|
918
918
|
|
|
@@ -962,7 +962,7 @@ function ConfirmStep({
|
|
|
962
962
|
setIsSwitching(true);
|
|
963
963
|
switchChain(asset.chainId).catch((err) => {
|
|
964
964
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
965
|
-
setError(
|
|
965
|
+
setError(_chunkRVKMKH2Ccjs.formatUserError.call(void 0, raw));
|
|
966
966
|
}).finally(() => {
|
|
967
967
|
setIsSwitching(false);
|
|
968
968
|
});
|
|
@@ -1005,7 +1005,7 @@ function ConfirmStep({
|
|
|
1005
1005
|
throw new Error("Wallet not properly connected");
|
|
1006
1006
|
}
|
|
1007
1007
|
const transferTo = sameRoute ? recipient : smartAccount;
|
|
1008
|
-
const hash =
|
|
1008
|
+
const hash = _chunkRVKMKH2Ccjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
|
|
1009
1009
|
account,
|
|
1010
1010
|
chain,
|
|
1011
1011
|
to: transferTo,
|
|
@@ -1022,7 +1022,7 @@ function ConfirmStep({
|
|
|
1022
1022
|
onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
|
|
1023
1023
|
} catch (err) {
|
|
1024
1024
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1025
|
-
const message =
|
|
1025
|
+
const message = _chunkRVKMKH2Ccjs.formatUserError.call(void 0, raw);
|
|
1026
1026
|
setError(message);
|
|
1027
1027
|
_optionalChain([onError, 'optionalCall', _20 => _20(message, "TRANSFER_ERROR")]);
|
|
1028
1028
|
} finally {
|
|
@@ -1151,7 +1151,7 @@ function ConfirmStep({
|
|
|
1151
1151
|
] })
|
|
1152
1152
|
] }),
|
|
1153
1153
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1154
|
-
|
|
1154
|
+
_chunkRVKMKH2Ccjs.Button,
|
|
1155
1155
|
{
|
|
1156
1156
|
onClick: handleConfirm,
|
|
1157
1157
|
loading: isSubmitting,
|
|
@@ -1160,7 +1160,7 @@ function ConfirmStep({
|
|
|
1160
1160
|
children: "Confirm Order"
|
|
1161
1161
|
}
|
|
1162
1162
|
) }),
|
|
1163
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1163
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.PoweredBy, {})
|
|
1164
1164
|
] });
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
@@ -1558,10 +1558,10 @@ function DepositAddressStep({
|
|
|
1558
1558
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
1559
1559
|
if (cancelled || depositHandledRef.current) return;
|
|
1560
1560
|
const event = status.lastEvent;
|
|
1561
|
-
const eventTxHash =
|
|
1561
|
+
const eventTxHash = _chunkRVKMKH2Ccjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkRVKMKH2Ccjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
1562
1562
|
if (baselineTxHash === void 0) {
|
|
1563
1563
|
baselineTxHash = eventTxHash;
|
|
1564
|
-
} else if (eventTxHash && (!baselineTxHash || !
|
|
1564
|
+
} else if (eventTxHash && (!baselineTxHash || !_chunkRVKMKH2Ccjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHash))) {
|
|
1565
1565
|
const details = getDepositEventDetails(event);
|
|
1566
1566
|
const fallback = sourceSelectionRef.current;
|
|
1567
1567
|
const chainId = _nullishCoalesce(details.chainId, () => ( fallback.chainId));
|
|
@@ -1784,7 +1784,7 @@ function DepositAddressStep({
|
|
|
1784
1784
|
] }),
|
|
1785
1785
|
pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
|
|
1786
1786
|
] }) }),
|
|
1787
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1787
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.PoweredBy, {})
|
|
1788
1788
|
] });
|
|
1789
1789
|
}
|
|
1790
1790
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -1815,7 +1815,7 @@ function SolanaTokenSelectStep({
|
|
|
1815
1815
|
setError(null);
|
|
1816
1816
|
const portfolioBySymbol = {};
|
|
1817
1817
|
try {
|
|
1818
|
-
|
|
1818
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
|
|
1819
1819
|
solanaAddress
|
|
1820
1820
|
});
|
|
1821
1821
|
const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
|
|
@@ -1838,12 +1838,12 @@ function SolanaTokenSelectStep({
|
|
|
1838
1838
|
};
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
1841
|
-
|
|
1841
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
|
|
1842
1842
|
symbols: Object.keys(portfolioBySymbol)
|
|
1843
1843
|
});
|
|
1844
1844
|
} catch (err) {
|
|
1845
1845
|
if (!active) return;
|
|
1846
|
-
|
|
1846
|
+
_chunkRVKMKH2Ccjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
|
|
1847
1847
|
solanaAddress
|
|
1848
1848
|
});
|
|
1849
1849
|
setError(
|
|
@@ -1897,7 +1897,7 @@ function SolanaTokenSelectStep({
|
|
|
1897
1897
|
style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
|
|
1898
1898
|
children: [
|
|
1899
1899
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
1900
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1900
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.Spinner, { className: "rs-text-tertiary" }),
|
|
1901
1901
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
1902
1902
|
] }),
|
|
1903
1903
|
!loading && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
@@ -1934,7 +1934,7 @@ function SolanaTokenSelectStep({
|
|
|
1934
1934
|
try {
|
|
1935
1935
|
const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
|
|
1936
1936
|
const numeric = Number(raw);
|
|
1937
|
-
formattedBalance = Number.isFinite(numeric) ?
|
|
1937
|
+
formattedBalance = Number.isFinite(numeric) ? _chunkRVKMKH2Ccjs.tokenFormatter.format(numeric) : raw;
|
|
1938
1938
|
} catch (e14) {
|
|
1939
1939
|
formattedBalance = "...";
|
|
1940
1940
|
}
|
|
@@ -1978,7 +1978,7 @@ function SolanaTokenSelectStep({
|
|
|
1978
1978
|
] })
|
|
1979
1979
|
] })
|
|
1980
1980
|
] }),
|
|
1981
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ?
|
|
1981
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkRVKMKH2Ccjs.currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
|
|
1982
1982
|
]
|
|
1983
1983
|
},
|
|
1984
1984
|
entry.token.symbol
|
|
@@ -1988,7 +1988,7 @@ function SolanaTokenSelectStep({
|
|
|
1988
1988
|
}
|
|
1989
1989
|
),
|
|
1990
1990
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1991
|
-
|
|
1991
|
+
_chunkRVKMKH2Ccjs.Button,
|
|
1992
1992
|
{
|
|
1993
1993
|
onClick: () => selectedEntry && onContinue(
|
|
1994
1994
|
selectedEntry.token,
|
|
@@ -2000,7 +2000,7 @@ function SolanaTokenSelectStep({
|
|
|
2000
2000
|
children: "Continue"
|
|
2001
2001
|
}
|
|
2002
2002
|
) }),
|
|
2003
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2003
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.PoweredBy, {})
|
|
2004
2004
|
] });
|
|
2005
2005
|
}
|
|
2006
2006
|
|
|
@@ -2048,7 +2048,7 @@ function SolanaAmountStep({
|
|
|
2048
2048
|
const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
|
|
2049
2049
|
const numeric = Number(raw);
|
|
2050
2050
|
if (!Number.isFinite(numeric)) return raw;
|
|
2051
|
-
return
|
|
2051
|
+
return _chunkRVKMKH2Ccjs.tokenFormatter.format(numeric);
|
|
2052
2052
|
} catch (e16) {
|
|
2053
2053
|
return "...";
|
|
2054
2054
|
}
|
|
@@ -2066,7 +2066,7 @@ function SolanaAmountStep({
|
|
|
2066
2066
|
}, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
|
|
2067
2067
|
const formattedBalanceUsd = _react.useMemo.call(void 0, () => {
|
|
2068
2068
|
if (computedBalanceUsd === null || computedBalanceUsd <= 0) return null;
|
|
2069
|
-
return
|
|
2069
|
+
return _chunkRVKMKH2Ccjs.currencyFormatter.format(computedBalanceUsd);
|
|
2070
2070
|
}, [computedBalanceUsd]);
|
|
2071
2071
|
const spendableBalance = _react.useMemo.call(void 0, () => {
|
|
2072
2072
|
if (!isNativeSol(token)) return balance;
|
|
@@ -2091,7 +2091,7 @@ function SolanaAmountStep({
|
|
|
2091
2091
|
const factor = 10 ** maxDecimals;
|
|
2092
2092
|
const truncated = Math.floor(value * factor) / factor;
|
|
2093
2093
|
const formatted = truncated.toFixed(maxDecimals).replace(/\.?0+$/, "");
|
|
2094
|
-
|
|
2094
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
|
|
2095
2095
|
percentage,
|
|
2096
2096
|
symbol: token.symbol,
|
|
2097
2097
|
formatted
|
|
@@ -2105,7 +2105,7 @@ function SolanaAmountStep({
|
|
|
2105
2105
|
const handleContinue = () => {
|
|
2106
2106
|
const numericAmount = parseFloat(amount);
|
|
2107
2107
|
if (isNaN(numericAmount) || numericAmount <= 0) {
|
|
2108
|
-
|
|
2108
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
2109
2109
|
amount,
|
|
2110
2110
|
reason: "nan-or-non-positive"
|
|
2111
2111
|
});
|
|
@@ -2117,13 +2117,13 @@ function SolanaAmountStep({
|
|
|
2117
2117
|
const usdValue = numericAmount;
|
|
2118
2118
|
if (_optionalChain([uiConfig, 'optionalAccess', _38 => _38.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
|
|
2119
2119
|
setError(
|
|
2120
|
-
`Maximum deposit is ${
|
|
2120
|
+
`Maximum deposit is ${_chunkRVKMKH2Ccjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
|
|
2121
2121
|
);
|
|
2122
2122
|
return;
|
|
2123
2123
|
}
|
|
2124
2124
|
if (_optionalChain([uiConfig, 'optionalAccess', _39 => _39.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
|
|
2125
2125
|
setError(
|
|
2126
|
-
`Minimum deposit is ${
|
|
2126
|
+
`Minimum deposit is ${_chunkRVKMKH2Ccjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
|
|
2127
2127
|
);
|
|
2128
2128
|
return;
|
|
2129
2129
|
}
|
|
@@ -2133,7 +2133,7 @@ function SolanaAmountStep({
|
|
|
2133
2133
|
try {
|
|
2134
2134
|
amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
|
|
2135
2135
|
} catch (e20) {
|
|
2136
|
-
|
|
2136
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
2137
2137
|
amount,
|
|
2138
2138
|
sourceAmount: sourceAmountStr,
|
|
2139
2139
|
reason: "parse-units-failed"
|
|
@@ -2143,7 +2143,7 @@ function SolanaAmountStep({
|
|
|
2143
2143
|
}
|
|
2144
2144
|
if (amountInUnits > spendableBalance) {
|
|
2145
2145
|
const isReserveIssue = isNativeSol(token) && amountInUnits <= balance;
|
|
2146
|
-
|
|
2146
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
2147
2147
|
amount,
|
|
2148
2148
|
balance: balance.toString(),
|
|
2149
2149
|
spendableBalance: spendableBalance.toString(),
|
|
@@ -2155,7 +2155,7 @@ function SolanaAmountStep({
|
|
|
2155
2155
|
);
|
|
2156
2156
|
return;
|
|
2157
2157
|
}
|
|
2158
|
-
|
|
2158
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
|
|
2159
2159
|
symbol: token.symbol,
|
|
2160
2160
|
inputAmountUsd: amount,
|
|
2161
2161
|
sourceAmount: sourceAmountStr,
|
|
@@ -2246,7 +2246,7 @@ function SolanaAmountStep({
|
|
|
2246
2246
|
] })
|
|
2247
2247
|
] }),
|
|
2248
2248
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2249
|
-
|
|
2249
|
+
_chunkRVKMKH2Ccjs.Button,
|
|
2250
2250
|
{
|
|
2251
2251
|
onClick: handleContinue,
|
|
2252
2252
|
fullWidth: true,
|
|
@@ -2254,7 +2254,7 @@ function SolanaAmountStep({
|
|
|
2254
2254
|
children: "Continue"
|
|
2255
2255
|
}
|
|
2256
2256
|
) }),
|
|
2257
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2257
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.PoweredBy, {})
|
|
2258
2258
|
] });
|
|
2259
2259
|
}
|
|
2260
2260
|
|
|
@@ -2298,7 +2298,7 @@ function SolanaConfirmStep({
|
|
|
2298
2298
|
const receiveAmount = isSameToken ? formattedReceiveAmount : `~ ${formattedReceiveAmount}`;
|
|
2299
2299
|
const handleConfirm = async () => {
|
|
2300
2300
|
if (!solanaProvider) {
|
|
2301
|
-
|
|
2301
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
2302
2302
|
reason: "missing-provider"
|
|
2303
2303
|
});
|
|
2304
2304
|
setError("Solana wallet not connected");
|
|
@@ -2306,7 +2306,7 @@ function SolanaConfirmStep({
|
|
|
2306
2306
|
}
|
|
2307
2307
|
const parsedAmount = parseFloat(sourceAmount);
|
|
2308
2308
|
if (isNaN(parsedAmount) || parsedAmount <= 0) {
|
|
2309
|
-
|
|
2309
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
2310
2310
|
reason: "invalid-amount",
|
|
2311
2311
|
sourceAmount
|
|
2312
2312
|
});
|
|
@@ -2315,7 +2315,7 @@ function SolanaConfirmStep({
|
|
|
2315
2315
|
}
|
|
2316
2316
|
setError(null);
|
|
2317
2317
|
setIsSubmitting(true);
|
|
2318
|
-
|
|
2318
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
|
|
2319
2319
|
smartAccount,
|
|
2320
2320
|
solanaAddress,
|
|
2321
2321
|
solanaDepositAddress,
|
|
@@ -2325,7 +2325,7 @@ function SolanaConfirmStep({
|
|
|
2325
2325
|
});
|
|
2326
2326
|
try {
|
|
2327
2327
|
const check = await service.checkAccount(smartAccount);
|
|
2328
|
-
|
|
2328
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
|
|
2329
2329
|
smartAccount,
|
|
2330
2330
|
isRegistered: check.isRegistered,
|
|
2331
2331
|
targetChain: check.targetChain,
|
|
@@ -2338,7 +2338,7 @@ function SolanaConfirmStep({
|
|
|
2338
2338
|
}
|
|
2339
2339
|
const connection = getSolanaConnection();
|
|
2340
2340
|
const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
|
|
2341
|
-
|
|
2341
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
|
|
2342
2342
|
token: token.symbol,
|
|
2343
2343
|
sourceAmount,
|
|
2344
2344
|
amountUnits: amountUnits.toString()
|
|
@@ -2355,7 +2355,7 @@ function SolanaConfirmStep({
|
|
|
2355
2355
|
token.mint,
|
|
2356
2356
|
amountUnits
|
|
2357
2357
|
);
|
|
2358
|
-
|
|
2358
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
2359
2359
|
token: token.symbol,
|
|
2360
2360
|
instructionCount: transaction.instructions.length,
|
|
2361
2361
|
feePayer: _optionalChain([transaction, 'access', _40 => _40.feePayer, 'optionalAccess', _41 => _41.toBase58, 'call', _42 => _42()]),
|
|
@@ -2366,15 +2366,15 @@ function SolanaConfirmStep({
|
|
|
2366
2366
|
connection,
|
|
2367
2367
|
transaction
|
|
2368
2368
|
);
|
|
2369
|
-
|
|
2369
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
|
|
2370
2370
|
txHash,
|
|
2371
2371
|
amountUnits: amountUnits.toString()
|
|
2372
2372
|
});
|
|
2373
2373
|
onConfirm(txHash, amountUnits.toString());
|
|
2374
2374
|
} catch (err) {
|
|
2375
2375
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
2376
|
-
const message =
|
|
2377
|
-
|
|
2376
|
+
const message = _chunkRVKMKH2Ccjs.formatUserError.call(void 0, raw);
|
|
2377
|
+
_chunkRVKMKH2Ccjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
|
|
2378
2378
|
smartAccount,
|
|
2379
2379
|
token: token.symbol,
|
|
2380
2380
|
sourceAmount
|
|
@@ -2507,7 +2507,7 @@ function SolanaConfirmStep({
|
|
|
2507
2507
|
] })
|
|
2508
2508
|
] }),
|
|
2509
2509
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2510
|
-
|
|
2510
|
+
_chunkRVKMKH2Ccjs.Button,
|
|
2511
2511
|
{
|
|
2512
2512
|
onClick: handleConfirm,
|
|
2513
2513
|
loading: isSubmitting,
|
|
@@ -2516,7 +2516,7 @@ function SolanaConfirmStep({
|
|
|
2516
2516
|
children: "Confirm Order"
|
|
2517
2517
|
}
|
|
2518
2518
|
) }),
|
|
2519
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2519
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVKMKH2Ccjs.PoweredBy, {})
|
|
2520
2520
|
] });
|
|
2521
2521
|
}
|
|
2522
2522
|
|
|
@@ -2573,13 +2573,13 @@ function DepositFlow({
|
|
|
2573
2573
|
flowModeRef.current = flowMode;
|
|
2574
2574
|
const logFlow = _react.useCallback.call(void 0,
|
|
2575
2575
|
(message, data) => {
|
|
2576
|
-
|
|
2576
|
+
_chunkRVKMKH2Ccjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
|
|
2577
2577
|
},
|
|
2578
2578
|
[debug]
|
|
2579
2579
|
);
|
|
2580
2580
|
const logFlowError = _react.useCallback.call(void 0,
|
|
2581
2581
|
(message, error, data) => {
|
|
2582
|
-
|
|
2582
|
+
_chunkRVKMKH2Ccjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
|
|
2583
2583
|
},
|
|
2584
2584
|
[debug]
|
|
2585
2585
|
);
|
|
@@ -2687,7 +2687,7 @@ function DepositFlow({
|
|
|
2687
2687
|
return {
|
|
2688
2688
|
ownerAddress: dappAddress,
|
|
2689
2689
|
walletClient: void 0,
|
|
2690
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2690
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkRVKMKH2Ccjs.getPublicClient.call(void 0, targetChain))),
|
|
2691
2691
|
switchChain: void 0
|
|
2692
2692
|
};
|
|
2693
2693
|
}
|
|
@@ -2696,7 +2696,7 @@ function DepositFlow({
|
|
|
2696
2696
|
return {
|
|
2697
2697
|
ownerAddress: dappWalletClient.account.address,
|
|
2698
2698
|
walletClient: dappWalletClient,
|
|
2699
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2699
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkRVKMKH2Ccjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
2700
2700
|
switchChain: dappSwitchChain
|
|
2701
2701
|
};
|
|
2702
2702
|
}
|
|
@@ -2710,7 +2710,7 @@ function DepositFlow({
|
|
|
2710
2710
|
return {
|
|
2711
2711
|
ownerAddress: dappAddress,
|
|
2712
2712
|
walletClient: void 0,
|
|
2713
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2713
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkRVKMKH2Ccjs.getPublicClient.call(void 0, targetChain))),
|
|
2714
2714
|
switchChain: void 0
|
|
2715
2715
|
};
|
|
2716
2716
|
}
|
|
@@ -2719,7 +2719,7 @@ function DepositFlow({
|
|
|
2719
2719
|
return {
|
|
2720
2720
|
ownerAddress: dappWalletClient.account.address,
|
|
2721
2721
|
walletClient: dappWalletClient,
|
|
2722
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2722
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkRVKMKH2Ccjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
2723
2723
|
switchChain: dappSwitchChain
|
|
2724
2724
|
};
|
|
2725
2725
|
}
|
|
@@ -2727,7 +2727,7 @@ function DepositFlow({
|
|
|
2727
2727
|
return {
|
|
2728
2728
|
ownerAddress: reownWallet.address,
|
|
2729
2729
|
walletClient: reownWallet.walletClient,
|
|
2730
|
-
publicClient: _nullishCoalesce(reownWallet.publicClient, () => (
|
|
2730
|
+
publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkRVKMKH2Ccjs.getPublicClient.call(void 0, targetChain))),
|
|
2731
2731
|
switchChain: reownWallet.switchChain
|
|
2732
2732
|
};
|
|
2733
2733
|
}
|
|
@@ -2765,7 +2765,7 @@ function DepositFlow({
|
|
|
2765
2765
|
return {
|
|
2766
2766
|
ownerAddress: dappAddress,
|
|
2767
2767
|
walletClient: void 0,
|
|
2768
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2768
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkRVKMKH2Ccjs.getPublicClient.call(void 0, targetChain))),
|
|
2769
2769
|
switchChain: void 0
|
|
2770
2770
|
};
|
|
2771
2771
|
}
|
|
@@ -3212,7 +3212,7 @@ function DepositFlow({
|
|
|
3212
3212
|
]);
|
|
3213
3213
|
if (showConnectStep) {
|
|
3214
3214
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3215
|
-
|
|
3215
|
+
_chunkRVKMKH2Ccjs.ConnectStep,
|
|
3216
3216
|
{
|
|
3217
3217
|
walletOptions,
|
|
3218
3218
|
selectedWalletId: selectedWalletIdEffective,
|
|
@@ -3273,7 +3273,7 @@ function DepositFlow({
|
|
|
3273
3273
|
}
|
|
3274
3274
|
),
|
|
3275
3275
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3276
|
-
|
|
3276
|
+
_chunkRVKMKH2Ccjs.ProcessingStep,
|
|
3277
3277
|
{
|
|
3278
3278
|
smartAccount: step.smartAccount,
|
|
3279
3279
|
txHash: step.txHash,
|
|
@@ -3395,7 +3395,7 @@ function DepositFlow({
|
|
|
3395
3395
|
) })
|
|
3396
3396
|
] }) : null,
|
|
3397
3397
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3398
|
-
|
|
3398
|
+
_chunkRVKMKH2Ccjs.ProcessingStep,
|
|
3399
3399
|
{
|
|
3400
3400
|
smartAccount: step.smartAccount,
|
|
3401
3401
|
txHash: step.txHash,
|
|
@@ -3428,7 +3428,7 @@ function DepositFlow({
|
|
|
3428
3428
|
if (_optionalChain([signerContext, 'access', _92 => _92.publicClient, 'access', _93 => _93.chain, 'optionalAccess', _94 => _94.id]) === chainId) {
|
|
3429
3429
|
return signerContext.publicClient;
|
|
3430
3430
|
}
|
|
3431
|
-
return
|
|
3431
|
+
return _chunkRVKMKH2Ccjs.getPublicClient.call(void 0, chainId);
|
|
3432
3432
|
};
|
|
3433
3433
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
3434
3434
|
step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3499,7 +3499,7 @@ function DepositFlow({
|
|
|
3499
3499
|
}
|
|
3500
3500
|
),
|
|
3501
3501
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3502
|
-
|
|
3502
|
+
_chunkRVKMKH2Ccjs.ProcessingStep,
|
|
3503
3503
|
{
|
|
3504
3504
|
smartAccount: step.smartAccount,
|
|
3505
3505
|
txHash: step.txHash,
|
|
@@ -3527,7 +3527,7 @@ function DepositFlow({
|
|
|
3527
3527
|
// src/DepositModal.tsx
|
|
3528
3528
|
|
|
3529
3529
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
3530
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
3530
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-SXQJYLTX.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
3531
3531
|
);
|
|
3532
3532
|
function DepositModal(props) {
|
|
3533
3533
|
const needsReown = !!props.reownAppId;
|
|
@@ -3582,7 +3582,7 @@ function DepositModalInner({
|
|
|
3582
3582
|
const targetChain = _chunkNELAYNA3cjs.getChainId.call(void 0, targetChainProp);
|
|
3583
3583
|
const sourceChain = sourceChainProp ? _chunkNELAYNA3cjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
3584
3584
|
const service = _react.useMemo.call(void 0,
|
|
3585
|
-
() =>
|
|
3585
|
+
() => _chunkRVKMKH2Ccjs.createDepositService.call(void 0, backendUrl, {
|
|
3586
3586
|
debug,
|
|
3587
3587
|
debugScope: "service:deposit"
|
|
3588
3588
|
}),
|
|
@@ -3590,7 +3590,7 @@ function DepositModalInner({
|
|
|
3590
3590
|
);
|
|
3591
3591
|
_react.useEffect.call(void 0, () => {
|
|
3592
3592
|
if (isOpen && modalRef.current) {
|
|
3593
|
-
|
|
3593
|
+
_chunkRVKMKH2Ccjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
3594
3594
|
}
|
|
3595
3595
|
}, [isOpen, theme]);
|
|
3596
3596
|
_react.useEffect.call(void 0, () => {
|
|
@@ -3629,7 +3629,7 @@ function DepositModalInner({
|
|
|
3629
3629
|
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _103 => _103.title]), () => ( "Deposit"));
|
|
3630
3630
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
|
|
3631
3631
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3632
|
-
|
|
3632
|
+
_chunkRVKMKH2Ccjs.Modal,
|
|
3633
3633
|
{
|
|
3634
3634
|
isOpen,
|
|
3635
3635
|
onClose,
|
|
@@ -3690,7 +3690,7 @@ function DepositModalInner({
|
|
|
3690
3690
|
balance.title,
|
|
3691
3691
|
":"
|
|
3692
3692
|
] }),
|
|
3693
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ?
|
|
3693
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkRVKMKH2Ccjs.currencyFormatter.format(totalBalanceUsd) : null))) })
|
|
3694
3694
|
] })
|
|
3695
3695
|
] }),
|
|
3696
3696
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|