@rhinestone/deposit-modal 0.2.1 → 0.2.3
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-MMDTCHQL.cjs → DepositModalReown-QPJ5TT57.cjs} +3 -3
- package/dist/{DepositModalReown-IIEXOTKU.mjs → DepositModalReown-SJHEU6RQ.mjs} +2 -2
- package/dist/{WithdrawModalReown-HXTXSZCJ.cjs → WithdrawModalReown-KGKKBTC7.cjs} +3 -3
- package/dist/{WithdrawModalReown-URF6AERQ.mjs → WithdrawModalReown-RUJZCQ4C.mjs} +2 -2
- package/dist/{chunk-7TEGUTU4.cjs → chunk-5EU7N73M.cjs} +42 -42
- package/dist/{chunk-HTYUCLJP.mjs → chunk-DGT2DZXN.mjs} +117 -35
- package/dist/{chunk-3CRG5NPG.mjs → chunk-JRNGXHWQ.mjs} +6 -2
- package/dist/{chunk-TKTOPC2W.mjs → chunk-MKO5TNVQ.mjs} +2 -2
- package/dist/{chunk-XW4M7WDI.cjs → chunk-T2KOQH57.cjs} +6 -2
- package/dist/{chunk-PZ3GVS3D.cjs → chunk-TYJEZX6S.cjs} +216 -134
- 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 +10 -0
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTYJEZX6Scjs = require('./chunk-TYJEZX6S.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkYQFH2WSWcjs = require('./chunk-YQFH2WSW.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-T2KOQH57.cjs');
|
|
9
9
|
require('./chunk-MUWVDVY4.cjs');
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
@@ -32,7 +32,7 @@ function DepositModalWithReown(props) {
|
|
|
32
32
|
reown.disconnect();
|
|
33
33
|
}, [reown.disconnect]);
|
|
34
34
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
35
|
-
|
|
35
|
+
_chunkTYJEZX6Scjs.DepositModalInner,
|
|
36
36
|
{
|
|
37
37
|
...props,
|
|
38
38
|
reownWallet: reownWithSolana,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DGT2DZXN.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-5YXAQB6A.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JRNGXHWQ.mjs";
|
|
9
9
|
import "./chunk-SDZKKUCJ.mjs";
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk5EU7N73Mcjs = require('./chunk-5EU7N73M.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkYQFH2WSWcjs = require('./chunk-YQFH2WSW.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-T2KOQH57.cjs');
|
|
9
9
|
require('./chunk-MUWVDVY4.cjs');
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
@@ -20,7 +20,7 @@ function WithdrawModalWithReown(props) {
|
|
|
20
20
|
reown.disconnect();
|
|
21
21
|
}, [reown.disconnect]);
|
|
22
22
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
23
|
-
|
|
23
|
+
_chunk5EU7N73Mcjs.WithdrawModalInner,
|
|
24
24
|
{
|
|
25
25
|
...props,
|
|
26
26
|
reownWallet: reown,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MKO5TNVQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-5YXAQB6A.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JRNGXHWQ.mjs";
|
|
9
9
|
import "./chunk-SDZKKUCJ.mjs";
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkT2KOQH57cjs = require('./chunk-T2KOQH57.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
@@ -127,7 +127,7 @@ function WithdrawFormStep({
|
|
|
127
127
|
setIsSwitching(true);
|
|
128
128
|
switchChain(asset.chainId).catch((err) => {
|
|
129
129
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
130
|
-
setError(
|
|
130
|
+
setError(_chunkT2KOQH57cjs.formatUserError.call(void 0, raw));
|
|
131
131
|
}).finally(() => {
|
|
132
132
|
setIsSwitching(false);
|
|
133
133
|
});
|
|
@@ -147,7 +147,7 @@ function WithdrawFormStep({
|
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
149
|
try {
|
|
150
|
-
const bal =
|
|
150
|
+
const bal = _chunkT2KOQH57cjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
|
|
151
151
|
address: asset.token,
|
|
152
152
|
abi: _viem.erc20Abi,
|
|
153
153
|
functionName: "balanceOf",
|
|
@@ -250,7 +250,7 @@ function WithdrawFormStep({
|
|
|
250
250
|
await onSubmit(recipient, amount);
|
|
251
251
|
} catch (err) {
|
|
252
252
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
253
|
-
setError(
|
|
253
|
+
setError(_chunkT2KOQH57cjs.formatUserError.call(void 0, raw));
|
|
254
254
|
} finally {
|
|
255
255
|
setIsSubmitting(false);
|
|
256
256
|
}
|
|
@@ -258,11 +258,11 @@ function WithdrawFormStep({
|
|
|
258
258
|
if (isBalanceLoading) {
|
|
259
259
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
260
260
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-body rs-withdraw-loading", children: [
|
|
261
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
261
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.Spinner, { className: "rs-spinner--lg" }),
|
|
262
262
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
263
263
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunkMUWVDVY4cjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
|
|
264
264
|
] }),
|
|
265
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
265
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
|
|
266
266
|
] });
|
|
267
267
|
}
|
|
268
268
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
@@ -361,7 +361,7 @@ function WithdrawFormStep({
|
|
|
361
361
|
] })
|
|
362
362
|
] }),
|
|
363
363
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
364
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ?
|
|
364
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkT2KOQH57cjs.currencyFormatter.format(amountUsd) : "$0.00" }),
|
|
365
365
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
366
366
|
"Balance: ",
|
|
367
367
|
formattedBalance,
|
|
@@ -555,7 +555,7 @@ function WithdrawFormStep({
|
|
|
555
555
|
] })
|
|
556
556
|
] }),
|
|
557
557
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
558
|
-
|
|
558
|
+
_chunkT2KOQH57cjs.Button,
|
|
559
559
|
{
|
|
560
560
|
onClick: handleWithdraw,
|
|
561
561
|
fullWidth: true,
|
|
@@ -564,7 +564,7 @@ function WithdrawFormStep({
|
|
|
564
564
|
children: isBusy ? "Preparing..." : !recipient ? "Enter Recipient Address" : !amount ? "Enter Withdraw Amount" : "Withdraw"
|
|
565
565
|
}
|
|
566
566
|
) }),
|
|
567
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
567
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
|
|
568
568
|
] });
|
|
569
569
|
}
|
|
570
570
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -891,27 +891,27 @@ function WithdrawFlow({
|
|
|
891
891
|
onError,
|
|
892
892
|
debug
|
|
893
893
|
}) {
|
|
894
|
-
const onStepChangeRef =
|
|
895
|
-
const onTotalBalanceChangeRef =
|
|
896
|
-
const onEventRef =
|
|
897
|
-
const onConnectedRef =
|
|
898
|
-
const onWithdrawSubmittedRef =
|
|
899
|
-
const onWithdrawCompleteRef =
|
|
900
|
-
const onWithdrawFailedRef =
|
|
901
|
-
const onErrorRef =
|
|
894
|
+
const onStepChangeRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onStepChange);
|
|
895
|
+
const onTotalBalanceChangeRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onTotalBalanceChange);
|
|
896
|
+
const onEventRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onEvent);
|
|
897
|
+
const onConnectedRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onConnected);
|
|
898
|
+
const onWithdrawSubmittedRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onWithdrawSubmitted);
|
|
899
|
+
const onWithdrawCompleteRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onWithdrawComplete);
|
|
900
|
+
const onWithdrawFailedRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onWithdrawFailed);
|
|
901
|
+
const onErrorRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onError);
|
|
902
902
|
const [step, setStep] = _react.useState.call(void 0, { type: "form" });
|
|
903
903
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
904
904
|
const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, 0);
|
|
905
905
|
const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = _react.useState.call(void 0, false);
|
|
906
906
|
const logFlow = _react.useCallback.call(void 0,
|
|
907
907
|
(message, data) => {
|
|
908
|
-
|
|
908
|
+
_chunkT2KOQH57cjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
909
909
|
},
|
|
910
910
|
[debug]
|
|
911
911
|
);
|
|
912
912
|
const logFlowError = _react.useCallback.call(void 0,
|
|
913
913
|
(message, error, data) => {
|
|
914
|
-
|
|
914
|
+
_chunkT2KOQH57cjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
915
915
|
},
|
|
916
916
|
[debug]
|
|
917
917
|
);
|
|
@@ -970,14 +970,14 @@ function WithdrawFlow({
|
|
|
970
970
|
return {
|
|
971
971
|
ownerAddress: dappAddress,
|
|
972
972
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
973
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
973
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, sourceChain))),
|
|
974
974
|
switchChain: dappSwitchChain
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
977
|
return {
|
|
978
978
|
ownerAddress: dappWalletClient.account.address,
|
|
979
979
|
walletClient: dappWalletClient,
|
|
980
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
980
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, sourceChain))),
|
|
981
981
|
switchChain: dappSwitchChain
|
|
982
982
|
};
|
|
983
983
|
}
|
|
@@ -988,7 +988,7 @@ function WithdrawFlow({
|
|
|
988
988
|
return {
|
|
989
989
|
ownerAddress: dappWalletClient.account.address,
|
|
990
990
|
walletClient: dappWalletClient,
|
|
991
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
991
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, sourceChain))),
|
|
992
992
|
switchChain: dappSwitchChain
|
|
993
993
|
};
|
|
994
994
|
}
|
|
@@ -1018,7 +1018,7 @@ function WithdrawFlow({
|
|
|
1018
1018
|
const symbol = _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
1019
1019
|
const decimals = _chunkMUWVDVY4cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
1020
1020
|
return {
|
|
1021
|
-
id:
|
|
1021
|
+
id: _chunkT2KOQH57cjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1022
1022
|
chainId: sourceChain,
|
|
1023
1023
|
token: sourceToken,
|
|
1024
1024
|
symbol,
|
|
@@ -1090,15 +1090,15 @@ function WithdrawFlow({
|
|
|
1090
1090
|
[logFlowError, onErrorRef]
|
|
1091
1091
|
);
|
|
1092
1092
|
const resolveSessionOwner = _react.useCallback.call(void 0, async (eoaAddress) => {
|
|
1093
|
-
const localOwner =
|
|
1093
|
+
const localOwner = _chunkT2KOQH57cjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
1094
1094
|
if (localOwner) {
|
|
1095
1095
|
return {
|
|
1096
|
-
account:
|
|
1096
|
+
account: _chunkT2KOQH57cjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
1097
1097
|
address: localOwner.address
|
|
1098
1098
|
};
|
|
1099
1099
|
}
|
|
1100
|
-
const created =
|
|
1101
|
-
|
|
1100
|
+
const created = _chunkT2KOQH57cjs.createSessionOwnerKey.call(void 0, );
|
|
1101
|
+
_chunkT2KOQH57cjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
1102
1102
|
return {
|
|
1103
1103
|
account: created.account,
|
|
1104
1104
|
address: created.address
|
|
@@ -1138,7 +1138,7 @@ function WithdrawFlow({
|
|
|
1138
1138
|
const setup = await service.setupAccount({
|
|
1139
1139
|
ownerAddress: ownerAddress2,
|
|
1140
1140
|
sessionOwnerAddress: sessionOwner.address,
|
|
1141
|
-
targetChain:
|
|
1141
|
+
targetChain: _chunkT2KOQH57cjs.toEvmCaip2.call(void 0, targetChain),
|
|
1142
1142
|
targetToken,
|
|
1143
1143
|
recipient,
|
|
1144
1144
|
signerAddress,
|
|
@@ -1166,7 +1166,7 @@ function WithdrawFlow({
|
|
|
1166
1166
|
primaryType: typedData.primaryType,
|
|
1167
1167
|
message: typedData.message
|
|
1168
1168
|
});
|
|
1169
|
-
const sessionDetails =
|
|
1169
|
+
const sessionDetails = _chunkT2KOQH57cjs.buildSessionDetails.call(void 0,
|
|
1170
1170
|
setup.sessionDetailsUnsigned,
|
|
1171
1171
|
signature
|
|
1172
1172
|
);
|
|
@@ -1180,7 +1180,7 @@ function WithdrawFlow({
|
|
|
1180
1180
|
eoaAddress: ownerAddress2,
|
|
1181
1181
|
sessionOwner: sessionOwner.address,
|
|
1182
1182
|
target: {
|
|
1183
|
-
chain:
|
|
1183
|
+
chain: _chunkT2KOQH57cjs.toEvmCaip2.call(void 0, targetChain),
|
|
1184
1184
|
token: targetToken,
|
|
1185
1185
|
recipient
|
|
1186
1186
|
}
|
|
@@ -1189,7 +1189,7 @@ function WithdrawFlow({
|
|
|
1189
1189
|
}
|
|
1190
1190
|
handleConnected(ownerAddress2, smartAccount);
|
|
1191
1191
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1192
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _34 => _34.publicClient]), () => (
|
|
1192
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _34 => _34.publicClient]), () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, sourceChain)));
|
|
1193
1193
|
let result;
|
|
1194
1194
|
if (onSignTransaction) {
|
|
1195
1195
|
const transferTarget = isSameRoute ? recipient : smartAccount;
|
|
@@ -1213,7 +1213,7 @@ function WithdrawFlow({
|
|
|
1213
1213
|
const { signature } = await onSignTransaction(request);
|
|
1214
1214
|
const relayResult = await service.relayWithdraw({
|
|
1215
1215
|
smartAccount,
|
|
1216
|
-
chainId:
|
|
1216
|
+
chainId: _chunkT2KOQH57cjs.toEvmCaip2.call(void 0, sourceChain),
|
|
1217
1217
|
safeAddress,
|
|
1218
1218
|
safeTransaction: request.typedData.message,
|
|
1219
1219
|
signature
|
|
@@ -1272,7 +1272,7 @@ function WithdrawFlow({
|
|
|
1272
1272
|
targetChain,
|
|
1273
1273
|
targetToken
|
|
1274
1274
|
});
|
|
1275
|
-
handleError(
|
|
1275
|
+
handleError(_chunkT2KOQH57cjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1276
1276
|
throw err;
|
|
1277
1277
|
} finally {
|
|
1278
1278
|
setIsSubmitting(false);
|
|
@@ -1411,7 +1411,7 @@ function WithdrawFlow({
|
|
|
1411
1411
|
}, [walletOptions, ownerAddress, _optionalChain([reownWallet, 'optionalAccess', _51 => _51.icon])]);
|
|
1412
1412
|
if (showConnectStep) {
|
|
1413
1413
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1414
|
-
|
|
1414
|
+
_chunkT2KOQH57cjs.ConnectStep,
|
|
1415
1415
|
{
|
|
1416
1416
|
walletOptions,
|
|
1417
1417
|
selectedWalletId: selectedWalletIdEffective,
|
|
@@ -1432,7 +1432,7 @@ function WithdrawFlow({
|
|
|
1432
1432
|
if (!signerContext) return null;
|
|
1433
1433
|
if (!onSignTransaction && !signerContext.walletClient) return null;
|
|
1434
1434
|
const resolvedConnectedRecipient = _optionalChain([selectedWalletOption, 'optionalAccess', _52 => _52.kind]) === "external" ? selectedWalletOption.address : void 0;
|
|
1435
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1435
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, sourceChain)));
|
|
1436
1436
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
1437
1437
|
step.type === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1438
1438
|
WithdrawFormStep,
|
|
@@ -1458,7 +1458,7 @@ function WithdrawFlow({
|
|
|
1458
1458
|
}
|
|
1459
1459
|
),
|
|
1460
1460
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1461
|
-
|
|
1461
|
+
_chunkT2KOQH57cjs.ProcessingStep,
|
|
1462
1462
|
{
|
|
1463
1463
|
smartAccount: step.smartAccount,
|
|
1464
1464
|
txHash: step.txHash,
|
|
@@ -1485,7 +1485,7 @@ function WithdrawFlow({
|
|
|
1485
1485
|
// src/WithdrawModal.tsx
|
|
1486
1486
|
|
|
1487
1487
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1488
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1488
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-KGKKBTC7.cjs"))).then((m) => ({
|
|
1489
1489
|
default: m.WithdrawModalReown
|
|
1490
1490
|
}))
|
|
1491
1491
|
);
|
|
@@ -1538,19 +1538,19 @@ function WithdrawModalInner({
|
|
|
1538
1538
|
debug
|
|
1539
1539
|
}) {
|
|
1540
1540
|
const modalRef = _react.useRef.call(void 0, null);
|
|
1541
|
-
const onReadyRef =
|
|
1541
|
+
const onReadyRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onReady);
|
|
1542
1542
|
const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
|
|
1543
1543
|
const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
|
|
1544
1544
|
const backHandlerRef = _react.useRef.call(void 0, void 0);
|
|
1545
1545
|
const targetChain = _chunkMUWVDVY4cjs.getChainId.call(void 0, targetChainProp);
|
|
1546
1546
|
const sourceChain = _chunkMUWVDVY4cjs.getChainId.call(void 0, sourceChainProp);
|
|
1547
1547
|
const service = _react.useMemo.call(void 0,
|
|
1548
|
-
() =>
|
|
1548
|
+
() => _chunkT2KOQH57cjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1549
1549
|
[backendUrl, debug]
|
|
1550
1550
|
);
|
|
1551
1551
|
_react.useEffect.call(void 0, () => {
|
|
1552
1552
|
if (isOpen && modalRef.current) {
|
|
1553
|
-
|
|
1553
|
+
_chunkT2KOQH57cjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1554
1554
|
}
|
|
1555
1555
|
}, [isOpen, theme]);
|
|
1556
1556
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1584,7 +1584,7 @@ function WithdrawModalInner({
|
|
|
1584
1584
|
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _62 => _62.title]), () => ( "Withdraw"));
|
|
1585
1585
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
|
|
1586
1586
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1587
|
-
|
|
1587
|
+
_chunkT2KOQH57cjs.Modal,
|
|
1588
1588
|
{
|
|
1589
1589
|
isOpen,
|
|
1590
1590
|
onClose,
|
|
@@ -1643,7 +1643,7 @@ function WithdrawModalInner({
|
|
|
1643
1643
|
] }),
|
|
1644
1644
|
balance && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
|
|
1645
1645
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-label", children: balance.title }),
|
|
1646
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ?
|
|
1646
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkT2KOQH57cjs.currencyFormatter.format(totalBalanceUsd) : null))) })
|
|
1647
1647
|
] })
|
|
1648
1648
|
] }),
|
|
1649
1649
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|