@rhinestone/deposit-modal 0.1.28 → 0.1.30
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-FF4YU5VV.mjs → DepositModalReown-OHTRNISJ.mjs} +3 -3
- package/dist/{DepositModalReown-6IXFIXR6.cjs → DepositModalReown-ZD3ROLZG.cjs} +4 -4
- package/dist/{WithdrawModalReown-LIYQG2BW.mjs → WithdrawModalReown-IJAMIPSY.mjs} +3 -3
- package/dist/{WithdrawModalReown-GMIE6AWA.cjs → WithdrawModalReown-SVZQKH2X.cjs} +4 -4
- package/dist/{chunk-YXTWMYHK.mjs → chunk-BOKLFGNS.mjs} +94 -55
- package/dist/{chunk-RQSAANC3.mjs → chunk-CIAKCO7G.mjs} +17 -20
- package/dist/{chunk-LP6DQCKV.cjs → chunk-K4YSUWIT.cjs} +54 -54
- package/dist/{chunk-VW3QQWEL.cjs → chunk-KIRDZLOS.cjs} +55 -58
- package/dist/{chunk-XF7M4TTT.mjs → chunk-S76PY7GZ.mjs} +3 -3
- package/dist/{chunk-A6QLADED.mjs → chunk-VL47TLTE.mjs} +128 -3
- package/dist/{chunk-CEIWN53N.cjs → chunk-WB3ZJJBH.cjs} +135 -10
- package/dist/{chunk-XJ4G6RO6.cjs → chunk-WDDONQLV.cjs} +190 -151
- package/dist/constants.cjs +4 -2
- package/dist/constants.d.cts +12 -2
- package/dist/constants.d.ts +12 -2
- package/dist/constants.mjs +3 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +7 -5
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.mjs +6 -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
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkKIRDZLOScjs = require('./chunk-KIRDZLOS.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -29,7 +29,7 @@ var _chunkVW3QQWELcjs = require('./chunk-VW3QQWEL.cjs');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkWB3ZJJBHcjs = require('./chunk-WB3ZJJBH.cjs');
|
|
33
33
|
|
|
34
34
|
// src/WithdrawModal.tsx
|
|
35
35
|
|
|
@@ -101,8 +101,8 @@ function WithdrawFormStep({
|
|
|
101
101
|
const chainMismatch = Boolean(
|
|
102
102
|
_optionalChain([walletClient, 'optionalAccess', _3 => _3.chain, 'optionalAccess', _4 => _4.id]) && walletClient.chain.id !== asset.chainId
|
|
103
103
|
);
|
|
104
|
-
const targetSymbol =
|
|
105
|
-
const targetChainName =
|
|
104
|
+
const targetSymbol = _chunkWB3ZJJBHcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
105
|
+
const targetChainName = _chunkWB3ZJJBHcjs.getChainName.call(void 0, targetChain);
|
|
106
106
|
const isBusy = submitting || isSubmitting;
|
|
107
107
|
_react.useEffect.call(void 0, () => {
|
|
108
108
|
if (chainMismatch && switchChain && !hasAttemptedSwitch.current) {
|
|
@@ -110,7 +110,7 @@ function WithdrawFormStep({
|
|
|
110
110
|
setIsSwitching(true);
|
|
111
111
|
switchChain(asset.chainId).catch((err) => {
|
|
112
112
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
113
|
-
setError(
|
|
113
|
+
setError(_chunkKIRDZLOScjs.formatUserError.call(void 0, raw));
|
|
114
114
|
}).finally(() => {
|
|
115
115
|
setIsSwitching(false);
|
|
116
116
|
});
|
|
@@ -127,7 +127,7 @@ function WithdrawFormStep({
|
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
try {
|
|
130
|
-
const bal =
|
|
130
|
+
const bal = _chunkKIRDZLOScjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
|
|
131
131
|
address: asset.token,
|
|
132
132
|
abi: _viem.erc20Abi,
|
|
133
133
|
functionName: "balanceOf",
|
|
@@ -229,7 +229,7 @@ function WithdrawFormStep({
|
|
|
229
229
|
await onSubmit(recipient, amount);
|
|
230
230
|
} catch (err) {
|
|
231
231
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
232
|
-
setError(
|
|
232
|
+
setError(_chunkKIRDZLOScjs.formatUserError.call(void 0, raw));
|
|
233
233
|
} finally {
|
|
234
234
|
setIsSubmitting(false);
|
|
235
235
|
}
|
|
@@ -241,7 +241,7 @@ function WithdrawFormStep({
|
|
|
241
241
|
await switchChain(asset.chainId);
|
|
242
242
|
} catch (err) {
|
|
243
243
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
244
|
-
setError(
|
|
244
|
+
setError(_chunkKIRDZLOScjs.formatUserError.call(void 0, raw));
|
|
245
245
|
} finally {
|
|
246
246
|
setIsSwitching(false);
|
|
247
247
|
}
|
|
@@ -331,7 +331,7 @@ function WithdrawFormStep({
|
|
|
331
331
|
] })
|
|
332
332
|
] }),
|
|
333
333
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
334
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ?
|
|
334
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkKIRDZLOScjs.currencyFormatter.format(amountUsd) : "$0.00" }),
|
|
335
335
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
336
336
|
formattedBalance,
|
|
337
337
|
" ",
|
|
@@ -359,10 +359,10 @@ function WithdrawFormStep({
|
|
|
359
359
|
},
|
|
360
360
|
children: [
|
|
361
361
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
362
|
-
|
|
362
|
+
_chunkWB3ZJJBHcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
363
363
|
"img",
|
|
364
364
|
{
|
|
365
|
-
src:
|
|
365
|
+
src: _chunkWB3ZJJBHcjs.getTokenIcon.call(void 0, targetSymbol),
|
|
366
366
|
alt: targetSymbol,
|
|
367
367
|
className: "rs-withdraw-dropdown-icon"
|
|
368
368
|
}
|
|
@@ -403,10 +403,10 @@ function WithdrawFormStep({
|
|
|
403
403
|
setShowTokenDropdown(false);
|
|
404
404
|
},
|
|
405
405
|
children: [
|
|
406
|
-
|
|
406
|
+
_chunkWB3ZJJBHcjs.getTokenIcon.call(void 0, option.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
407
407
|
"img",
|
|
408
408
|
{
|
|
409
|
-
src:
|
|
409
|
+
src: _chunkWB3ZJJBHcjs.getTokenIcon.call(void 0, option.symbol),
|
|
410
410
|
alt: option.symbol,
|
|
411
411
|
className: "rs-withdraw-dropdown-icon"
|
|
412
412
|
}
|
|
@@ -439,10 +439,10 @@ function WithdrawFormStep({
|
|
|
439
439
|
},
|
|
440
440
|
children: [
|
|
441
441
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
|
|
442
|
-
|
|
442
|
+
_chunkWB3ZJJBHcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
443
443
|
"img",
|
|
444
444
|
{
|
|
445
|
-
src:
|
|
445
|
+
src: _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, targetChain),
|
|
446
446
|
alt: targetChainName,
|
|
447
447
|
className: "rs-withdraw-dropdown-icon"
|
|
448
448
|
}
|
|
@@ -483,10 +483,10 @@ function WithdrawFormStep({
|
|
|
483
483
|
setShowChainDropdown(false);
|
|
484
484
|
},
|
|
485
485
|
children: [
|
|
486
|
-
|
|
486
|
+
_chunkWB3ZJJBHcjs.getChainIcon.call(void 0, chain.id) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
487
487
|
"img",
|
|
488
488
|
{
|
|
489
|
-
src:
|
|
489
|
+
src: _chunkWB3ZJJBHcjs.getChainIcon.call(void 0, chain.id),
|
|
490
490
|
alt: chain.name,
|
|
491
491
|
className: "rs-withdraw-dropdown-icon"
|
|
492
492
|
}
|
|
@@ -504,11 +504,11 @@ function WithdrawFormStep({
|
|
|
504
504
|
chainMismatch && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch", children: [
|
|
505
505
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch-text", children: [
|
|
506
506
|
"Switch to ",
|
|
507
|
-
|
|
507
|
+
_chunkWB3ZJJBHcjs.getChainName.call(void 0, asset.chainId),
|
|
508
508
|
" to continue."
|
|
509
509
|
] }),
|
|
510
510
|
switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
511
|
-
|
|
511
|
+
_chunkKIRDZLOScjs.Button,
|
|
512
512
|
{
|
|
513
513
|
variant: "outline",
|
|
514
514
|
size: "small",
|
|
@@ -540,7 +540,7 @@ function WithdrawFormStep({
|
|
|
540
540
|
] })
|
|
541
541
|
] }),
|
|
542
542
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
543
|
-
|
|
543
|
+
_chunkKIRDZLOScjs.Button,
|
|
544
544
|
{
|
|
545
545
|
onClick: handleWithdraw,
|
|
546
546
|
fullWidth: true,
|
|
@@ -549,7 +549,7 @@ function WithdrawFormStep({
|
|
|
549
549
|
children: isBusy ? "Preparing..." : "Withdraw"
|
|
550
550
|
}
|
|
551
551
|
) }),
|
|
552
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
552
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKIRDZLOScjs.PoweredBy, {})
|
|
553
553
|
] });
|
|
554
554
|
}
|
|
555
555
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -632,7 +632,7 @@ async function executeSafeEthTransfer(params) {
|
|
|
632
632
|
throw new Error("Wallet not connected");
|
|
633
633
|
}
|
|
634
634
|
if (chain.id !== chainId) {
|
|
635
|
-
throw new Error(`Switch to ${
|
|
635
|
+
throw new Error(`Switch to ${_chunkWB3ZJJBHcjs.getChainName.call(void 0, chainId)} to sign`);
|
|
636
636
|
}
|
|
637
637
|
const isOwner = await publicClient.readContract({
|
|
638
638
|
address: safeAddress,
|
|
@@ -715,7 +715,7 @@ async function executeSafeErc20Transfer(params) {
|
|
|
715
715
|
throw new Error("Wallet not connected");
|
|
716
716
|
}
|
|
717
717
|
if (chain.id !== chainId) {
|
|
718
|
-
throw new Error(`Switch to ${
|
|
718
|
+
throw new Error(`Switch to ${_chunkWB3ZJJBHcjs.getChainName.call(void 0, chainId)} to sign`);
|
|
719
719
|
}
|
|
720
720
|
const isOwner = await publicClient.readContract({
|
|
721
721
|
address: safeAddress,
|
|
@@ -854,7 +854,7 @@ function WithdrawFlow({
|
|
|
854
854
|
recipient: defaultRecipient,
|
|
855
855
|
amount: defaultAmount,
|
|
856
856
|
service,
|
|
857
|
-
signerAddress =
|
|
857
|
+
signerAddress = _chunkWB3ZJJBHcjs.DEFAULT_SIGNER_ADDRESS,
|
|
858
858
|
sessionChainIds,
|
|
859
859
|
forceRegister = false,
|
|
860
860
|
waitForFinalTx = true,
|
|
@@ -923,14 +923,14 @@ function WithdrawFlow({
|
|
|
923
923
|
return {
|
|
924
924
|
ownerAddress: dappAddress,
|
|
925
925
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
926
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
926
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkKIRDZLOScjs.getPublicClient.call(void 0, sourceChain))),
|
|
927
927
|
switchChain: dappSwitchChain
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
930
|
return {
|
|
931
931
|
ownerAddress: dappWalletClient.account.address,
|
|
932
932
|
walletClient: dappWalletClient,
|
|
933
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
933
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkKIRDZLOScjs.getPublicClient.call(void 0, sourceChain))),
|
|
934
934
|
switchChain: dappSwitchChain
|
|
935
935
|
};
|
|
936
936
|
}
|
|
@@ -939,7 +939,7 @@ function WithdrawFlow({
|
|
|
939
939
|
return {
|
|
940
940
|
ownerAddress: dappWalletClient.account.address,
|
|
941
941
|
walletClient: dappWalletClient,
|
|
942
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
942
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkKIRDZLOScjs.getPublicClient.call(void 0, sourceChain))),
|
|
943
943
|
switchChain: dappSwitchChain
|
|
944
944
|
};
|
|
945
945
|
}
|
|
@@ -965,10 +965,10 @@ function WithdrawFlow({
|
|
|
965
965
|
sourceChain
|
|
966
966
|
]);
|
|
967
967
|
const asset = _react.useMemo.call(void 0, () => {
|
|
968
|
-
const symbol =
|
|
969
|
-
const decimals =
|
|
968
|
+
const symbol = _chunkWB3ZJJBHcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
969
|
+
const decimals = _chunkWB3ZJJBHcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
970
970
|
return {
|
|
971
|
-
id:
|
|
971
|
+
id: _chunkKIRDZLOScjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
972
972
|
chainId: sourceChain,
|
|
973
973
|
token: sourceToken,
|
|
974
974
|
symbol,
|
|
@@ -976,7 +976,7 @@ function WithdrawFlow({
|
|
|
976
976
|
decimals
|
|
977
977
|
};
|
|
978
978
|
}, [sourceChain, sourceToken]);
|
|
979
|
-
const isSourceNative = sourceToken.toLowerCase() ===
|
|
979
|
+
const isSourceNative = sourceToken.toLowerCase() === _chunkWB3ZJJBHcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
980
980
|
const stepIndex = step.type === "form" ? 0 : 1;
|
|
981
981
|
const currentBackHandler = void 0;
|
|
982
982
|
_react.useEffect.call(void 0, () => {
|
|
@@ -998,15 +998,15 @@ function WithdrawFlow({
|
|
|
998
998
|
[onError]
|
|
999
999
|
);
|
|
1000
1000
|
const resolveSessionOwner = _react.useCallback.call(void 0, async (eoaAddress) => {
|
|
1001
|
-
const localOwner =
|
|
1001
|
+
const localOwner = _chunkKIRDZLOScjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
1002
1002
|
if (localOwner) {
|
|
1003
1003
|
return {
|
|
1004
|
-
account:
|
|
1004
|
+
account: _chunkKIRDZLOScjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
1005
1005
|
address: localOwner.address
|
|
1006
1006
|
};
|
|
1007
1007
|
}
|
|
1008
|
-
const created =
|
|
1009
|
-
|
|
1008
|
+
const created = _chunkKIRDZLOScjs.createSessionOwnerKey.call(void 0, );
|
|
1009
|
+
_chunkKIRDZLOScjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
1010
1010
|
return {
|
|
1011
1011
|
account: created.account,
|
|
1012
1012
|
address: created.address
|
|
@@ -1050,7 +1050,7 @@ function WithdrawFlow({
|
|
|
1050
1050
|
primaryType: typedData.primaryType,
|
|
1051
1051
|
message: typedData.message
|
|
1052
1052
|
});
|
|
1053
|
-
const sessionDetails =
|
|
1053
|
+
const sessionDetails = _chunkKIRDZLOScjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
|
|
1054
1054
|
await service.registerAccount({
|
|
1055
1055
|
address: smartAccount,
|
|
1056
1056
|
accountParams: {
|
|
@@ -1069,7 +1069,7 @@ function WithdrawFlow({
|
|
|
1069
1069
|
}
|
|
1070
1070
|
handleConnected(ownerAddress2, smartAccount);
|
|
1071
1071
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1072
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _24 => _24.publicClient]), () => (
|
|
1072
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _24 => _24.publicClient]), () => ( _chunkKIRDZLOScjs.getPublicClient.call(void 0, sourceChain)));
|
|
1073
1073
|
let result;
|
|
1074
1074
|
if (onSignTransaction) {
|
|
1075
1075
|
const transferData = isSourceNative ? { to: smartAccount, value: amountUnits, data: "0x" } : {
|
|
@@ -1137,7 +1137,7 @@ function WithdrawFlow({
|
|
|
1137
1137
|
});
|
|
1138
1138
|
} catch (err) {
|
|
1139
1139
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
1140
|
-
handleError(
|
|
1140
|
+
handleError(_chunkKIRDZLOScjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1141
1141
|
throw err;
|
|
1142
1142
|
} finally {
|
|
1143
1143
|
setIsSubmitting(false);
|
|
@@ -1176,12 +1176,12 @@ function WithdrawFlow({
|
|
|
1176
1176
|
[onWithdrawFailed]
|
|
1177
1177
|
);
|
|
1178
1178
|
const targetChainOptions = _react.useMemo.call(void 0, () => {
|
|
1179
|
-
return
|
|
1180
|
-
(chain) =>
|
|
1179
|
+
return _chunkWB3ZJJBHcjs.SOURCE_CHAINS.filter(
|
|
1180
|
+
(chain) => _chunkWB3ZJJBHcjs.getSupportedTargetTokens.call(void 0, chain.id).length > 0
|
|
1181
1181
|
);
|
|
1182
1182
|
}, []);
|
|
1183
1183
|
const targetTokenOptions = _react.useMemo.call(void 0,
|
|
1184
|
-
() =>
|
|
1184
|
+
() => _chunkWB3ZJJBHcjs.getSupportedTargetTokens.call(void 0, targetChain),
|
|
1185
1185
|
[targetChain]
|
|
1186
1186
|
);
|
|
1187
1187
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1196,7 +1196,7 @@ function WithdrawFlow({
|
|
|
1196
1196
|
const handleTargetChainChange = _react.useCallback.call(void 0,
|
|
1197
1197
|
(chainId) => {
|
|
1198
1198
|
setTargetChain(chainId);
|
|
1199
|
-
const options =
|
|
1199
|
+
const options = _chunkWB3ZJJBHcjs.getSupportedTargetTokens.call(void 0, chainId);
|
|
1200
1200
|
if (options.length === 0) {
|
|
1201
1201
|
return;
|
|
1202
1202
|
}
|
|
@@ -1229,7 +1229,7 @@ function WithdrawFlow({
|
|
|
1229
1229
|
}, [walletOptionsKey, selectedConnectAddressEffective]);
|
|
1230
1230
|
if (showConnectStep) {
|
|
1231
1231
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1232
|
-
|
|
1232
|
+
_chunkKIRDZLOScjs.ConnectStep,
|
|
1233
1233
|
{
|
|
1234
1234
|
walletOptions,
|
|
1235
1235
|
selectedAddress: selectedConnectAddressEffective,
|
|
@@ -1249,7 +1249,7 @@ function WithdrawFlow({
|
|
|
1249
1249
|
if (!signerContext) return null;
|
|
1250
1250
|
if (!onSignTransaction && !signerContext.walletClient) return null;
|
|
1251
1251
|
const ownerAddress = signerContext.ownerAddress;
|
|
1252
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1252
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkKIRDZLOScjs.getPublicClient.call(void 0, sourceChain)));
|
|
1253
1253
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
1254
1254
|
step.type === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1255
1255
|
WithdrawFormStep,
|
|
@@ -1274,7 +1274,7 @@ function WithdrawFlow({
|
|
|
1274
1274
|
}
|
|
1275
1275
|
),
|
|
1276
1276
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1277
|
-
|
|
1277
|
+
_chunkKIRDZLOScjs.ProcessingStep,
|
|
1278
1278
|
{
|
|
1279
1279
|
smartAccount: step.smartAccount,
|
|
1280
1280
|
txHash: step.txHash,
|
|
@@ -1300,7 +1300,7 @@ function WithdrawFlow({
|
|
|
1300
1300
|
// src/WithdrawModal.tsx
|
|
1301
1301
|
|
|
1302
1302
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1303
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1303
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-SVZQKH2X.cjs"))).then((m) => ({
|
|
1304
1304
|
default: m.WithdrawModalReown
|
|
1305
1305
|
}))
|
|
1306
1306
|
);
|
|
@@ -1326,8 +1326,8 @@ function WithdrawModalInner({
|
|
|
1326
1326
|
isOpen,
|
|
1327
1327
|
onClose,
|
|
1328
1328
|
inline,
|
|
1329
|
-
backendUrl =
|
|
1330
|
-
signerAddress =
|
|
1329
|
+
backendUrl = _chunkWB3ZJJBHcjs.DEFAULT_BACKEND_URL,
|
|
1330
|
+
signerAddress = _chunkWB3ZJJBHcjs.DEFAULT_SIGNER_ADDRESS,
|
|
1331
1331
|
sessionChainIds,
|
|
1332
1332
|
forceRegister = false,
|
|
1333
1333
|
waitForFinalTx = true,
|
|
@@ -1352,12 +1352,12 @@ function WithdrawModalInner({
|
|
|
1352
1352
|
const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
|
|
1353
1353
|
const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
|
|
1354
1354
|
const backHandlerRef = _react.useRef.call(void 0, void 0);
|
|
1355
|
-
const targetChain =
|
|
1356
|
-
const sourceChain =
|
|
1357
|
-
const service = _react.useMemo.call(void 0, () =>
|
|
1355
|
+
const targetChain = _chunkWB3ZJJBHcjs.getChainId.call(void 0, targetChainProp);
|
|
1356
|
+
const sourceChain = _chunkWB3ZJJBHcjs.getChainId.call(void 0, sourceChainProp);
|
|
1357
|
+
const service = _react.useMemo.call(void 0, () => _chunkKIRDZLOScjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
|
|
1358
1358
|
_react.useEffect.call(void 0, () => {
|
|
1359
1359
|
if (isOpen && modalRef.current) {
|
|
1360
|
-
|
|
1360
|
+
_chunkKIRDZLOScjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1361
1361
|
}
|
|
1362
1362
|
}, [isOpen, theme]);
|
|
1363
1363
|
const hasCalledReady = _react.useRef.call(void 0, false);
|
|
@@ -1393,7 +1393,7 @@ function WithdrawModalInner({
|
|
|
1393
1393
|
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _36 => _36.title]), () => ( "Withdraw"));
|
|
1394
1394
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
|
|
1395
1395
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1396
|
-
|
|
1396
|
+
_chunkKIRDZLOScjs.Modal,
|
|
1397
1397
|
{
|
|
1398
1398
|
isOpen,
|
|
1399
1399
|
onClose,
|
|
@@ -1451,7 +1451,7 @@ function WithdrawModalInner({
|
|
|
1451
1451
|
] }),
|
|
1452
1452
|
balanceTitle && totalBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
|
|
1453
1453
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-label", children: balanceTitle }),
|
|
1454
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children:
|
|
1454
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunkKIRDZLOScjs.currencyFormatter.format(totalBalanceUsd) })
|
|
1455
1455
|
] })
|
|
1456
1456
|
] }),
|
|
1457
1457
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|