@rhinestone/deposit-modal 0.1.26 → 0.1.27
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-NKDYLTKD.cjs → DepositModalReown-NGYZ4G7Q.cjs} +3 -3
- package/dist/{DepositModalReown-4WZF2HMJ.mjs → DepositModalReown-PFKTSKDS.mjs} +2 -2
- package/dist/{WithdrawModalReown-244RQ5FZ.mjs → WithdrawModalReown-6AAWH35J.mjs} +2 -2
- package/dist/{WithdrawModalReown-GL4TM22D.cjs → WithdrawModalReown-BA6ECON3.cjs} +3 -3
- package/dist/{chunk-7QCFFKB5.cjs → chunk-7MQU2SR7.cjs} +72 -84
- package/dist/{chunk-W42B54IA.mjs → chunk-AJALMXW4.mjs} +30 -42
- package/dist/{chunk-DJAUNNEW.mjs → chunk-QCRZCGAE.mjs} +30 -34
- package/dist/{chunk-4Q6QCALP.cjs → chunk-QWYZJL3L.cjs} +103 -232
- package/dist/{chunk-4WULBRUA.cjs → chunk-XIS33BZ6.cjs} +66 -70
- package/dist/{chunk-3FK5FAUL.mjs → chunk-YOFGP4FV.mjs} +81 -210
- 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 -2
|
@@ -16,12 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var _chunk4Q6QCALPcjs = require('./chunk-4Q6QCALP.cjs');
|
|
24
|
-
|
|
19
|
+
var _chunkQWYZJL3Lcjs = require('./chunk-QWYZJL3L.cjs');
|
|
25
20
|
|
|
26
21
|
|
|
27
22
|
|
|
@@ -115,7 +110,7 @@ function WithdrawFormStep({
|
|
|
115
110
|
setIsSwitching(true);
|
|
116
111
|
switchChain(asset.chainId).catch((err) => {
|
|
117
112
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
118
|
-
setError(
|
|
113
|
+
setError(_chunkQWYZJL3Lcjs.formatUserError.call(void 0, raw));
|
|
119
114
|
}).finally(() => {
|
|
120
115
|
setIsSwitching(false);
|
|
121
116
|
});
|
|
@@ -132,7 +127,7 @@ function WithdrawFormStep({
|
|
|
132
127
|
return;
|
|
133
128
|
}
|
|
134
129
|
try {
|
|
135
|
-
const bal =
|
|
130
|
+
const bal = _chunkQWYZJL3Lcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
|
|
136
131
|
address: asset.token,
|
|
137
132
|
abi: _viem.erc20Abi,
|
|
138
133
|
functionName: "balanceOf",
|
|
@@ -234,7 +229,7 @@ function WithdrawFormStep({
|
|
|
234
229
|
await onSubmit(recipient, amount);
|
|
235
230
|
} catch (err) {
|
|
236
231
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
237
|
-
setError(
|
|
232
|
+
setError(_chunkQWYZJL3Lcjs.formatUserError.call(void 0, raw));
|
|
238
233
|
} finally {
|
|
239
234
|
setIsSubmitting(false);
|
|
240
235
|
}
|
|
@@ -246,7 +241,7 @@ function WithdrawFormStep({
|
|
|
246
241
|
await switchChain(asset.chainId);
|
|
247
242
|
} catch (err) {
|
|
248
243
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
249
|
-
setError(
|
|
244
|
+
setError(_chunkQWYZJL3Lcjs.formatUserError.call(void 0, raw));
|
|
250
245
|
} finally {
|
|
251
246
|
setIsSwitching(false);
|
|
252
247
|
}
|
|
@@ -336,7 +331,7 @@ function WithdrawFormStep({
|
|
|
336
331
|
] })
|
|
337
332
|
] }),
|
|
338
333
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
339
|
-
/* @__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 ? _chunkQWYZJL3Lcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
|
|
340
335
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
341
336
|
formattedBalance,
|
|
342
337
|
" ",
|
|
@@ -513,7 +508,7 @@ function WithdrawFormStep({
|
|
|
513
508
|
" to continue."
|
|
514
509
|
] }),
|
|
515
510
|
switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
516
|
-
|
|
511
|
+
_chunkQWYZJL3Lcjs.Button,
|
|
517
512
|
{
|
|
518
513
|
variant: "outline",
|
|
519
514
|
size: "small",
|
|
@@ -545,7 +540,7 @@ function WithdrawFormStep({
|
|
|
545
540
|
] })
|
|
546
541
|
] }),
|
|
547
542
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
548
|
-
|
|
543
|
+
_chunkQWYZJL3Lcjs.Button,
|
|
549
544
|
{
|
|
550
545
|
onClick: handleWithdraw,
|
|
551
546
|
fullWidth: true,
|
|
@@ -554,14 +549,11 @@ function WithdrawFormStep({
|
|
|
554
549
|
children: isBusy ? "Preparing..." : "Withdraw"
|
|
555
550
|
}
|
|
556
551
|
) }),
|
|
557
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
552
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQWYZJL3Lcjs.PoweredBy, {})
|
|
558
553
|
] });
|
|
559
554
|
}
|
|
560
555
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
561
556
|
|
|
562
|
-
// src/WithdrawFlow.tsx
|
|
563
|
-
var _sdk = require('@rhinestone/sdk');
|
|
564
|
-
|
|
565
557
|
// src/core/safe.ts
|
|
566
558
|
|
|
567
559
|
|
|
@@ -862,7 +854,6 @@ function WithdrawFlow({
|
|
|
862
854
|
recipient: defaultRecipient,
|
|
863
855
|
amount: defaultAmount,
|
|
864
856
|
service,
|
|
865
|
-
rhinestoneApiKey,
|
|
866
857
|
signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
|
|
867
858
|
sessionChainIds,
|
|
868
859
|
forceRegister = false,
|
|
@@ -892,7 +883,6 @@ function WithdrawFlow({
|
|
|
892
883
|
setTargetChain(targetChainProp);
|
|
893
884
|
setTargetToken(targetTokenProp);
|
|
894
885
|
}, [targetChainProp, targetTokenProp]);
|
|
895
|
-
const targetChainObj = _react.useMemo.call(void 0, () => _chunkCEIWN53Ncjs.CHAIN_BY_ID[targetChain], [targetChain]);
|
|
896
886
|
const hasCustomSigner = Boolean(dappAddress && onSignTransaction);
|
|
897
887
|
const dappSwitchChain = _react.useMemo.call(void 0, () => {
|
|
898
888
|
if (!_optionalChain([dappWalletClient, 'optionalAccess', _6 => _6.switchChain])) return void 0;
|
|
@@ -933,14 +923,14 @@ function WithdrawFlow({
|
|
|
933
923
|
return {
|
|
934
924
|
ownerAddress: dappAddress,
|
|
935
925
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
936
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
926
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, sourceChain))),
|
|
937
927
|
switchChain: dappSwitchChain
|
|
938
928
|
};
|
|
939
929
|
}
|
|
940
930
|
return {
|
|
941
931
|
ownerAddress: dappWalletClient.account.address,
|
|
942
932
|
walletClient: dappWalletClient,
|
|
943
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
933
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, sourceChain))),
|
|
944
934
|
switchChain: dappSwitchChain
|
|
945
935
|
};
|
|
946
936
|
}
|
|
@@ -949,7 +939,7 @@ function WithdrawFlow({
|
|
|
949
939
|
return {
|
|
950
940
|
ownerAddress: dappWalletClient.account.address,
|
|
951
941
|
walletClient: dappWalletClient,
|
|
952
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
942
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, sourceChain))),
|
|
953
943
|
switchChain: dappSwitchChain
|
|
954
944
|
};
|
|
955
945
|
}
|
|
@@ -978,7 +968,7 @@ function WithdrawFlow({
|
|
|
978
968
|
const symbol = _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
979
969
|
const decimals = _chunkCEIWN53Ncjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
980
970
|
return {
|
|
981
|
-
id:
|
|
971
|
+
id: _chunkQWYZJL3Lcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
982
972
|
chainId: sourceChain,
|
|
983
973
|
token: sourceToken,
|
|
984
974
|
symbol,
|
|
@@ -1008,15 +998,15 @@ function WithdrawFlow({
|
|
|
1008
998
|
[onError]
|
|
1009
999
|
);
|
|
1010
1000
|
const resolveSessionOwner = _react.useCallback.call(void 0, async (eoaAddress) => {
|
|
1011
|
-
const localOwner =
|
|
1001
|
+
const localOwner = _chunkQWYZJL3Lcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
1012
1002
|
if (localOwner) {
|
|
1013
1003
|
return {
|
|
1014
|
-
account:
|
|
1004
|
+
account: _chunkQWYZJL3Lcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
1015
1005
|
address: localOwner.address
|
|
1016
1006
|
};
|
|
1017
1007
|
}
|
|
1018
|
-
const created =
|
|
1019
|
-
|
|
1008
|
+
const created = _chunkQWYZJL3Lcjs.createSessionOwnerKey.call(void 0, );
|
|
1009
|
+
_chunkQWYZJL3Lcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
1020
1010
|
return {
|
|
1021
1011
|
account: created.account,
|
|
1022
1012
|
address: created.address
|
|
@@ -1031,36 +1021,46 @@ function WithdrawFlow({
|
|
|
1031
1021
|
if (!onSignTransaction && !_optionalChain([signerContext, 'optionalAccess', _23 => _23.walletClient])) {
|
|
1032
1022
|
throw new Error("Wallet not connected");
|
|
1033
1023
|
}
|
|
1034
|
-
if (!targetChainObj) {
|
|
1035
|
-
throw new Error("Unsupported target chain");
|
|
1036
|
-
}
|
|
1037
1024
|
setIsSubmitting(true);
|
|
1038
1025
|
try {
|
|
1039
|
-
const signerAccount = _optionalChain([signerContext, 'optionalAccess', _24 => _24.walletClient]) ? _sdk.walletClientToAccount.call(void 0, signerContext.walletClient) : _chunk4Q6QCALPcjs.createViewOnlyAccount.call(void 0, ownerAddress2);
|
|
1040
1026
|
const sessionOwner = await resolveSessionOwner(ownerAddress2);
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
sessionOwner.
|
|
1044
|
-
rhinestoneApiKey
|
|
1027
|
+
const computed = await service.computeAddress(
|
|
1028
|
+
ownerAddress2,
|
|
1029
|
+
sessionOwner.address
|
|
1045
1030
|
);
|
|
1046
|
-
const smartAccount =
|
|
1031
|
+
const smartAccount = computed.smartAccount;
|
|
1047
1032
|
const checkResult = await service.checkAccount(smartAccount);
|
|
1048
|
-
const targetMatches = checkResult.targetChain === targetChain && _optionalChain([checkResult, 'access',
|
|
1033
|
+
const targetMatches = checkResult.targetChain === targetChain && _optionalChain([checkResult, 'access', _24 => _24.targetToken, 'optionalAccess', _25 => _25.toLowerCase, 'call', _26 => _26()]) === targetToken.toLowerCase();
|
|
1049
1034
|
if (!checkResult.isRegistered || forceRegister || !targetMatches) {
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
signerAddress,
|
|
1055
|
-
sessionOwner.account,
|
|
1035
|
+
const prepared = await service.prepareAccount({
|
|
1036
|
+
ownerAddress: ownerAddress2,
|
|
1037
|
+
sessionOwnerAddress: sessionOwner.address,
|
|
1038
|
+
targetChain,
|
|
1056
1039
|
targetToken,
|
|
1040
|
+
signerAddress,
|
|
1057
1041
|
sessionChainIds
|
|
1042
|
+
});
|
|
1043
|
+
const typedData = prepared.sessionDetailsUnsigned.data;
|
|
1044
|
+
if (!sessionOwner.account.signTypedData) {
|
|
1045
|
+
throw new Error(
|
|
1046
|
+
"Session owner account does not support signTypedData"
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
const signature = await sessionOwner.account.signTypedData({
|
|
1050
|
+
domain: typedData.domain,
|
|
1051
|
+
types: typedData.types,
|
|
1052
|
+
primaryType: typedData.primaryType,
|
|
1053
|
+
message: typedData.message
|
|
1054
|
+
});
|
|
1055
|
+
const sessionDetails = _chunkQWYZJL3Lcjs.buildSessionDetails.call(void 0,
|
|
1056
|
+
prepared.sessionDetailsUnsigned,
|
|
1057
|
+
signature
|
|
1058
1058
|
);
|
|
1059
1059
|
await service.registerAccount({
|
|
1060
1060
|
address: smartAccount,
|
|
1061
1061
|
accountParams: {
|
|
1062
|
-
factory:
|
|
1063
|
-
factoryData:
|
|
1062
|
+
factory: prepared.accountParams.factory,
|
|
1063
|
+
factoryData: prepared.accountParams.factoryData,
|
|
1064
1064
|
sessionDetails
|
|
1065
1065
|
},
|
|
1066
1066
|
eoaAddress: ownerAddress2,
|
|
@@ -1074,7 +1074,7 @@ function WithdrawFlow({
|
|
|
1074
1074
|
}
|
|
1075
1075
|
handleConnected(ownerAddress2, smartAccount);
|
|
1076
1076
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1077
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess',
|
|
1077
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _27 => _27.publicClient]), () => ( _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, sourceChain)));
|
|
1078
1078
|
let result;
|
|
1079
1079
|
if (onSignTransaction) {
|
|
1080
1080
|
const transferData = isSourceNative ? { to: smartAccount, value: amountUnits, data: "0x" } : {
|
|
@@ -1126,7 +1126,7 @@ function WithdrawFlow({
|
|
|
1126
1126
|
chainId: sourceChain
|
|
1127
1127
|
});
|
|
1128
1128
|
}
|
|
1129
|
-
_optionalChain([onWithdrawSubmitted, 'optionalCall',
|
|
1129
|
+
_optionalChain([onWithdrawSubmitted, 'optionalCall', _28 => _28({
|
|
1130
1130
|
txHash: result.txHash,
|
|
1131
1131
|
sourceChain,
|
|
1132
1132
|
amount: amountUnits.toString(),
|
|
@@ -1142,7 +1142,7 @@ function WithdrawFlow({
|
|
|
1142
1142
|
});
|
|
1143
1143
|
} catch (err) {
|
|
1144
1144
|
const raw = err instanceof Error ? err.message : "Withdraw failed";
|
|
1145
|
-
handleError(
|
|
1145
|
+
handleError(_chunkQWYZJL3Lcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1146
1146
|
throw err;
|
|
1147
1147
|
} finally {
|
|
1148
1148
|
setIsSubmitting(false);
|
|
@@ -1150,7 +1150,6 @@ function WithdrawFlow({
|
|
|
1150
1150
|
},
|
|
1151
1151
|
[
|
|
1152
1152
|
signerContext,
|
|
1153
|
-
targetChainObj,
|
|
1154
1153
|
resolveSessionOwner,
|
|
1155
1154
|
signerAddress,
|
|
1156
1155
|
sessionChainIds,
|
|
@@ -1158,7 +1157,6 @@ function WithdrawFlow({
|
|
|
1158
1157
|
targetChain,
|
|
1159
1158
|
targetToken,
|
|
1160
1159
|
service,
|
|
1161
|
-
rhinestoneApiKey,
|
|
1162
1160
|
handleConnected,
|
|
1163
1161
|
asset.decimals,
|
|
1164
1162
|
safeAddress,
|
|
@@ -1172,13 +1170,13 @@ function WithdrawFlow({
|
|
|
1172
1170
|
);
|
|
1173
1171
|
const handleWithdrawComplete = _react.useCallback.call(void 0,
|
|
1174
1172
|
(txHash, destinationTxHash) => {
|
|
1175
|
-
_optionalChain([onWithdrawComplete, 'optionalCall',
|
|
1173
|
+
_optionalChain([onWithdrawComplete, 'optionalCall', _29 => _29({ txHash, destinationTxHash })]);
|
|
1176
1174
|
},
|
|
1177
1175
|
[onWithdrawComplete]
|
|
1178
1176
|
);
|
|
1179
1177
|
const handleWithdrawFailed = _react.useCallback.call(void 0,
|
|
1180
1178
|
(txHash, error) => {
|
|
1181
|
-
_optionalChain([onWithdrawFailed, 'optionalCall',
|
|
1179
|
+
_optionalChain([onWithdrawFailed, 'optionalCall', _30 => _30({ txHash, error })]);
|
|
1182
1180
|
},
|
|
1183
1181
|
[onWithdrawFailed]
|
|
1184
1182
|
);
|
|
@@ -1236,7 +1234,7 @@ function WithdrawFlow({
|
|
|
1236
1234
|
}, [walletOptionsKey, selectedConnectAddressEffective]);
|
|
1237
1235
|
if (showConnectStep) {
|
|
1238
1236
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1239
|
-
|
|
1237
|
+
_chunkQWYZJL3Lcjs.ConnectStep,
|
|
1240
1238
|
{
|
|
1241
1239
|
walletOptions,
|
|
1242
1240
|
selectedAddress: selectedConnectAddressEffective,
|
|
@@ -1256,7 +1254,7 @@ function WithdrawFlow({
|
|
|
1256
1254
|
if (!signerContext) return null;
|
|
1257
1255
|
if (!onSignTransaction && !signerContext.walletClient) return null;
|
|
1258
1256
|
const ownerAddress = signerContext.ownerAddress;
|
|
1259
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1257
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, sourceChain)));
|
|
1260
1258
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
1261
1259
|
step.type === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1262
1260
|
WithdrawFormStep,
|
|
@@ -1281,7 +1279,7 @@ function WithdrawFlow({
|
|
|
1281
1279
|
}
|
|
1282
1280
|
),
|
|
1283
1281
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1284
|
-
|
|
1282
|
+
_chunkQWYZJL3Lcjs.ProcessingStep,
|
|
1285
1283
|
{
|
|
1286
1284
|
smartAccount: step.smartAccount,
|
|
1287
1285
|
txHash: step.txHash,
|
|
@@ -1307,7 +1305,7 @@ function WithdrawFlow({
|
|
|
1307
1305
|
// src/WithdrawModal.tsx
|
|
1308
1306
|
|
|
1309
1307
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1310
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1308
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-BA6ECON3.cjs"))).then((m) => ({
|
|
1311
1309
|
default: m.WithdrawModalReown
|
|
1312
1310
|
}))
|
|
1313
1311
|
);
|
|
@@ -1334,7 +1332,6 @@ function WithdrawModalInner({
|
|
|
1334
1332
|
onClose,
|
|
1335
1333
|
inline,
|
|
1336
1334
|
backendUrl = _chunkCEIWN53Ncjs.DEFAULT_BACKEND_URL,
|
|
1337
|
-
rhinestoneApiKey,
|
|
1338
1335
|
signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
|
|
1339
1336
|
sessionChainIds,
|
|
1340
1337
|
forceRegister = false,
|
|
@@ -1362,17 +1359,17 @@ function WithdrawModalInner({
|
|
|
1362
1359
|
const backHandlerRef = _react.useRef.call(void 0, void 0);
|
|
1363
1360
|
const targetChain = _chunkCEIWN53Ncjs.getChainId.call(void 0, targetChainProp);
|
|
1364
1361
|
const sourceChain = _chunkCEIWN53Ncjs.getChainId.call(void 0, sourceChainProp);
|
|
1365
|
-
const service = _react.useMemo.call(void 0, () =>
|
|
1362
|
+
const service = _react.useMemo.call(void 0, () => _chunkQWYZJL3Lcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
|
|
1366
1363
|
_react.useEffect.call(void 0, () => {
|
|
1367
1364
|
if (isOpen && modalRef.current) {
|
|
1368
|
-
|
|
1365
|
+
_chunkQWYZJL3Lcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1369
1366
|
}
|
|
1370
1367
|
}, [isOpen, theme]);
|
|
1371
1368
|
const hasCalledReady = _react.useRef.call(void 0, false);
|
|
1372
1369
|
_react.useEffect.call(void 0, () => {
|
|
1373
1370
|
if (isOpen && !hasCalledReady.current) {
|
|
1374
1371
|
hasCalledReady.current = true;
|
|
1375
|
-
_optionalChain([onReady, 'optionalCall',
|
|
1372
|
+
_optionalChain([onReady, 'optionalCall', _31 => _31()]);
|
|
1376
1373
|
}
|
|
1377
1374
|
}, [isOpen, onReady]);
|
|
1378
1375
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1391,17 +1388,17 @@ function WithdrawModalInner({
|
|
|
1391
1388
|
setTotalBalanceUsd(balance);
|
|
1392
1389
|
}, []);
|
|
1393
1390
|
const handleBack = _react.useCallback.call(void 0, () => {
|
|
1394
|
-
_optionalChain([backHandlerRef, 'access',
|
|
1391
|
+
_optionalChain([backHandlerRef, 'access', _32 => _32.current, 'optionalCall', _33 => _33()]);
|
|
1395
1392
|
}, []);
|
|
1396
|
-
const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
1397
|
-
const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
1398
|
-
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
1399
|
-
const balanceTitle = _optionalChain([uiConfig, 'optionalAccess',
|
|
1400
|
-
const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess',
|
|
1401
|
-
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess',
|
|
1393
|
+
const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _34 => _34.showLogo]), () => ( false));
|
|
1394
|
+
const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _35 => _35.showStepper]), () => ( false));
|
|
1395
|
+
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _36 => _36.showBackButton]), () => ( true));
|
|
1396
|
+
const balanceTitle = _optionalChain([uiConfig, 'optionalAccess', _37 => _37.balanceTitle]);
|
|
1397
|
+
const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _38 => _38.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
|
|
1398
|
+
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _39 => _39.title]), () => ( "Withdraw"));
|
|
1402
1399
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
|
|
1403
1400
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1404
|
-
|
|
1401
|
+
_chunkQWYZJL3Lcjs.Modal,
|
|
1405
1402
|
{
|
|
1406
1403
|
isOpen,
|
|
1407
1404
|
onClose,
|
|
@@ -1459,7 +1456,7 @@ function WithdrawModalInner({
|
|
|
1459
1456
|
] }),
|
|
1460
1457
|
balanceTitle && totalBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
|
|
1461
1458
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-label", children: balanceTitle }),
|
|
1462
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children:
|
|
1459
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunkQWYZJL3Lcjs.currencyFormatter.format(totalBalanceUsd) })
|
|
1463
1460
|
] })
|
|
1464
1461
|
] }),
|
|
1465
1462
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1503,7 +1500,6 @@ function WithdrawModalInner({
|
|
|
1503
1500
|
recipient,
|
|
1504
1501
|
amount: defaultAmount,
|
|
1505
1502
|
service,
|
|
1506
|
-
rhinestoneApiKey,
|
|
1507
1503
|
signerAddress,
|
|
1508
1504
|
sessionChainIds,
|
|
1509
1505
|
forceRegister,
|