@rhinestone/deposit-modal 0.1.64 → 0.1.65
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-3KQE4YU6.cjs → DepositModalReown-6ZMLUWWD.cjs} +3 -3
- package/dist/{DepositModalReown-XOLZ62BQ.mjs → DepositModalReown-Y4M3RA73.mjs} +2 -2
- package/dist/{WithdrawModalReown-TD2NYW5M.mjs → WithdrawModalReown-HVBMAUPM.mjs} +2 -2
- package/dist/{WithdrawModalReown-YBEUOYSV.cjs → WithdrawModalReown-WJ5SHBV4.cjs} +3 -3
- package/dist/{chunk-5SR5N75I.cjs → chunk-4CZ7W3RS.cjs} +75 -73
- package/dist/{chunk-TDTBAZNO.mjs → chunk-GAHX5RAT.mjs} +2 -0
- package/dist/{chunk-XVCPUB6K.mjs → chunk-IYZGLNY6.mjs} +4 -2
- package/dist/{chunk-P4ULLROO.cjs → chunk-MGV75YLV.cjs} +38 -37
- package/dist/{chunk-N3BZTUSJ.cjs → chunk-OWV4KVBM.cjs} +88 -86
- package/dist/{chunk-MYI5WSWL.mjs → chunk-RKRF7ANK.mjs} +3 -2
- 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/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunk4CZ7W3RScjs = require('./chunk-4CZ7W3RS.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
@@ -62,15 +62,15 @@ var _react = require('react');
|
|
|
62
62
|
|
|
63
63
|
var _jsxruntime = require('react/jsx-runtime');
|
|
64
64
|
async function resolveSessionOwner(eoaAddress) {
|
|
65
|
-
const localOwner =
|
|
65
|
+
const localOwner = _chunk4CZ7W3RScjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
66
66
|
if (localOwner) {
|
|
67
67
|
return {
|
|
68
|
-
account:
|
|
68
|
+
account: _chunk4CZ7W3RScjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
69
69
|
address: localOwner.address
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
const created =
|
|
73
|
-
|
|
72
|
+
const created = _chunk4CZ7W3RScjs.createSessionOwnerKey.call(void 0, );
|
|
73
|
+
_chunk4CZ7W3RScjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
74
74
|
return {
|
|
75
75
|
account: created.account,
|
|
76
76
|
address: created.address
|
|
@@ -107,8 +107,10 @@ function SetupStep({
|
|
|
107
107
|
const setup = await service.setupAccount({
|
|
108
108
|
ownerAddress: address,
|
|
109
109
|
sessionOwnerAddress: sessionOwner.address,
|
|
110
|
-
targetChain:
|
|
110
|
+
targetChain: _chunk4CZ7W3RScjs.toEvmCaip2.call(void 0, targetChain),
|
|
111
111
|
targetToken,
|
|
112
|
+
recipient,
|
|
113
|
+
postBridgeActions,
|
|
112
114
|
signerAddress,
|
|
113
115
|
sessionChainIds,
|
|
114
116
|
forceRegister
|
|
@@ -137,7 +139,7 @@ function SetupStep({
|
|
|
137
139
|
primaryType: typedData.primaryType,
|
|
138
140
|
message: typedData.message
|
|
139
141
|
});
|
|
140
|
-
const sessionDetails =
|
|
142
|
+
const sessionDetails = _chunk4CZ7W3RScjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
|
|
141
143
|
setState({ type: "registering" });
|
|
142
144
|
const registerResult = await service.registerAccount({
|
|
143
145
|
address: smartAccount,
|
|
@@ -149,7 +151,7 @@ function SetupStep({
|
|
|
149
151
|
eoaAddress: address,
|
|
150
152
|
sessionOwner: sessionOwner.address,
|
|
151
153
|
target: {
|
|
152
|
-
chain:
|
|
154
|
+
chain: _chunk4CZ7W3RScjs.toEvmCaip2.call(void 0, targetChain),
|
|
153
155
|
token: targetToken,
|
|
154
156
|
...recipient && { recipient },
|
|
155
157
|
..._optionalChain([postBridgeActions, 'optionalAccess', _2 => _2.length]) && { postBridgeActions }
|
|
@@ -214,7 +216,7 @@ function SetupStep({
|
|
|
214
216
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
215
217
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
|
|
216
218
|
isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
217
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
219
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
|
|
218
220
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
|
|
219
221
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
|
|
220
222
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
|
|
@@ -251,7 +253,7 @@ function SetupStep({
|
|
|
251
253
|
] })
|
|
252
254
|
] })
|
|
253
255
|
] }),
|
|
254
|
-
isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
256
|
+
isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
|
|
255
257
|
] });
|
|
256
258
|
}
|
|
257
259
|
|
|
@@ -276,7 +278,7 @@ function AssetSelectStep({
|
|
|
276
278
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
277
279
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
278
280
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
279
|
-
return
|
|
281
|
+
return _chunk4CZ7W3RScjs.getAssetId.call(void 0, {
|
|
280
282
|
chainId: defaultSourceChain,
|
|
281
283
|
token: defaultSourceToken
|
|
282
284
|
});
|
|
@@ -293,7 +295,7 @@ function AssetSelectStep({
|
|
|
293
295
|
try {
|
|
294
296
|
const portfolio = await service.fetchPortfolio(address);
|
|
295
297
|
if (!active) return;
|
|
296
|
-
const portfolioAssets =
|
|
298
|
+
const portfolioAssets = _chunk4CZ7W3RScjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
297
299
|
setAssets(portfolioAssets);
|
|
298
300
|
const hasNative = portfolioAssets.some(
|
|
299
301
|
(asset) => asset.token.toLowerCase() === _chunkR6U6BHCVcjs.NATIVE_TOKEN_ADDRESS
|
|
@@ -374,7 +376,7 @@ function AssetSelectStep({
|
|
|
374
376
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
375
377
|
const numeric = Number(raw);
|
|
376
378
|
if (!Number.isFinite(numeric)) return raw;
|
|
377
|
-
return
|
|
379
|
+
return _chunk4CZ7W3RScjs.tokenFormatter.format(numeric);
|
|
378
380
|
} catch (e3) {
|
|
379
381
|
return asset.balance;
|
|
380
382
|
}
|
|
@@ -388,7 +390,7 @@ function AssetSelectStep({
|
|
|
388
390
|
style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
|
|
389
391
|
children: [
|
|
390
392
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
391
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.Spinner, { className: "rs-text-tertiary" }),
|
|
392
394
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
393
395
|
] }),
|
|
394
396
|
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 }) }),
|
|
@@ -478,7 +480,7 @@ function AssetSelectStep({
|
|
|
478
480
|
] })
|
|
479
481
|
] })
|
|
480
482
|
] }),
|
|
481
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ?
|
|
483
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunk4CZ7W3RScjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
482
484
|
]
|
|
483
485
|
},
|
|
484
486
|
asset.id
|
|
@@ -488,7 +490,7 @@ function AssetSelectStep({
|
|
|
488
490
|
}
|
|
489
491
|
),
|
|
490
492
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
491
|
-
|
|
493
|
+
_chunk4CZ7W3RScjs.Button,
|
|
492
494
|
{
|
|
493
495
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
494
496
|
disabled: !selectedAsset,
|
|
@@ -496,7 +498,7 @@ function AssetSelectStep({
|
|
|
496
498
|
children: "Continue"
|
|
497
499
|
}
|
|
498
500
|
) }),
|
|
499
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
501
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.PoweredBy, {})
|
|
500
502
|
] });
|
|
501
503
|
}
|
|
502
504
|
async function fetchNativeAssets(address, publicClient, existing) {
|
|
@@ -504,7 +506,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
|
|
|
504
506
|
const connectedChainId = _optionalChain([publicClient, 'access', _11 => _11.chain, 'optionalAccess', _12 => _12.id]);
|
|
505
507
|
if (!connectedChainId) return [];
|
|
506
508
|
if (!_chunkR6U6BHCVcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
|
|
507
|
-
const id =
|
|
509
|
+
const id = _chunk4CZ7W3RScjs.getAssetId.call(void 0, {
|
|
508
510
|
chainId: connectedChainId,
|
|
509
511
|
token: _chunkR6U6BHCVcjs.NATIVE_TOKEN_ADDRESS
|
|
510
512
|
});
|
|
@@ -591,7 +593,7 @@ function AmountStep({
|
|
|
591
593
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
592
594
|
if (!balanceTarget || !publicClient) return;
|
|
593
595
|
try {
|
|
594
|
-
const bal =
|
|
596
|
+
const bal = _chunk4CZ7W3RScjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
595
597
|
address: asset.token,
|
|
596
598
|
abi: _viem.erc20Abi,
|
|
597
599
|
functionName: "balanceOf",
|
|
@@ -617,7 +619,7 @@ function AmountStep({
|
|
|
617
619
|
setIsSwitching(true);
|
|
618
620
|
switchChain(asset.chainId).catch((err) => {
|
|
619
621
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
620
|
-
setError(
|
|
622
|
+
setError(_chunk4CZ7W3RScjs.formatUserError.call(void 0, raw));
|
|
621
623
|
}).finally(() => {
|
|
622
624
|
setIsSwitching(false);
|
|
623
625
|
});
|
|
@@ -653,7 +655,7 @@ function AmountStep({
|
|
|
653
655
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
654
656
|
const numeric = Number(raw);
|
|
655
657
|
if (!Number.isFinite(numeric)) return raw;
|
|
656
|
-
return
|
|
658
|
+
return _chunk4CZ7W3RScjs.tokenFormatter.format(numeric);
|
|
657
659
|
} catch (e8) {
|
|
658
660
|
return "...";
|
|
659
661
|
}
|
|
@@ -697,7 +699,7 @@ function AmountStep({
|
|
|
697
699
|
const usdValue = numericAmount;
|
|
698
700
|
if (_optionalChain([uiConfig, 'optionalAccess', _17 => _17.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
|
|
699
701
|
setError(
|
|
700
|
-
`Maximum deposit is ${
|
|
702
|
+
`Maximum deposit is ${_chunk4CZ7W3RScjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
|
|
701
703
|
);
|
|
702
704
|
return;
|
|
703
705
|
}
|
|
@@ -752,7 +754,7 @@ function AmountStep({
|
|
|
752
754
|
hasPricing && balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
|
|
753
755
|
" ",
|
|
754
756
|
"(",
|
|
755
|
-
|
|
757
|
+
_chunk4CZ7W3RScjs.currencyFormatter.format(balanceUsd),
|
|
756
758
|
")"
|
|
757
759
|
] })
|
|
758
760
|
] }) })
|
|
@@ -889,7 +891,7 @@ function AmountStep({
|
|
|
889
891
|
)
|
|
890
892
|
] }),
|
|
891
893
|
_optionalChain([uiConfig, 'optionalAccess', _20 => _20.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
|
|
892
|
-
|
|
894
|
+
_chunk4CZ7W3RScjs.currencyFormatter.format(uiConfig.minDepositUsd),
|
|
893
895
|
" minimum deposit"
|
|
894
896
|
] }),
|
|
895
897
|
error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
|
|
@@ -915,7 +917,7 @@ function AmountStep({
|
|
|
915
917
|
] })
|
|
916
918
|
] }),
|
|
917
919
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
918
|
-
|
|
920
|
+
_chunk4CZ7W3RScjs.Button,
|
|
919
921
|
{
|
|
920
922
|
onClick: handleContinue,
|
|
921
923
|
fullWidth: true,
|
|
@@ -923,7 +925,7 @@ function AmountStep({
|
|
|
923
925
|
children: _optionalChain([uiConfig, 'optionalAccess', _21 => _21.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
|
|
924
926
|
}
|
|
925
927
|
) }),
|
|
926
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
928
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.PoweredBy, {})
|
|
927
929
|
] });
|
|
928
930
|
}
|
|
929
931
|
|
|
@@ -973,7 +975,7 @@ function ConfirmStep({
|
|
|
973
975
|
setIsSwitching(true);
|
|
974
976
|
switchChain(asset.chainId).catch((err) => {
|
|
975
977
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
976
|
-
setError(
|
|
978
|
+
setError(_chunk4CZ7W3RScjs.formatUserError.call(void 0, raw));
|
|
977
979
|
}).finally(() => {
|
|
978
980
|
setIsSwitching(false);
|
|
979
981
|
});
|
|
@@ -1016,7 +1018,7 @@ function ConfirmStep({
|
|
|
1016
1018
|
throw new Error("Wallet not properly connected");
|
|
1017
1019
|
}
|
|
1018
1020
|
const transferTo = sameRoute ? recipient : smartAccount;
|
|
1019
|
-
const hash =
|
|
1021
|
+
const hash = _chunk4CZ7W3RScjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
|
|
1020
1022
|
account,
|
|
1021
1023
|
chain,
|
|
1022
1024
|
to: transferTo,
|
|
@@ -1033,7 +1035,7 @@ function ConfirmStep({
|
|
|
1033
1035
|
onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
|
|
1034
1036
|
} catch (err) {
|
|
1035
1037
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1036
|
-
const message =
|
|
1038
|
+
const message = _chunk4CZ7W3RScjs.formatUserError.call(void 0, raw);
|
|
1037
1039
|
setError(message);
|
|
1038
1040
|
_optionalChain([onError, 'optionalCall', _25 => _25(message, "TRANSFER_ERROR")]);
|
|
1039
1041
|
} finally {
|
|
@@ -1162,7 +1164,7 @@ function ConfirmStep({
|
|
|
1162
1164
|
] })
|
|
1163
1165
|
] }),
|
|
1164
1166
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1165
|
-
|
|
1167
|
+
_chunk4CZ7W3RScjs.Button,
|
|
1166
1168
|
{
|
|
1167
1169
|
onClick: handleConfirm,
|
|
1168
1170
|
loading: isSubmitting,
|
|
@@ -1171,7 +1173,7 @@ function ConfirmStep({
|
|
|
1171
1173
|
children: "Confirm Order"
|
|
1172
1174
|
}
|
|
1173
1175
|
) }),
|
|
1174
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1176
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.PoweredBy, {})
|
|
1175
1177
|
] });
|
|
1176
1178
|
}
|
|
1177
1179
|
|
|
@@ -1583,10 +1585,10 @@ function DepositAddressStep({
|
|
|
1583
1585
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
1584
1586
|
if (cancelled || depositHandledRef.current) return;
|
|
1585
1587
|
const event = status.lastEvent;
|
|
1586
|
-
const eventTxHash =
|
|
1588
|
+
const eventTxHash = _chunk4CZ7W3RScjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunk4CZ7W3RScjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
1587
1589
|
if (baselineTxHash === void 0) {
|
|
1588
1590
|
baselineTxHash = eventTxHash;
|
|
1589
|
-
} else if (eventTxHash && (!baselineTxHash || !
|
|
1591
|
+
} else if (eventTxHash && (!baselineTxHash || !_chunk4CZ7W3RScjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHash))) {
|
|
1590
1592
|
const details = getDepositEventDetails(event);
|
|
1591
1593
|
const fallback = sourceSelectionRef.current;
|
|
1592
1594
|
const chainId = _nullishCoalesce(details.chainId, () => ( fallback.chainId));
|
|
@@ -1809,7 +1811,7 @@ function DepositAddressStep({
|
|
|
1809
1811
|
] }),
|
|
1810
1812
|
pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
|
|
1811
1813
|
] }) }),
|
|
1812
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1814
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.PoweredBy, {})
|
|
1813
1815
|
] });
|
|
1814
1816
|
}
|
|
1815
1817
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -1840,7 +1842,7 @@ function SolanaTokenSelectStep({
|
|
|
1840
1842
|
setError(null);
|
|
1841
1843
|
const portfolioBySymbol = {};
|
|
1842
1844
|
try {
|
|
1843
|
-
|
|
1845
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
|
|
1844
1846
|
solanaAddress
|
|
1845
1847
|
});
|
|
1846
1848
|
const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
|
|
@@ -1863,12 +1865,12 @@ function SolanaTokenSelectStep({
|
|
|
1863
1865
|
};
|
|
1864
1866
|
}
|
|
1865
1867
|
}
|
|
1866
|
-
|
|
1868
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
|
|
1867
1869
|
symbols: Object.keys(portfolioBySymbol)
|
|
1868
1870
|
});
|
|
1869
1871
|
} catch (err) {
|
|
1870
1872
|
if (!active) return;
|
|
1871
|
-
|
|
1873
|
+
_chunk4CZ7W3RScjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
|
|
1872
1874
|
solanaAddress
|
|
1873
1875
|
});
|
|
1874
1876
|
setError(
|
|
@@ -1922,7 +1924,7 @@ function SolanaTokenSelectStep({
|
|
|
1922
1924
|
style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
|
|
1923
1925
|
children: [
|
|
1924
1926
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
1925
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1927
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.Spinner, { className: "rs-text-tertiary" }),
|
|
1926
1928
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
1927
1929
|
] }),
|
|
1928
1930
|
!loading && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
@@ -1959,7 +1961,7 @@ function SolanaTokenSelectStep({
|
|
|
1959
1961
|
try {
|
|
1960
1962
|
const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
|
|
1961
1963
|
const numeric = Number(raw);
|
|
1962
|
-
formattedBalance = Number.isFinite(numeric) ?
|
|
1964
|
+
formattedBalance = Number.isFinite(numeric) ? _chunk4CZ7W3RScjs.tokenFormatter.format(numeric) : raw;
|
|
1963
1965
|
} catch (e14) {
|
|
1964
1966
|
formattedBalance = "...";
|
|
1965
1967
|
}
|
|
@@ -2003,7 +2005,7 @@ function SolanaTokenSelectStep({
|
|
|
2003
2005
|
] })
|
|
2004
2006
|
] })
|
|
2005
2007
|
] }),
|
|
2006
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ?
|
|
2008
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunk4CZ7W3RScjs.currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
|
|
2007
2009
|
]
|
|
2008
2010
|
},
|
|
2009
2011
|
entry.token.symbol
|
|
@@ -2013,7 +2015,7 @@ function SolanaTokenSelectStep({
|
|
|
2013
2015
|
}
|
|
2014
2016
|
),
|
|
2015
2017
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2016
|
-
|
|
2018
|
+
_chunk4CZ7W3RScjs.Button,
|
|
2017
2019
|
{
|
|
2018
2020
|
onClick: () => selectedEntry && onContinue(
|
|
2019
2021
|
selectedEntry.token,
|
|
@@ -2025,7 +2027,7 @@ function SolanaTokenSelectStep({
|
|
|
2025
2027
|
children: "Continue"
|
|
2026
2028
|
}
|
|
2027
2029
|
) }),
|
|
2028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2030
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.PoweredBy, {})
|
|
2029
2031
|
] });
|
|
2030
2032
|
}
|
|
2031
2033
|
|
|
@@ -2073,7 +2075,7 @@ function SolanaAmountStep({
|
|
|
2073
2075
|
const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
|
|
2074
2076
|
const numeric = Number(raw);
|
|
2075
2077
|
if (!Number.isFinite(numeric)) return raw;
|
|
2076
|
-
return
|
|
2078
|
+
return _chunk4CZ7W3RScjs.tokenFormatter.format(numeric);
|
|
2077
2079
|
} catch (e16) {
|
|
2078
2080
|
return "...";
|
|
2079
2081
|
}
|
|
@@ -2091,7 +2093,7 @@ function SolanaAmountStep({
|
|
|
2091
2093
|
}, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
|
|
2092
2094
|
const formattedBalanceUsd = _react.useMemo.call(void 0, () => {
|
|
2093
2095
|
if (computedBalanceUsd === null || computedBalanceUsd <= 0) return null;
|
|
2094
|
-
return
|
|
2096
|
+
return _chunk4CZ7W3RScjs.currencyFormatter.format(computedBalanceUsd);
|
|
2095
2097
|
}, [computedBalanceUsd]);
|
|
2096
2098
|
const spendableBalance = _react.useMemo.call(void 0, () => {
|
|
2097
2099
|
if (!isNativeSol(token)) return balance;
|
|
@@ -2116,7 +2118,7 @@ function SolanaAmountStep({
|
|
|
2116
2118
|
const factor = 10 ** maxDecimals;
|
|
2117
2119
|
const truncated = Math.floor(value * factor) / factor;
|
|
2118
2120
|
const formatted = truncated.toFixed(maxDecimals).replace(/\.?0+$/, "");
|
|
2119
|
-
|
|
2121
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
|
|
2120
2122
|
percentage,
|
|
2121
2123
|
symbol: token.symbol,
|
|
2122
2124
|
formatted
|
|
@@ -2130,7 +2132,7 @@ function SolanaAmountStep({
|
|
|
2130
2132
|
const handleContinue = () => {
|
|
2131
2133
|
const numericAmount = parseFloat(amount);
|
|
2132
2134
|
if (isNaN(numericAmount) || numericAmount <= 0) {
|
|
2133
|
-
|
|
2135
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
2134
2136
|
amount,
|
|
2135
2137
|
reason: "nan-or-non-positive"
|
|
2136
2138
|
});
|
|
@@ -2142,7 +2144,7 @@ function SolanaAmountStep({
|
|
|
2142
2144
|
const usdValue = numericAmount;
|
|
2143
2145
|
if (_optionalChain([uiConfig, 'optionalAccess', _48 => _48.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
|
|
2144
2146
|
setError(
|
|
2145
|
-
`Maximum deposit is ${
|
|
2147
|
+
`Maximum deposit is ${_chunk4CZ7W3RScjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
|
|
2146
2148
|
);
|
|
2147
2149
|
return;
|
|
2148
2150
|
}
|
|
@@ -2157,7 +2159,7 @@ function SolanaAmountStep({
|
|
|
2157
2159
|
try {
|
|
2158
2160
|
amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
|
|
2159
2161
|
} catch (e20) {
|
|
2160
|
-
|
|
2162
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
2161
2163
|
amount,
|
|
2162
2164
|
sourceAmount: sourceAmountStr,
|
|
2163
2165
|
reason: "parse-units-failed"
|
|
@@ -2167,7 +2169,7 @@ function SolanaAmountStep({
|
|
|
2167
2169
|
}
|
|
2168
2170
|
if (amountInUnits > spendableBalance) {
|
|
2169
2171
|
const isReserveIssue = isNativeSol(token) && amountInUnits <= balance;
|
|
2170
|
-
|
|
2172
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
2171
2173
|
amount,
|
|
2172
2174
|
balance: balance.toString(),
|
|
2173
2175
|
spendableBalance: spendableBalance.toString(),
|
|
@@ -2179,7 +2181,7 @@ function SolanaAmountStep({
|
|
|
2179
2181
|
);
|
|
2180
2182
|
return;
|
|
2181
2183
|
}
|
|
2182
|
-
|
|
2184
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
|
|
2183
2185
|
symbol: token.symbol,
|
|
2184
2186
|
inputAmountUsd: amount,
|
|
2185
2187
|
sourceAmount: sourceAmountStr,
|
|
@@ -2248,7 +2250,7 @@ function SolanaAmountStep({
|
|
|
2248
2250
|
)
|
|
2249
2251
|
] }),
|
|
2250
2252
|
_optionalChain([uiConfig, 'optionalAccess', _50 => _50.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
|
|
2251
|
-
|
|
2253
|
+
_chunk4CZ7W3RScjs.currencyFormatter.format(uiConfig.minDepositUsd),
|
|
2252
2254
|
" minimum deposit"
|
|
2253
2255
|
] }),
|
|
2254
2256
|
error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
|
|
@@ -2274,7 +2276,7 @@ function SolanaAmountStep({
|
|
|
2274
2276
|
] })
|
|
2275
2277
|
] }),
|
|
2276
2278
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2277
|
-
|
|
2279
|
+
_chunk4CZ7W3RScjs.Button,
|
|
2278
2280
|
{
|
|
2279
2281
|
onClick: handleContinue,
|
|
2280
2282
|
fullWidth: true,
|
|
@@ -2282,7 +2284,7 @@ function SolanaAmountStep({
|
|
|
2282
2284
|
children: _optionalChain([uiConfig, 'optionalAccess', _51 => _51.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
|
|
2283
2285
|
}
|
|
2284
2286
|
) }),
|
|
2285
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2287
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.PoweredBy, {})
|
|
2286
2288
|
] });
|
|
2287
2289
|
}
|
|
2288
2290
|
|
|
@@ -2326,7 +2328,7 @@ function SolanaConfirmStep({
|
|
|
2326
2328
|
const receiveAmount = isSameToken ? formattedReceiveAmount : `~ ${formattedReceiveAmount}`;
|
|
2327
2329
|
const handleConfirm = async () => {
|
|
2328
2330
|
if (!solanaProvider) {
|
|
2329
|
-
|
|
2331
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
2330
2332
|
reason: "missing-provider"
|
|
2331
2333
|
});
|
|
2332
2334
|
setError("Solana wallet not connected");
|
|
@@ -2334,7 +2336,7 @@ function SolanaConfirmStep({
|
|
|
2334
2336
|
}
|
|
2335
2337
|
const parsedAmount = parseFloat(sourceAmount);
|
|
2336
2338
|
if (isNaN(parsedAmount) || parsedAmount <= 0) {
|
|
2337
|
-
|
|
2339
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
2338
2340
|
reason: "invalid-amount",
|
|
2339
2341
|
sourceAmount
|
|
2340
2342
|
});
|
|
@@ -2343,7 +2345,7 @@ function SolanaConfirmStep({
|
|
|
2343
2345
|
}
|
|
2344
2346
|
setError(null);
|
|
2345
2347
|
setIsSubmitting(true);
|
|
2346
|
-
|
|
2348
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
|
|
2347
2349
|
smartAccount,
|
|
2348
2350
|
solanaAddress,
|
|
2349
2351
|
solanaDepositAddress,
|
|
@@ -2353,7 +2355,7 @@ function SolanaConfirmStep({
|
|
|
2353
2355
|
});
|
|
2354
2356
|
try {
|
|
2355
2357
|
const check = await service.checkAccount(smartAccount);
|
|
2356
|
-
|
|
2358
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
|
|
2357
2359
|
smartAccount,
|
|
2358
2360
|
isRegistered: check.isRegistered,
|
|
2359
2361
|
targetChain: check.targetChain,
|
|
@@ -2366,7 +2368,7 @@ function SolanaConfirmStep({
|
|
|
2366
2368
|
}
|
|
2367
2369
|
const connection = getSolanaConnection();
|
|
2368
2370
|
const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
|
|
2369
|
-
|
|
2371
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
|
|
2370
2372
|
token: token.symbol,
|
|
2371
2373
|
sourceAmount,
|
|
2372
2374
|
amountUnits: amountUnits.toString()
|
|
@@ -2383,7 +2385,7 @@ function SolanaConfirmStep({
|
|
|
2383
2385
|
token.mint,
|
|
2384
2386
|
amountUnits
|
|
2385
2387
|
);
|
|
2386
|
-
|
|
2388
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
2387
2389
|
token: token.symbol,
|
|
2388
2390
|
instructionCount: transaction.instructions.length,
|
|
2389
2391
|
feePayer: _optionalChain([transaction, 'access', _52 => _52.feePayer, 'optionalAccess', _53 => _53.toBase58, 'call', _54 => _54()]),
|
|
@@ -2394,15 +2396,15 @@ function SolanaConfirmStep({
|
|
|
2394
2396
|
connection,
|
|
2395
2397
|
transaction
|
|
2396
2398
|
);
|
|
2397
|
-
|
|
2399
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
|
|
2398
2400
|
txHash,
|
|
2399
2401
|
amountUnits: amountUnits.toString()
|
|
2400
2402
|
});
|
|
2401
2403
|
onConfirm(txHash, amountUnits.toString());
|
|
2402
2404
|
} catch (err) {
|
|
2403
2405
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
2404
|
-
const message =
|
|
2405
|
-
|
|
2406
|
+
const message = _chunk4CZ7W3RScjs.formatUserError.call(void 0, raw);
|
|
2407
|
+
_chunk4CZ7W3RScjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
|
|
2406
2408
|
smartAccount,
|
|
2407
2409
|
token: token.symbol,
|
|
2408
2410
|
sourceAmount
|
|
@@ -2535,7 +2537,7 @@ function SolanaConfirmStep({
|
|
|
2535
2537
|
] })
|
|
2536
2538
|
] }),
|
|
2537
2539
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2538
|
-
|
|
2540
|
+
_chunk4CZ7W3RScjs.Button,
|
|
2539
2541
|
{
|
|
2540
2542
|
onClick: handleConfirm,
|
|
2541
2543
|
loading: isSubmitting,
|
|
@@ -2544,7 +2546,7 @@ function SolanaConfirmStep({
|
|
|
2544
2546
|
children: "Confirm Order"
|
|
2545
2547
|
}
|
|
2546
2548
|
) }),
|
|
2547
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2549
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4CZ7W3RScjs.PoweredBy, {})
|
|
2548
2550
|
] });
|
|
2549
2551
|
}
|
|
2550
2552
|
|
|
@@ -2593,9 +2595,9 @@ function DepositFlow({
|
|
|
2593
2595
|
onError,
|
|
2594
2596
|
debug
|
|
2595
2597
|
}) {
|
|
2596
|
-
const onStepChangeRef =
|
|
2597
|
-
const onTotalBalanceChangeRef =
|
|
2598
|
-
const onEventRef =
|
|
2598
|
+
const onStepChangeRef = _chunk4CZ7W3RScjs.useLatestRef.call(void 0, onStepChange);
|
|
2599
|
+
const onTotalBalanceChangeRef = _chunk4CZ7W3RScjs.useLatestRef.call(void 0, onTotalBalanceChange);
|
|
2600
|
+
const onEventRef = _chunk4CZ7W3RScjs.useLatestRef.call(void 0, onEvent);
|
|
2599
2601
|
const hasInitialReownSession = Boolean(
|
|
2600
2602
|
enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _56 => _56.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _57 => _57.address]) : _optionalChain([reownWallet, 'optionalAccess', _58 => _58.address])
|
|
2601
2603
|
);
|
|
@@ -2615,13 +2617,13 @@ function DepositFlow({
|
|
|
2615
2617
|
flowModeRef.current = flowMode;
|
|
2616
2618
|
const logFlow = _react.useCallback.call(void 0,
|
|
2617
2619
|
(message, data) => {
|
|
2618
|
-
|
|
2620
|
+
_chunk4CZ7W3RScjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
|
|
2619
2621
|
},
|
|
2620
2622
|
[debug]
|
|
2621
2623
|
);
|
|
2622
2624
|
const logFlowError = _react.useCallback.call(void 0,
|
|
2623
2625
|
(message, error, data) => {
|
|
2624
|
-
|
|
2626
|
+
_chunk4CZ7W3RScjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
|
|
2625
2627
|
},
|
|
2626
2628
|
[debug]
|
|
2627
2629
|
);
|
|
@@ -2743,7 +2745,7 @@ function DepositFlow({
|
|
|
2743
2745
|
return {
|
|
2744
2746
|
ownerAddress: dappAddress,
|
|
2745
2747
|
walletClient: void 0,
|
|
2746
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2748
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk4CZ7W3RScjs.getPublicClient.call(void 0, targetChain))),
|
|
2747
2749
|
switchChain: void 0
|
|
2748
2750
|
};
|
|
2749
2751
|
}
|
|
@@ -2752,7 +2754,7 @@ function DepositFlow({
|
|
|
2752
2754
|
return {
|
|
2753
2755
|
ownerAddress: dappWalletClient.account.address,
|
|
2754
2756
|
walletClient: dappWalletClient,
|
|
2755
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2757
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk4CZ7W3RScjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
2756
2758
|
switchChain: dappSwitchChain
|
|
2757
2759
|
};
|
|
2758
2760
|
}
|
|
@@ -2766,7 +2768,7 @@ function DepositFlow({
|
|
|
2766
2768
|
return {
|
|
2767
2769
|
ownerAddress: dappAddress,
|
|
2768
2770
|
walletClient: void 0,
|
|
2769
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2771
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk4CZ7W3RScjs.getPublicClient.call(void 0, targetChain))),
|
|
2770
2772
|
switchChain: void 0
|
|
2771
2773
|
};
|
|
2772
2774
|
}
|
|
@@ -2775,7 +2777,7 @@ function DepositFlow({
|
|
|
2775
2777
|
return {
|
|
2776
2778
|
ownerAddress: dappWalletClient.account.address,
|
|
2777
2779
|
walletClient: dappWalletClient,
|
|
2778
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2780
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk4CZ7W3RScjs.getPublicClient.call(void 0, fallbackChainId))),
|
|
2779
2781
|
switchChain: dappSwitchChain
|
|
2780
2782
|
};
|
|
2781
2783
|
}
|
|
@@ -2783,7 +2785,7 @@ function DepositFlow({
|
|
|
2783
2785
|
return {
|
|
2784
2786
|
ownerAddress: reownWallet.address,
|
|
2785
2787
|
walletClient: reownWallet.walletClient,
|
|
2786
|
-
publicClient: _nullishCoalesce(reownWallet.publicClient, () => (
|
|
2788
|
+
publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunk4CZ7W3RScjs.getPublicClient.call(void 0, targetChain))),
|
|
2787
2789
|
switchChain: reownWallet.switchChain
|
|
2788
2790
|
};
|
|
2789
2791
|
}
|
|
@@ -2821,7 +2823,7 @@ function DepositFlow({
|
|
|
2821
2823
|
return {
|
|
2822
2824
|
ownerAddress: dappAddress,
|
|
2823
2825
|
walletClient: void 0,
|
|
2824
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
2826
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk4CZ7W3RScjs.getPublicClient.call(void 0, targetChain))),
|
|
2825
2827
|
switchChain: void 0
|
|
2826
2828
|
};
|
|
2827
2829
|
}
|
|
@@ -3322,7 +3324,7 @@ function DepositFlow({
|
|
|
3322
3324
|
]);
|
|
3323
3325
|
if (showConnectStep) {
|
|
3324
3326
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3325
|
-
|
|
3327
|
+
_chunk4CZ7W3RScjs.ConnectStep,
|
|
3326
3328
|
{
|
|
3327
3329
|
walletOptions,
|
|
3328
3330
|
selectedWalletId: selectedWalletIdEffective,
|
|
@@ -3396,7 +3398,7 @@ function DepositFlow({
|
|
|
3396
3398
|
}
|
|
3397
3399
|
),
|
|
3398
3400
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3399
|
-
|
|
3401
|
+
_chunk4CZ7W3RScjs.ProcessingStep,
|
|
3400
3402
|
{
|
|
3401
3403
|
smartAccount: step.smartAccount,
|
|
3402
3404
|
txHash: step.txHash,
|
|
@@ -3520,7 +3522,7 @@ function DepositFlow({
|
|
|
3520
3522
|
) })
|
|
3521
3523
|
] }) : null,
|
|
3522
3524
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3523
|
-
|
|
3525
|
+
_chunk4CZ7W3RScjs.ProcessingStep,
|
|
3524
3526
|
{
|
|
3525
3527
|
smartAccount: step.smartAccount,
|
|
3526
3528
|
txHash: step.txHash,
|
|
@@ -3554,7 +3556,7 @@ function DepositFlow({
|
|
|
3554
3556
|
if (_optionalChain([signerContext, 'access', _119 => _119.publicClient, 'access', _120 => _120.chain, 'optionalAccess', _121 => _121.id]) === chainId) {
|
|
3555
3557
|
return signerContext.publicClient;
|
|
3556
3558
|
}
|
|
3557
|
-
return
|
|
3559
|
+
return _chunk4CZ7W3RScjs.getPublicClient.call(void 0, chainId);
|
|
3558
3560
|
};
|
|
3559
3561
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
3560
3562
|
step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3636,7 +3638,7 @@ function DepositFlow({
|
|
|
3636
3638
|
}
|
|
3637
3639
|
),
|
|
3638
3640
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3639
|
-
|
|
3641
|
+
_chunk4CZ7W3RScjs.ProcessingStep,
|
|
3640
3642
|
{
|
|
3641
3643
|
smartAccount: step.smartAccount,
|
|
3642
3644
|
txHash: step.txHash,
|
|
@@ -3665,7 +3667,7 @@ function DepositFlow({
|
|
|
3665
3667
|
// src/DepositModal.tsx
|
|
3666
3668
|
|
|
3667
3669
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
3668
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
3670
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-6ZMLUWWD.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
3669
3671
|
);
|
|
3670
3672
|
function DepositModal(props) {
|
|
3671
3673
|
const needsReown = !!props.reownAppId;
|
|
@@ -3734,14 +3736,14 @@ function DepositModalInner({
|
|
|
3734
3736
|
debug
|
|
3735
3737
|
}) {
|
|
3736
3738
|
const modalRef = _react.useRef.call(void 0, null);
|
|
3737
|
-
const onReadyRef =
|
|
3739
|
+
const onReadyRef = _chunk4CZ7W3RScjs.useLatestRef.call(void 0, onReady);
|
|
3738
3740
|
const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
|
|
3739
3741
|
const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
|
|
3740
3742
|
const backHandlerRef = _react.useRef.call(void 0, void 0);
|
|
3741
3743
|
const targetChain = _chunkR6U6BHCVcjs.getChainId.call(void 0, targetChainProp);
|
|
3742
3744
|
const sourceChain = sourceChainProp ? _chunkR6U6BHCVcjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
3743
3745
|
const service = _react.useMemo.call(void 0,
|
|
3744
|
-
() =>
|
|
3746
|
+
() => _chunk4CZ7W3RScjs.createDepositService.call(void 0, backendUrl, {
|
|
3745
3747
|
debug,
|
|
3746
3748
|
debugScope: "service:deposit"
|
|
3747
3749
|
}),
|
|
@@ -3749,7 +3751,7 @@ function DepositModalInner({
|
|
|
3749
3751
|
);
|
|
3750
3752
|
_react.useEffect.call(void 0, () => {
|
|
3751
3753
|
if (isOpen && modalRef.current) {
|
|
3752
|
-
|
|
3754
|
+
_chunk4CZ7W3RScjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
3753
3755
|
}
|
|
3754
3756
|
}, [isOpen, theme]);
|
|
3755
3757
|
_react.useEffect.call(void 0, () => {
|
|
@@ -3788,7 +3790,7 @@ function DepositModalInner({
|
|
|
3788
3790
|
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _133 => _133.title]), () => ( "Deposit"));
|
|
3789
3791
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
|
|
3790
3792
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3791
|
-
|
|
3793
|
+
_chunk4CZ7W3RScjs.Modal,
|
|
3792
3794
|
{
|
|
3793
3795
|
isOpen,
|
|
3794
3796
|
onClose,
|
|
@@ -3881,7 +3883,7 @@ function DepositModalInner({
|
|
|
3881
3883
|
balance.title,
|
|
3882
3884
|
":"
|
|
3883
3885
|
] }),
|
|
3884
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ?
|
|
3886
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunk4CZ7W3RScjs.currencyFormatter.format(totalBalanceUsd) : null))) })
|
|
3885
3887
|
] })
|
|
3886
3888
|
] }),
|
|
3887
3889
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|