@rhinestone/deposit-modal 0.1.56 → 0.1.58
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-A5YFTV2E.mjs → DepositModalReown-C3WPJW3E.mjs} +2 -2
- package/dist/{DepositModalReown-ZBBLHE6Z.cjs → DepositModalReown-KONUZXHJ.cjs} +3 -3
- package/dist/{WithdrawModalReown-GS2QN3GA.mjs → WithdrawModalReown-PFGUPZFN.mjs} +2 -2
- package/dist/{WithdrawModalReown-45SPXE5O.cjs → WithdrawModalReown-TUBSUJQ6.cjs} +3 -3
- package/dist/{chunk-IUKSOPEY.mjs → chunk-3ESBSOB7.mjs} +2 -2
- package/dist/{chunk-TVGZCNBW.cjs → chunk-3FEFGN7H.cjs} +33 -33
- package/dist/{chunk-LY3AZLPH.mjs → chunk-7TTEHQBD.mjs} +21 -13
- package/dist/{chunk-3UQQU6BE.cjs → chunk-TQ6IIGRS.cjs} +70 -62
- package/dist/{chunk-6KDGB2W2.mjs → chunk-VOGD6Y4U.mjs} +2 -2
- package/dist/{chunk-6BYN2IMR.cjs → chunk-Z2TKNB6C.cjs} +82 -82
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +3 -3
- package/dist/reown.cjs +4 -4
- package/dist/reown.mjs +3 -3
- package/dist/styles.css +6 -1
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VOGD6Y4U.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-MBURQ26S.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7TTEHQBD.mjs";
|
|
9
9
|
import "./chunk-CIXHTOO3.mjs";
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
@@ -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 _chunkZ2TKNB6Ccjs = require('./chunk-Z2TKNB6C.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkN2Y34LQOcjs = require('./chunk-N2Y34LQO.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-TQ6IIGRS.cjs');
|
|
9
9
|
require('./chunk-R6U6BHCV.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
|
+
_chunkZ2TKNB6Ccjs.DepositModalInner,
|
|
36
36
|
{
|
|
37
37
|
...props,
|
|
38
38
|
reownWallet: reownWithSolana,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3ESBSOB7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-MBURQ26S.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7TTEHQBD.mjs";
|
|
9
9
|
import "./chunk-CIXHTOO3.mjs";
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3FEFGN7Hcjs = require('./chunk-3FEFGN7H.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkN2Y34LQOcjs = require('./chunk-N2Y34LQO.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-TQ6IIGRS.cjs');
|
|
9
9
|
require('./chunk-R6U6BHCV.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
|
+
_chunk3FEFGN7Hcjs.WithdrawModalInner,
|
|
24
24
|
{
|
|
25
25
|
...props,
|
|
26
26
|
reownWallet: reown,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
loadSessionOwnerFromStorage,
|
|
21
21
|
saveSessionOwnerToStorage,
|
|
22
22
|
toEvmCaip2
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7TTEHQBD.mjs";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_BACKEND_URL,
|
|
26
26
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -1453,7 +1453,7 @@ function WithdrawFlow({
|
|
|
1453
1453
|
// src/WithdrawModal.tsx
|
|
1454
1454
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1455
1455
|
var ReownWithdrawInner = lazy(
|
|
1456
|
-
() => import("./WithdrawModalReown-
|
|
1456
|
+
() => import("./WithdrawModalReown-PFGUPZFN.mjs").then((m) => ({
|
|
1457
1457
|
default: m.WithdrawModalReown
|
|
1458
1458
|
}))
|
|
1459
1459
|
);
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkTQ6IIGRScjs = require('./chunk-TQ6IIGRS.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -141,7 +141,7 @@ function WithdrawFormStep({
|
|
|
141
141
|
setIsSwitching(true);
|
|
142
142
|
switchChain(asset.chainId).catch((err) => {
|
|
143
143
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
144
|
-
setError(
|
|
144
|
+
setError(_chunkTQ6IIGRScjs.formatUserError.call(void 0, raw));
|
|
145
145
|
}).finally(() => {
|
|
146
146
|
setIsSwitching(false);
|
|
147
147
|
});
|
|
@@ -161,7 +161,7 @@ function WithdrawFormStep({
|
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
try {
|
|
164
|
-
const bal =
|
|
164
|
+
const bal = _chunkTQ6IIGRScjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
|
|
165
165
|
address: asset.token,
|
|
166
166
|
abi: _viem.erc20Abi,
|
|
167
167
|
functionName: "balanceOf",
|
|
@@ -264,7 +264,7 @@ function WithdrawFormStep({
|
|
|
264
264
|
await onSubmit(recipient, amount);
|
|
265
265
|
} catch (err) {
|
|
266
266
|
const raw = err instanceof Error ? err.message : "Withdrawal failed";
|
|
267
|
-
setError(
|
|
267
|
+
setError(_chunkTQ6IIGRScjs.formatUserError.call(void 0, raw));
|
|
268
268
|
} finally {
|
|
269
269
|
setIsSubmitting(false);
|
|
270
270
|
}
|
|
@@ -272,11 +272,11 @@ function WithdrawFormStep({
|
|
|
272
272
|
if (isBalanceLoading) {
|
|
273
273
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
274
274
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-body rs-withdraw-loading", children: [
|
|
275
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
275
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTQ6IIGRScjs.Spinner, { className: "rs-spinner--lg" }),
|
|
276
276
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
|
|
277
277
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunkR6U6BHCVcjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
|
|
278
278
|
] }),
|
|
279
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
279
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTQ6IIGRScjs.PoweredBy, {})
|
|
280
280
|
] });
|
|
281
281
|
}
|
|
282
282
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
@@ -375,7 +375,7 @@ function WithdrawFormStep({
|
|
|
375
375
|
] })
|
|
376
376
|
] }),
|
|
377
377
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
|
|
378
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ?
|
|
378
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkTQ6IIGRScjs.currencyFormatter.format(amountUsd) : "$0.00" }),
|
|
379
379
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
|
|
380
380
|
"Balance: ",
|
|
381
381
|
formattedBalance,
|
|
@@ -569,7 +569,7 @@ function WithdrawFormStep({
|
|
|
569
569
|
] })
|
|
570
570
|
] }),
|
|
571
571
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
572
|
-
|
|
572
|
+
_chunkTQ6IIGRScjs.Button,
|
|
573
573
|
{
|
|
574
574
|
onClick: handleWithdraw,
|
|
575
575
|
fullWidth: true,
|
|
@@ -578,7 +578,7 @@ function WithdrawFormStep({
|
|
|
578
578
|
children: isBusy ? "Preparing..." : !recipient ? "Enter Recipient Address" : !amount ? "Enter Withdraw Amount" : "Withdraw"
|
|
579
579
|
}
|
|
580
580
|
) }),
|
|
581
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
581
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTQ6IIGRScjs.PoweredBy, {})
|
|
582
582
|
] });
|
|
583
583
|
}
|
|
584
584
|
WithdrawFormStep.displayName = "WithdrawFormStep";
|
|
@@ -910,13 +910,13 @@ function WithdrawFlow({
|
|
|
910
910
|
const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = _react.useState.call(void 0, false);
|
|
911
911
|
const logFlow = _react.useCallback.call(void 0,
|
|
912
912
|
(message, data) => {
|
|
913
|
-
|
|
913
|
+
_chunkTQ6IIGRScjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
|
|
914
914
|
},
|
|
915
915
|
[debug]
|
|
916
916
|
);
|
|
917
917
|
const logFlowError = _react.useCallback.call(void 0,
|
|
918
918
|
(message, error, data) => {
|
|
919
|
-
|
|
919
|
+
_chunkTQ6IIGRScjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
|
|
920
920
|
},
|
|
921
921
|
[debug]
|
|
922
922
|
);
|
|
@@ -975,14 +975,14 @@ function WithdrawFlow({
|
|
|
975
975
|
return {
|
|
976
976
|
ownerAddress: dappAddress,
|
|
977
977
|
walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
|
|
978
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
978
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkTQ6IIGRScjs.getPublicClient.call(void 0, sourceChain))),
|
|
979
979
|
switchChain: dappSwitchChain
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
982
|
return {
|
|
983
983
|
ownerAddress: dappWalletClient.account.address,
|
|
984
984
|
walletClient: dappWalletClient,
|
|
985
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
985
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkTQ6IIGRScjs.getPublicClient.call(void 0, sourceChain))),
|
|
986
986
|
switchChain: dappSwitchChain
|
|
987
987
|
};
|
|
988
988
|
}
|
|
@@ -993,7 +993,7 @@ function WithdrawFlow({
|
|
|
993
993
|
return {
|
|
994
994
|
ownerAddress: dappWalletClient.account.address,
|
|
995
995
|
walletClient: dappWalletClient,
|
|
996
|
-
publicClient: _nullishCoalesce(dappPublicClient, () => (
|
|
996
|
+
publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkTQ6IIGRScjs.getPublicClient.call(void 0, sourceChain))),
|
|
997
997
|
switchChain: dappSwitchChain
|
|
998
998
|
};
|
|
999
999
|
}
|
|
@@ -1023,7 +1023,7 @@ function WithdrawFlow({
|
|
|
1023
1023
|
const symbol = _chunkR6U6BHCVcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
|
|
1024
1024
|
const decimals = _chunkR6U6BHCVcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
|
|
1025
1025
|
return {
|
|
1026
|
-
id:
|
|
1026
|
+
id: _chunkTQ6IIGRScjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
|
|
1027
1027
|
chainId: sourceChain,
|
|
1028
1028
|
token: sourceToken,
|
|
1029
1029
|
symbol,
|
|
@@ -1073,15 +1073,15 @@ function WithdrawFlow({
|
|
|
1073
1073
|
[logFlowError, onError]
|
|
1074
1074
|
);
|
|
1075
1075
|
const resolveSessionOwner = _react.useCallback.call(void 0, async (eoaAddress) => {
|
|
1076
|
-
const localOwner =
|
|
1076
|
+
const localOwner = _chunkTQ6IIGRScjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
|
|
1077
1077
|
if (localOwner) {
|
|
1078
1078
|
return {
|
|
1079
|
-
account:
|
|
1079
|
+
account: _chunkTQ6IIGRScjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
|
|
1080
1080
|
address: localOwner.address
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
|
-
const created =
|
|
1084
|
-
|
|
1083
|
+
const created = _chunkTQ6IIGRScjs.createSessionOwnerKey.call(void 0, );
|
|
1084
|
+
_chunkTQ6IIGRScjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
|
|
1085
1085
|
return {
|
|
1086
1086
|
account: created.account,
|
|
1087
1087
|
address: created.address
|
|
@@ -1111,7 +1111,7 @@ function WithdrawFlow({
|
|
|
1111
1111
|
const setup = await service.setupAccount({
|
|
1112
1112
|
ownerAddress: ownerAddress2,
|
|
1113
1113
|
sessionOwnerAddress: sessionOwner.address,
|
|
1114
|
-
targetChain:
|
|
1114
|
+
targetChain: _chunkTQ6IIGRScjs.toEvmCaip2.call(void 0, targetChain),
|
|
1115
1115
|
targetToken,
|
|
1116
1116
|
signerAddress,
|
|
1117
1117
|
sessionChainIds,
|
|
@@ -1138,7 +1138,7 @@ function WithdrawFlow({
|
|
|
1138
1138
|
primaryType: typedData.primaryType,
|
|
1139
1139
|
message: typedData.message
|
|
1140
1140
|
});
|
|
1141
|
-
const sessionDetails =
|
|
1141
|
+
const sessionDetails = _chunkTQ6IIGRScjs.buildSessionDetails.call(void 0,
|
|
1142
1142
|
setup.sessionDetailsUnsigned,
|
|
1143
1143
|
signature
|
|
1144
1144
|
);
|
|
@@ -1152,7 +1152,7 @@ function WithdrawFlow({
|
|
|
1152
1152
|
eoaAddress: ownerAddress2,
|
|
1153
1153
|
sessionOwner: sessionOwner.address,
|
|
1154
1154
|
target: {
|
|
1155
|
-
chain:
|
|
1155
|
+
chain: _chunkTQ6IIGRScjs.toEvmCaip2.call(void 0, targetChain),
|
|
1156
1156
|
token: targetToken,
|
|
1157
1157
|
recipient
|
|
1158
1158
|
}
|
|
@@ -1161,7 +1161,7 @@ function WithdrawFlow({
|
|
|
1161
1161
|
}
|
|
1162
1162
|
handleConnected(ownerAddress2, smartAccount);
|
|
1163
1163
|
const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
|
|
1164
|
-
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _26 => _26.publicClient]), () => (
|
|
1164
|
+
const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _26 => _26.publicClient]), () => ( _chunkTQ6IIGRScjs.getPublicClient.call(void 0, sourceChain)));
|
|
1165
1165
|
let result;
|
|
1166
1166
|
if (onSignTransaction) {
|
|
1167
1167
|
const transferData = isSourceNative ? { to: smartAccount, value: amountUnits, data: "0x" } : {
|
|
@@ -1184,7 +1184,7 @@ function WithdrawFlow({
|
|
|
1184
1184
|
const { signature } = await onSignTransaction(request);
|
|
1185
1185
|
const relayResult = await service.relayWithdraw({
|
|
1186
1186
|
smartAccount,
|
|
1187
|
-
chainId:
|
|
1187
|
+
chainId: _chunkTQ6IIGRScjs.toEvmCaip2.call(void 0, sourceChain),
|
|
1188
1188
|
safeAddress,
|
|
1189
1189
|
safeTransaction: request.typedData.message,
|
|
1190
1190
|
signature
|
|
@@ -1242,7 +1242,7 @@ function WithdrawFlow({
|
|
|
1242
1242
|
targetChain,
|
|
1243
1243
|
targetToken
|
|
1244
1244
|
});
|
|
1245
|
-
handleError(
|
|
1245
|
+
handleError(_chunkTQ6IIGRScjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
|
|
1246
1246
|
throw err;
|
|
1247
1247
|
} finally {
|
|
1248
1248
|
setIsSubmitting(false);
|
|
@@ -1377,7 +1377,7 @@ function WithdrawFlow({
|
|
|
1377
1377
|
}, [walletOptions, ownerAddress, _optionalChain([reownWallet, 'optionalAccess', _41 => _41.icon])]);
|
|
1378
1378
|
if (showConnectStep) {
|
|
1379
1379
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1380
|
-
|
|
1380
|
+
_chunkTQ6IIGRScjs.ConnectStep,
|
|
1381
1381
|
{
|
|
1382
1382
|
walletOptions,
|
|
1383
1383
|
selectedWalletId: selectedWalletIdEffective,
|
|
@@ -1400,7 +1400,7 @@ function WithdrawFlow({
|
|
|
1400
1400
|
const resolvedOwnerAddress = signerContext.ownerAddress;
|
|
1401
1401
|
const resolvedConnectedAddress = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _42 => _42.walletClient, 'optionalAccess', _43 => _43.account, 'optionalAccess', _44 => _44.address]), () => ( _optionalChain([reownWallet, 'optionalAccess', _45 => _45.address]))), () => ( _optionalChain([dappWalletClient, 'optionalAccess', _46 => _46.account, 'optionalAccess', _47 => _47.address]))), () => ( resolvedOwnerAddress));
|
|
1402
1402
|
const resolvedDefaultRecipient = _nullishCoalesce(defaultRecipient, () => ( resolvedConnectedAddress));
|
|
1403
|
-
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => (
|
|
1403
|
+
const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkTQ6IIGRScjs.getPublicClient.call(void 0, sourceChain)));
|
|
1404
1404
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
1405
1405
|
step.type === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1406
1406
|
WithdrawFormStep,
|
|
@@ -1427,7 +1427,7 @@ function WithdrawFlow({
|
|
|
1427
1427
|
}
|
|
1428
1428
|
),
|
|
1429
1429
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1430
|
-
|
|
1430
|
+
_chunkTQ6IIGRScjs.ProcessingStep,
|
|
1431
1431
|
{
|
|
1432
1432
|
smartAccount: step.smartAccount,
|
|
1433
1433
|
txHash: step.txHash,
|
|
@@ -1453,7 +1453,7 @@ function WithdrawFlow({
|
|
|
1453
1453
|
// src/WithdrawModal.tsx
|
|
1454
1454
|
|
|
1455
1455
|
var ReownWithdrawInner = _react.lazy.call(void 0,
|
|
1456
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-
|
|
1456
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-TUBSUJQ6.cjs"))).then((m) => ({
|
|
1457
1457
|
default: m.WithdrawModalReown
|
|
1458
1458
|
}))
|
|
1459
1459
|
);
|
|
@@ -1511,12 +1511,12 @@ function WithdrawModalInner({
|
|
|
1511
1511
|
const targetChain = _chunkR6U6BHCVcjs.getChainId.call(void 0, targetChainProp);
|
|
1512
1512
|
const sourceChain = _chunkR6U6BHCVcjs.getChainId.call(void 0, sourceChainProp);
|
|
1513
1513
|
const service = _react.useMemo.call(void 0,
|
|
1514
|
-
() =>
|
|
1514
|
+
() => _chunkTQ6IIGRScjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
|
|
1515
1515
|
[backendUrl, debug]
|
|
1516
1516
|
);
|
|
1517
1517
|
_react.useEffect.call(void 0, () => {
|
|
1518
1518
|
if (isOpen && modalRef.current) {
|
|
1519
|
-
|
|
1519
|
+
_chunkTQ6IIGRScjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
1520
1520
|
}
|
|
1521
1521
|
}, [isOpen, theme]);
|
|
1522
1522
|
const hasCalledReady = _react.useRef.call(void 0, false);
|
|
@@ -1552,7 +1552,7 @@ function WithdrawModalInner({
|
|
|
1552
1552
|
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _56 => _56.title]), () => ( "Withdraw"));
|
|
1553
1553
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
|
|
1554
1554
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1555
|
-
|
|
1555
|
+
_chunkTQ6IIGRScjs.Modal,
|
|
1556
1556
|
{
|
|
1557
1557
|
isOpen,
|
|
1558
1558
|
onClose,
|
|
@@ -1611,7 +1611,7 @@ function WithdrawModalInner({
|
|
|
1611
1611
|
] }),
|
|
1612
1612
|
balance && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
|
|
1613
1613
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-label", children: balance.title }),
|
|
1614
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ?
|
|
1614
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkTQ6IIGRScjs.currencyFormatter.format(totalBalanceUsd) : null))) })
|
|
1615
1615
|
] })
|
|
1616
1616
|
] }),
|
|
1617
1617
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -817,42 +817,50 @@ var RADIUS_SCALE = {
|
|
|
817
817
|
lg: { sm: "10px", md: "14px", lg: "18px" },
|
|
818
818
|
full: { sm: "9999px", md: "9999px", lg: "9999px" }
|
|
819
819
|
};
|
|
820
|
+
function setVar(targets, prop, value) {
|
|
821
|
+
for (const el of targets) {
|
|
822
|
+
el.style.setProperty(prop, value);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
820
825
|
function applyTheme(element, theme) {
|
|
821
826
|
if (!element) return;
|
|
827
|
+
const parent = element.parentElement;
|
|
828
|
+
const targets = parent?.classList.contains("rs-modal-content") ? [element, parent] : [element];
|
|
822
829
|
if (theme?.mode) {
|
|
823
830
|
element.setAttribute("data-theme", theme.mode);
|
|
824
831
|
} else {
|
|
825
832
|
element.removeAttribute("data-theme");
|
|
826
833
|
}
|
|
827
834
|
if (theme?.fontColor) {
|
|
828
|
-
|
|
835
|
+
setVar(targets, "--rs-foreground", theme.fontColor);
|
|
829
836
|
}
|
|
830
837
|
if (theme?.iconColor) {
|
|
831
|
-
|
|
838
|
+
setVar(targets, "--rs-icon", theme.iconColor);
|
|
832
839
|
}
|
|
833
840
|
if (theme?.ctaColor) {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
841
|
+
setVar(targets, "--rs-primary", theme.ctaColor);
|
|
842
|
+
setVar(targets, "--rs-border-accent", theme.ctaColor);
|
|
843
|
+
setVar(
|
|
844
|
+
targets,
|
|
837
845
|
"--rs-primary-hover",
|
|
838
846
|
theme.ctaHoverColor ?? theme.ctaColor
|
|
839
847
|
);
|
|
840
848
|
} else if (theme?.ctaHoverColor) {
|
|
841
|
-
|
|
849
|
+
setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
|
|
842
850
|
}
|
|
843
851
|
if (theme?.borderColor) {
|
|
844
|
-
|
|
845
|
-
|
|
852
|
+
setVar(targets, "--rs-border", theme.borderColor);
|
|
853
|
+
setVar(targets, "--rs-border-surface", theme.borderColor);
|
|
846
854
|
}
|
|
847
855
|
if (theme?.backgroundColor) {
|
|
848
|
-
|
|
856
|
+
setVar(targets, "--rs-background", theme.backgroundColor);
|
|
849
857
|
}
|
|
850
858
|
if (theme?.radius) {
|
|
851
859
|
const scale = RADIUS_SCALE[theme.radius];
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
860
|
+
setVar(targets, "--rs-radius-sm", scale.sm);
|
|
861
|
+
setVar(targets, "--rs-radius-md", scale.md);
|
|
862
|
+
setVar(targets, "--rs-radius-lg", scale.lg);
|
|
863
|
+
setVar(targets, "--rs-radius", scale.md);
|
|
856
864
|
}
|
|
857
865
|
}
|
|
858
866
|
|