@rhinestone/deposit-modal 0.1.57 → 0.1.59
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-KONUZXHJ.cjs → DepositModalReown-DPCGEQT5.cjs} +2 -2
- package/dist/{DepositModalReown-C3WPJW3E.mjs → DepositModalReown-X3XPNZNZ.mjs} +1 -1
- package/dist/{chunk-VOGD6Y4U.mjs → chunk-E4YPPHZF.mjs} +11 -2
- package/dist/{chunk-Z2TKNB6C.cjs → chunk-M4QDXLIN.cjs} +97 -88
- package/dist/deposit.cjs +2 -2
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/reown.cjs +2 -2
- package/dist/reown.d.cts +1 -1
- package/dist/reown.d.ts +1 -1
- package/dist/reown.mjs +1 -1
- package/dist/styles.css +5 -4
- package/dist/{types-B7UuWCtD.d.ts → types-CB9x9ab7.d.ts} +8 -1
- package/dist/{types-CL7ec666.d.cts → types-Dp8Wj8Vt.d.cts} +8 -1
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
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 _chunkM4QDXLINcjs = require('./chunk-M4QDXLIN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -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
|
+
_chunkM4QDXLINcjs.DepositModalInner,
|
|
36
36
|
{
|
|
37
37
|
...props,
|
|
38
38
|
reownWallet: reownWithSolana,
|
|
@@ -83,6 +83,7 @@ function SetupStep({
|
|
|
83
83
|
signerAddress,
|
|
84
84
|
sessionChainIds,
|
|
85
85
|
recipient,
|
|
86
|
+
postBridgeActions,
|
|
86
87
|
forceRegister,
|
|
87
88
|
enableSolana = true,
|
|
88
89
|
service,
|
|
@@ -149,7 +150,8 @@ function SetupStep({
|
|
|
149
150
|
target: {
|
|
150
151
|
chain: toEvmCaip2(targetChain),
|
|
151
152
|
token: targetToken,
|
|
152
|
-
...recipient && { recipient }
|
|
153
|
+
...recipient && { recipient },
|
|
154
|
+
...postBridgeActions?.length && { postBridgeActions }
|
|
153
155
|
}
|
|
154
156
|
});
|
|
155
157
|
setState({ type: "ready", smartAccount });
|
|
@@ -171,6 +173,7 @@ function SetupStep({
|
|
|
171
173
|
signerAddress,
|
|
172
174
|
sessionChainIds,
|
|
173
175
|
recipient,
|
|
176
|
+
postBridgeActions,
|
|
174
177
|
forceRegister,
|
|
175
178
|
enableSolana,
|
|
176
179
|
service,
|
|
@@ -2559,6 +2562,7 @@ function DepositFlow({
|
|
|
2559
2562
|
sourceToken: defaultSourceToken,
|
|
2560
2563
|
amount: defaultAmount,
|
|
2561
2564
|
recipient,
|
|
2565
|
+
postBridgeActions,
|
|
2562
2566
|
signerAddress = DEFAULT_SIGNER_ADDRESS,
|
|
2563
2567
|
sessionChainIds,
|
|
2564
2568
|
forceRegister = false,
|
|
@@ -3296,6 +3300,7 @@ function DepositFlow({
|
|
|
3296
3300
|
signerAddress,
|
|
3297
3301
|
sessionChainIds,
|
|
3298
3302
|
recipient,
|
|
3303
|
+
postBridgeActions,
|
|
3299
3304
|
forceRegister,
|
|
3300
3305
|
enableSolana,
|
|
3301
3306
|
service,
|
|
@@ -3354,6 +3359,7 @@ function DepositFlow({
|
|
|
3354
3359
|
signerAddress,
|
|
3355
3360
|
sessionChainIds,
|
|
3356
3361
|
recipient,
|
|
3362
|
+
postBridgeActions,
|
|
3357
3363
|
forceRegister,
|
|
3358
3364
|
enableSolana,
|
|
3359
3365
|
service,
|
|
@@ -3484,6 +3490,7 @@ function DepositFlow({
|
|
|
3484
3490
|
signerAddress,
|
|
3485
3491
|
sessionChainIds,
|
|
3486
3492
|
recipient,
|
|
3493
|
+
postBridgeActions,
|
|
3487
3494
|
forceRegister,
|
|
3488
3495
|
enableSolana,
|
|
3489
3496
|
service,
|
|
@@ -3570,7 +3577,7 @@ function DepositFlow({
|
|
|
3570
3577
|
// src/DepositModal.tsx
|
|
3571
3578
|
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3572
3579
|
var ReownDepositInner = lazy(
|
|
3573
|
-
() => import("./DepositModalReown-
|
|
3580
|
+
() => import("./DepositModalReown-X3XPNZNZ.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
3574
3581
|
);
|
|
3575
3582
|
function DepositModal(props) {
|
|
3576
3583
|
const needsReown = !!props.reownAppId;
|
|
@@ -3618,6 +3625,7 @@ function DepositModalInner({
|
|
|
3618
3625
|
forceRegister = false,
|
|
3619
3626
|
waitForFinalTx = true,
|
|
3620
3627
|
enableSolana = true,
|
|
3628
|
+
postBridgeActions,
|
|
3621
3629
|
reownWallet,
|
|
3622
3630
|
onConnect,
|
|
3623
3631
|
onDisconnect,
|
|
@@ -3827,6 +3835,7 @@ function DepositModalInner({
|
|
|
3827
3835
|
sourceToken,
|
|
3828
3836
|
amount: defaultAmount,
|
|
3829
3837
|
recipient,
|
|
3838
|
+
postBridgeActions,
|
|
3830
3839
|
signerAddress,
|
|
3831
3840
|
sessionChainIds,
|
|
3832
3841
|
forceRegister,
|
|
@@ -83,6 +83,7 @@ function SetupStep({
|
|
|
83
83
|
signerAddress,
|
|
84
84
|
sessionChainIds,
|
|
85
85
|
recipient,
|
|
86
|
+
postBridgeActions,
|
|
86
87
|
forceRegister,
|
|
87
88
|
enableSolana = true,
|
|
88
89
|
service,
|
|
@@ -149,11 +150,12 @@ function SetupStep({
|
|
|
149
150
|
target: {
|
|
150
151
|
chain: _chunkTQ6IIGRScjs.toEvmCaip2.call(void 0, targetChain),
|
|
151
152
|
token: targetToken,
|
|
152
|
-
...recipient && { recipient }
|
|
153
|
+
...recipient && { recipient },
|
|
154
|
+
..._optionalChain([postBridgeActions, 'optionalAccess', _2 => _2.length]) && { postBridgeActions }
|
|
153
155
|
}
|
|
154
156
|
});
|
|
155
157
|
setState({ type: "ready", smartAccount });
|
|
156
|
-
_optionalChain([onConnected, 'optionalCall',
|
|
158
|
+
_optionalChain([onConnected, 'optionalCall', _3 => _3(address, smartAccount)]);
|
|
157
159
|
onSetupComplete(
|
|
158
160
|
smartAccount,
|
|
159
161
|
enableSolana ? registerResult.solanaDepositAddress : void 0
|
|
@@ -161,7 +163,7 @@ function SetupStep({
|
|
|
161
163
|
} catch (error) {
|
|
162
164
|
const message = error instanceof Error ? error.message : "Setup failed";
|
|
163
165
|
setState({ type: "error", message });
|
|
164
|
-
_optionalChain([onError, 'optionalCall',
|
|
166
|
+
_optionalChain([onError, 'optionalCall', _4 => _4(message, "SETUP_ERROR")]);
|
|
165
167
|
}
|
|
166
168
|
}, [
|
|
167
169
|
address,
|
|
@@ -171,6 +173,7 @@ function SetupStep({
|
|
|
171
173
|
signerAddress,
|
|
172
174
|
sessionChainIds,
|
|
173
175
|
recipient,
|
|
176
|
+
postBridgeActions,
|
|
174
177
|
forceRegister,
|
|
175
178
|
enableSolana,
|
|
176
179
|
service,
|
|
@@ -330,16 +333,16 @@ function AssetSelectStep({
|
|
|
330
333
|
(sum, asset) => sum + (_nullishCoalesce(asset.balanceUsd, () => ( 0))),
|
|
331
334
|
0
|
|
332
335
|
);
|
|
333
|
-
_optionalChain([onTotalBalanceComputed, 'optionalCall',
|
|
334
|
-
if (assets.length > 0) _optionalChain([onAssetsLoaded, 'optionalCall',
|
|
336
|
+
_optionalChain([onTotalBalanceComputed, 'optionalCall', _5 => _5(total)]);
|
|
337
|
+
if (assets.length > 0) _optionalChain([onAssetsLoaded, 'optionalCall', _6 => _6(assets)]);
|
|
335
338
|
}, [assets, onTotalBalanceComputed, onAssetsLoaded]);
|
|
336
339
|
const allowedChainSet = _react.useMemo.call(void 0,
|
|
337
|
-
() => _optionalChain([allowedRoutes, 'optionalAccess',
|
|
338
|
-
[_optionalChain([allowedRoutes, 'optionalAccess',
|
|
340
|
+
() => _optionalChain([allowedRoutes, 'optionalAccess', _7 => _7.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
|
|
341
|
+
[_optionalChain([allowedRoutes, 'optionalAccess', _8 => _8.sourceChains])]
|
|
339
342
|
);
|
|
340
343
|
const allowedTokenSet = _react.useMemo.call(void 0,
|
|
341
|
-
() => _optionalChain([allowedRoutes, 'optionalAccess',
|
|
342
|
-
[_optionalChain([allowedRoutes, 'optionalAccess',
|
|
344
|
+
() => _optionalChain([allowedRoutes, 'optionalAccess', _9 => _9.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
|
|
345
|
+
[_optionalChain([allowedRoutes, 'optionalAccess', _10 => _10.sourceTokens])]
|
|
343
346
|
);
|
|
344
347
|
const rows = _react.useMemo.call(void 0, () => {
|
|
345
348
|
return assets.filter((a) => {
|
|
@@ -497,7 +500,7 @@ function AssetSelectStep({
|
|
|
497
500
|
}
|
|
498
501
|
async function fetchNativeAssets(address, publicClient, existing) {
|
|
499
502
|
const existingIds = new Set(existing.map((asset) => asset.id));
|
|
500
|
-
const connectedChainId = _optionalChain([publicClient, 'access',
|
|
503
|
+
const connectedChainId = _optionalChain([publicClient, 'access', _11 => _11.chain, 'optionalAccess', _12 => _12.id]);
|
|
501
504
|
if (!connectedChainId) return [];
|
|
502
505
|
if (!_chunkR6U6BHCVcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
|
|
503
506
|
const id = _chunkTQ6IIGRScjs.getAssetId.call(void 0, {
|
|
@@ -559,7 +562,7 @@ function AmountStep({
|
|
|
559
562
|
const [isSwitching, setIsSwitching] = _react.useState.call(void 0, false);
|
|
560
563
|
const hasAttemptedSwitch = _react.useRef.call(void 0, false);
|
|
561
564
|
const chainMismatch = Boolean(
|
|
562
|
-
_optionalChain([walletClient, 'optionalAccess',
|
|
565
|
+
_optionalChain([walletClient, 'optionalAccess', _13 => _13.chain, 'optionalAccess', _14 => _14.id]) && walletClient.chain.id !== asset.chainId
|
|
563
566
|
);
|
|
564
567
|
const targetSymbol = _chunkR6U6BHCVcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
565
568
|
const isSourceStablecoin = _chunkR6U6BHCVcjs.isStablecoinSymbol.call(void 0, asset.symbol);
|
|
@@ -640,7 +643,7 @@ function AmountStep({
|
|
|
640
643
|
}
|
|
641
644
|
}, [balance, tokenPriceUsd, asset.decimals]);
|
|
642
645
|
_react.useEffect.call(void 0, () => {
|
|
643
|
-
_optionalChain([onBalanceUsdChange, 'optionalCall',
|
|
646
|
+
_optionalChain([onBalanceUsdChange, 'optionalCall', _15 => _15(_nullishCoalesce(balanceUsd, () => ( 0)))]);
|
|
644
647
|
}, [balanceUsd, onBalanceUsdChange]);
|
|
645
648
|
const formattedBalance = _react.useMemo.call(void 0, () => {
|
|
646
649
|
if (balance === null) return "...";
|
|
@@ -688,13 +691,13 @@ function AmountStep({
|
|
|
688
691
|
}
|
|
689
692
|
if (hasPricing) {
|
|
690
693
|
const usdValue = numericAmount;
|
|
691
|
-
if (_optionalChain([uiConfig, 'optionalAccess',
|
|
694
|
+
if (_optionalChain([uiConfig, 'optionalAccess', _16 => _16.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
|
|
692
695
|
setError(
|
|
693
696
|
`Maximum deposit is ${_chunkTQ6IIGRScjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
|
|
694
697
|
);
|
|
695
698
|
return;
|
|
696
699
|
}
|
|
697
|
-
if (_optionalChain([uiConfig, 'optionalAccess',
|
|
700
|
+
if (_optionalChain([uiConfig, 'optionalAccess', _17 => _17.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
|
|
698
701
|
setAmount(uiConfig.minDepositUsd.toString());
|
|
699
702
|
setError(null);
|
|
700
703
|
return;
|
|
@@ -880,7 +883,7 @@ function AmountStep({
|
|
|
880
883
|
}
|
|
881
884
|
)
|
|
882
885
|
] }),
|
|
883
|
-
_optionalChain([uiConfig, 'optionalAccess',
|
|
886
|
+
_optionalChain([uiConfig, 'optionalAccess', _18 => _18.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
|
|
884
887
|
_chunkTQ6IIGRScjs.currencyFormatter.format(uiConfig.minDepositUsd),
|
|
885
888
|
" minimum deposit"
|
|
886
889
|
] }),
|
|
@@ -912,7 +915,7 @@ function AmountStep({
|
|
|
912
915
|
onClick: handleContinue,
|
|
913
916
|
fullWidth: true,
|
|
914
917
|
disabled: !amount || chainMismatch,
|
|
915
|
-
children: _optionalChain([uiConfig, 'optionalAccess',
|
|
918
|
+
children: _optionalChain([uiConfig, 'optionalAccess', _19 => _19.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
|
|
916
919
|
}
|
|
917
920
|
) }),
|
|
918
921
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTQ6IIGRScjs.PoweredBy, {})
|
|
@@ -944,7 +947,7 @@ function ConfirmStep({
|
|
|
944
947
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
945
948
|
const [isSwitching, setIsSwitching] = _react.useState.call(void 0, false);
|
|
946
949
|
const hasAttemptedSwitch = _react.useRef.call(void 0, false);
|
|
947
|
-
const chainMismatch = _optionalChain([walletClient, 'optionalAccess',
|
|
950
|
+
const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _20 => _20.chain, 'optionalAccess', _21 => _21.id]) && walletClient.chain.id !== asset.chainId;
|
|
948
951
|
const sameRoute = targetChain === asset.chainId && targetToken.toLowerCase() === asset.token.toLowerCase();
|
|
949
952
|
const targetSymbol = sameRoute ? asset.symbol : _chunkR6U6BHCVcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
|
|
950
953
|
const formattedSendAmount = amount && !Number.isNaN(Number(amount)) ? Number(amount).toLocaleString("en-US", { maximumFractionDigits: 6 }) : "0";
|
|
@@ -1021,13 +1024,13 @@ function ConfirmStep({
|
|
|
1021
1024
|
functionName: "transfer",
|
|
1022
1025
|
args: [transferTo, amountUnits]
|
|
1023
1026
|
});
|
|
1024
|
-
_optionalChain([onDepositSubmitted, 'optionalCall',
|
|
1027
|
+
_optionalChain([onDepositSubmitted, 'optionalCall', _22 => _22(hash, asset.chainId, amountUnits.toString())]);
|
|
1025
1028
|
onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
|
|
1026
1029
|
} catch (err) {
|
|
1027
1030
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1028
1031
|
const message = _chunkTQ6IIGRScjs.formatUserError.call(void 0, raw);
|
|
1029
1032
|
setError(message);
|
|
1030
|
-
_optionalChain([onError, 'optionalCall',
|
|
1033
|
+
_optionalChain([onError, 'optionalCall', _23 => _23(message, "TRANSFER_ERROR")]);
|
|
1031
1034
|
} finally {
|
|
1032
1035
|
setIsSubmitting(false);
|
|
1033
1036
|
}
|
|
@@ -1288,7 +1291,7 @@ var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
|
|
|
1288
1291
|
var configuredSolanaRpcUrl = null;
|
|
1289
1292
|
var cachedConnections = /* @__PURE__ */ new Map();
|
|
1290
1293
|
function configureSolanaRpcUrl(rpcUrl) {
|
|
1291
|
-
const normalized = _optionalChain([rpcUrl, 'optionalAccess',
|
|
1294
|
+
const normalized = _optionalChain([rpcUrl, 'optionalAccess', _24 => _24.trim, 'call', _25 => _25()]);
|
|
1292
1295
|
configuredSolanaRpcUrl = normalized ? normalized : null;
|
|
1293
1296
|
cachedConnections.clear();
|
|
1294
1297
|
}
|
|
@@ -1423,7 +1426,7 @@ function resolveSolanaTokenMeta(token) {
|
|
|
1423
1426
|
return {};
|
|
1424
1427
|
}
|
|
1425
1428
|
function getDepositEventDetails(event) {
|
|
1426
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
1429
|
+
if (!_optionalChain([event, 'optionalAccess', _26 => _26.type]) || !isRecord(event.data)) return {};
|
|
1427
1430
|
if (event.type === "deposit-received") {
|
|
1428
1431
|
const chainId = asChainId(event.data.chain);
|
|
1429
1432
|
const token = asString(event.data.token);
|
|
@@ -1437,12 +1440,12 @@ function getDepositEventDetails(event) {
|
|
|
1437
1440
|
}
|
|
1438
1441
|
if (event.type === "bridge-started") {
|
|
1439
1442
|
const source = isRecord(event.data.source) ? event.data.source : void 0;
|
|
1440
|
-
const chainId = asChainId(_optionalChain([source, 'optionalAccess',
|
|
1441
|
-
const token = asString(_optionalChain([source, 'optionalAccess',
|
|
1443
|
+
const chainId = asChainId(_optionalChain([source, 'optionalAccess', _27 => _27.chain]));
|
|
1444
|
+
const token = asString(_optionalChain([source, 'optionalAccess', _28 => _28.asset]));
|
|
1442
1445
|
const solanaMeta = chainId === "solana" ? resolveSolanaTokenMeta(token) : {};
|
|
1443
1446
|
return {
|
|
1444
1447
|
chainId,
|
|
1445
|
-
amount: asAmount(_optionalChain([source, 'optionalAccess',
|
|
1448
|
+
amount: asAmount(_optionalChain([source, 'optionalAccess', _29 => _29.amount])),
|
|
1446
1449
|
token,
|
|
1447
1450
|
...solanaMeta
|
|
1448
1451
|
};
|
|
@@ -1459,12 +1462,12 @@ function DepositAddressStep({
|
|
|
1459
1462
|
}) {
|
|
1460
1463
|
const hasSolana = Boolean(solanaDepositAddress);
|
|
1461
1464
|
const allowedChainSet = _react.useMemo.call(void 0,
|
|
1462
|
-
() => _optionalChain([allowedRoutes, 'optionalAccess',
|
|
1463
|
-
[_optionalChain([allowedRoutes, 'optionalAccess',
|
|
1465
|
+
() => _optionalChain([allowedRoutes, 'optionalAccess', _30 => _30.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
|
|
1466
|
+
[_optionalChain([allowedRoutes, 'optionalAccess', _31 => _31.sourceChains])]
|
|
1464
1467
|
);
|
|
1465
1468
|
const allowedTokenSet = _react.useMemo.call(void 0,
|
|
1466
|
-
() => _optionalChain([allowedRoutes, 'optionalAccess',
|
|
1467
|
-
[_optionalChain([allowedRoutes, 'optionalAccess',
|
|
1469
|
+
() => _optionalChain([allowedRoutes, 'optionalAccess', _32 => _32.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
|
|
1470
|
+
[_optionalChain([allowedRoutes, 'optionalAccess', _33 => _33.sourceTokens])]
|
|
1468
1471
|
);
|
|
1469
1472
|
const evmChainIds = _react.useMemo.call(void 0, () => {
|
|
1470
1473
|
const all = _chunkR6U6BHCVcjs.getSupportedChainIds.call(void 0, );
|
|
@@ -1507,9 +1510,9 @@ function DepositAddressStep({
|
|
|
1507
1510
|
const matched = _nullishCoalesce(SOLANA_TOKENS.find((t) => t.symbol === sourceTokenSymbol), () => ( SOLANA_TOKENS[0]));
|
|
1508
1511
|
sourceSelectionRef.current = {
|
|
1509
1512
|
chainId: "solana",
|
|
1510
|
-
token: _optionalChain([matched, 'optionalAccess',
|
|
1511
|
-
sourceSymbol: _optionalChain([matched, 'optionalAccess',
|
|
1512
|
-
sourceDecimals: _optionalChain([matched, 'optionalAccess',
|
|
1513
|
+
token: _optionalChain([matched, 'optionalAccess', _34 => _34.mint]),
|
|
1514
|
+
sourceSymbol: _optionalChain([matched, 'optionalAccess', _35 => _35.symbol]),
|
|
1515
|
+
sourceDecimals: _optionalChain([matched, 'optionalAccess', _36 => _36.decimals])
|
|
1513
1516
|
};
|
|
1514
1517
|
return;
|
|
1515
1518
|
}
|
|
@@ -1525,8 +1528,8 @@ function DepositAddressStep({
|
|
|
1525
1528
|
function handlePointerDown(event) {
|
|
1526
1529
|
const target = event.target;
|
|
1527
1530
|
if (!target) return;
|
|
1528
|
-
const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access',
|
|
1529
|
-
const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access',
|
|
1531
|
+
const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _37 => _37.current, 'optionalAccess', _38 => _38.contains, 'call', _39 => _39(target)]);
|
|
1532
|
+
const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _40 => _40.current, 'optionalAccess', _41 => _41.contains, 'call', _42 => _42(target)]);
|
|
1530
1533
|
if (clickedChainDropdown || clickedTokenDropdown) return;
|
|
1531
1534
|
setChainDropdownOpen(false);
|
|
1532
1535
|
setTokenDropdownOpen(false);
|
|
@@ -1602,7 +1605,7 @@ function DepositAddressStep({
|
|
|
1602
1605
|
if (!cancelled) {
|
|
1603
1606
|
const msg = err instanceof Error ? err.message : "Failed to check status";
|
|
1604
1607
|
setPollingError(msg);
|
|
1605
|
-
_optionalChain([onError, 'optionalCall',
|
|
1608
|
+
_optionalChain([onError, 'optionalCall', _43 => _43(msg, "STATUS_POLL_ERROR")]);
|
|
1606
1609
|
}
|
|
1607
1610
|
}
|
|
1608
1611
|
if (!cancelled && !depositHandledRef.current) {
|
|
@@ -1883,7 +1886,7 @@ function SolanaTokenSelectStep({
|
|
|
1883
1886
|
setTokenBalances(results);
|
|
1884
1887
|
setLoading(false);
|
|
1885
1888
|
const totalUsd = results.reduce((sum, r) => sum + r.balanceUsd, 0);
|
|
1886
|
-
_optionalChain([onTotalBalanceComputed, 'optionalCall',
|
|
1889
|
+
_optionalChain([onTotalBalanceComputed, 'optionalCall', _44 => _44(totalUsd)]);
|
|
1887
1890
|
}
|
|
1888
1891
|
void loadBalances();
|
|
1889
1892
|
return () => {
|
|
@@ -2130,13 +2133,13 @@ function SolanaAmountStep({
|
|
|
2130
2133
|
const sourceAmount = isSourceStablecoin || !hasPricing ? numericAmount : numericAmount / tokenPriceUsd;
|
|
2131
2134
|
if (hasPricing) {
|
|
2132
2135
|
const usdValue = numericAmount;
|
|
2133
|
-
if (_optionalChain([uiConfig, 'optionalAccess',
|
|
2136
|
+
if (_optionalChain([uiConfig, 'optionalAccess', _45 => _45.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
|
|
2134
2137
|
setError(
|
|
2135
2138
|
`Maximum deposit is ${_chunkTQ6IIGRScjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
|
|
2136
2139
|
);
|
|
2137
2140
|
return;
|
|
2138
2141
|
}
|
|
2139
|
-
if (_optionalChain([uiConfig, 'optionalAccess',
|
|
2142
|
+
if (_optionalChain([uiConfig, 'optionalAccess', _46 => _46.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
|
|
2140
2143
|
setAmount(uiConfig.minDepositUsd.toString());
|
|
2141
2144
|
setError(null);
|
|
2142
2145
|
return;
|
|
@@ -2237,7 +2240,7 @@ function SolanaAmountStep({
|
|
|
2237
2240
|
}
|
|
2238
2241
|
)
|
|
2239
2242
|
] }),
|
|
2240
|
-
_optionalChain([uiConfig, 'optionalAccess',
|
|
2243
|
+
_optionalChain([uiConfig, 'optionalAccess', _47 => _47.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
|
|
2241
2244
|
_chunkTQ6IIGRScjs.currencyFormatter.format(uiConfig.minDepositUsd),
|
|
2242
2245
|
" minimum deposit"
|
|
2243
2246
|
] }),
|
|
@@ -2269,7 +2272,7 @@ function SolanaAmountStep({
|
|
|
2269
2272
|
onClick: handleContinue,
|
|
2270
2273
|
fullWidth: true,
|
|
2271
2274
|
disabled: !amount,
|
|
2272
|
-
children: _optionalChain([uiConfig, 'optionalAccess',
|
|
2275
|
+
children: _optionalChain([uiConfig, 'optionalAccess', _48 => _48.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
|
|
2273
2276
|
}
|
|
2274
2277
|
) }),
|
|
2275
2278
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTQ6IIGRScjs.PoweredBy, {})
|
|
@@ -2376,7 +2379,7 @@ function SolanaConfirmStep({
|
|
|
2376
2379
|
_chunkTQ6IIGRScjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
2377
2380
|
token: token.symbol,
|
|
2378
2381
|
instructionCount: transaction.instructions.length,
|
|
2379
|
-
feePayer: _optionalChain([transaction, 'access',
|
|
2382
|
+
feePayer: _optionalChain([transaction, 'access', _49 => _49.feePayer, 'optionalAccess', _50 => _50.toBase58, 'call', _51 => _51()]),
|
|
2380
2383
|
recentBlockhash: transaction.recentBlockhash
|
|
2381
2384
|
});
|
|
2382
2385
|
const txHash = await sendSolanaTransaction(
|
|
@@ -2398,7 +2401,7 @@ function SolanaConfirmStep({
|
|
|
2398
2401
|
sourceAmount
|
|
2399
2402
|
});
|
|
2400
2403
|
setError(message);
|
|
2401
|
-
_optionalChain([onError, 'optionalCall',
|
|
2404
|
+
_optionalChain([onError, 'optionalCall', _52 => _52(message, "SOLANA_TRANSFER_ERROR")]);
|
|
2402
2405
|
} finally {
|
|
2403
2406
|
setIsSubmitting(false);
|
|
2404
2407
|
}
|
|
@@ -2559,6 +2562,7 @@ function DepositFlow({
|
|
|
2559
2562
|
sourceToken: defaultSourceToken,
|
|
2560
2563
|
amount: defaultAmount,
|
|
2561
2564
|
recipient,
|
|
2565
|
+
postBridgeActions,
|
|
2562
2566
|
signerAddress = _chunkR6U6BHCVcjs.DEFAULT_SIGNER_ADDRESS,
|
|
2563
2567
|
sessionChainIds,
|
|
2564
2568
|
forceRegister = false,
|
|
@@ -2582,7 +2586,7 @@ function DepositFlow({
|
|
|
2582
2586
|
debug
|
|
2583
2587
|
}) {
|
|
2584
2588
|
const hasInitialReownSession = Boolean(
|
|
2585
|
-
enableSolana ? _optionalChain([reownWallet, 'optionalAccess',
|
|
2589
|
+
enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _53 => _53.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _54 => _54.address]) : _optionalChain([reownWallet, 'optionalAccess', _55 => _55.address])
|
|
2586
2590
|
);
|
|
2587
2591
|
const hasInitialWalletHydrationPending = Boolean(
|
|
2588
2592
|
dappAddress && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasInitialReownSession && !reownWallet.isReady)
|
|
@@ -2627,12 +2631,12 @@ function DepositFlow({
|
|
|
2627
2631
|
return null;
|
|
2628
2632
|
}, []);
|
|
2629
2633
|
const dappSwitchChain = _react.useMemo.call(void 0, () => {
|
|
2630
|
-
if (!_optionalChain([dappWalletClient, 'optionalAccess',
|
|
2634
|
+
if (!_optionalChain([dappWalletClient, 'optionalAccess', _56 => _56.switchChain])) return void 0;
|
|
2631
2635
|
return async (chainId) => {
|
|
2632
|
-
await _optionalChain([dappWalletClient, 'access',
|
|
2636
|
+
await _optionalChain([dappWalletClient, 'access', _57 => _57.switchChain, 'optionalCall', _58 => _58({ id: chainId })]);
|
|
2633
2637
|
};
|
|
2634
2638
|
}, [dappWalletClient]);
|
|
2635
|
-
const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess',
|
|
2639
|
+
const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _59 => _59.account, 'optionalAccess', _60 => _60.address]), () => ( null));
|
|
2636
2640
|
const walletOptions = _react.useMemo.call(void 0, () => {
|
|
2637
2641
|
const options = [];
|
|
2638
2642
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -2646,7 +2650,7 @@ function DepositFlow({
|
|
|
2646
2650
|
});
|
|
2647
2651
|
seen.add(id);
|
|
2648
2652
|
}
|
|
2649
|
-
if (enableSolana && _optionalChain([reownWallet, 'optionalAccess',
|
|
2653
|
+
if (enableSolana && _optionalChain([reownWallet, 'optionalAccess', _61 => _61.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
|
|
2650
2654
|
const id = _nullishCoalesce(reownWallet.caipAddress, () => ( `solana:${reownWallet.solanaAddress}`));
|
|
2651
2655
|
if (!seen.has(id)) {
|
|
2652
2656
|
options.push({
|
|
@@ -2658,7 +2662,7 @@ function DepositFlow({
|
|
|
2658
2662
|
});
|
|
2659
2663
|
seen.add(id);
|
|
2660
2664
|
}
|
|
2661
|
-
} else if (_optionalChain([reownWallet, 'optionalAccess',
|
|
2665
|
+
} else if (_optionalChain([reownWallet, 'optionalAccess', _62 => _62.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
|
|
2662
2666
|
const id = `evm:${reownWallet.address.toLowerCase()}`;
|
|
2663
2667
|
if (!seen.has(id)) {
|
|
2664
2668
|
options.push({
|
|
@@ -2675,20 +2679,20 @@ function DepositFlow({
|
|
|
2675
2679
|
}, [
|
|
2676
2680
|
connectedWalletAddress,
|
|
2677
2681
|
dappAddress,
|
|
2678
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
2679
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
2680
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
2681
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
2682
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
2682
|
+
_optionalChain([reownWallet, 'optionalAccess', _63 => _63.address]),
|
|
2683
|
+
_optionalChain([reownWallet, 'optionalAccess', _64 => _64.isConnected]),
|
|
2684
|
+
_optionalChain([reownWallet, 'optionalAccess', _65 => _65.walletClient]),
|
|
2685
|
+
_optionalChain([reownWallet, 'optionalAccess', _66 => _66.publicClient]),
|
|
2686
|
+
_optionalChain([reownWallet, 'optionalAccess', _67 => _67.icon]),
|
|
2683
2687
|
enableSolana,
|
|
2684
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
2685
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
2686
|
-
_optionalChain([reownWallet, 'optionalAccess',
|
|
2688
|
+
_optionalChain([reownWallet, 'optionalAccess', _68 => _68.isSolana]),
|
|
2689
|
+
_optionalChain([reownWallet, 'optionalAccess', _69 => _69.solanaAddress]),
|
|
2690
|
+
_optionalChain([reownWallet, 'optionalAccess', _70 => _70.caipAddress])
|
|
2687
2691
|
]);
|
|
2688
|
-
const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess',
|
|
2692
|
+
const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _71 => _71.account]) && dappAddress && !reownWallet;
|
|
2689
2693
|
const hasWalletOptions = walletOptions.length > 0;
|
|
2690
2694
|
const hasReownSession = Boolean(
|
|
2691
|
-
enableSolana ? _optionalChain([reownWallet, 'optionalAccess',
|
|
2695
|
+
enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _72 => _72.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _73 => _73.address]) : _optionalChain([reownWallet, 'optionalAccess', _74 => _74.address])
|
|
2692
2696
|
);
|
|
2693
2697
|
const isWalletHydrationPending = Boolean(
|
|
2694
2698
|
dappAddress && !hasWalletOptions && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady)
|
|
@@ -2733,7 +2737,7 @@ function DepositFlow({
|
|
|
2733
2737
|
};
|
|
2734
2738
|
}
|
|
2735
2739
|
if (canAutoLock) {
|
|
2736
|
-
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess',
|
|
2740
|
+
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _75 => _75.chain, 'optionalAccess', _76 => _76.id]), () => ( targetChain));
|
|
2737
2741
|
return {
|
|
2738
2742
|
ownerAddress: dappWalletClient.account.address,
|
|
2739
2743
|
walletClient: dappWalletClient,
|
|
@@ -2755,8 +2759,8 @@ function DepositFlow({
|
|
|
2755
2759
|
switchChain: void 0
|
|
2756
2760
|
};
|
|
2757
2761
|
}
|
|
2758
|
-
if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess',
|
|
2759
|
-
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess',
|
|
2762
|
+
if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _77 => _77.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
|
|
2763
|
+
const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _78 => _78.chain, 'optionalAccess', _79 => _79.id]), () => ( targetChain));
|
|
2760
2764
|
return {
|
|
2761
2765
|
ownerAddress: dappWalletClient.account.address,
|
|
2762
2766
|
walletClient: dappWalletClient,
|
|
@@ -2764,7 +2768,7 @@ function DepositFlow({
|
|
|
2764
2768
|
switchChain: dappSwitchChain
|
|
2765
2769
|
};
|
|
2766
2770
|
}
|
|
2767
|
-
if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess',
|
|
2771
|
+
if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _80 => _80.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
|
|
2768
2772
|
return {
|
|
2769
2773
|
ownerAddress: reownWallet.address,
|
|
2770
2774
|
walletClient: reownWallet.walletClient,
|
|
@@ -2828,7 +2832,7 @@ function DepositFlow({
|
|
|
2828
2832
|
walletSignerContext,
|
|
2829
2833
|
walletSelectionKey
|
|
2830
2834
|
]);
|
|
2831
|
-
const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess',
|
|
2835
|
+
const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _81 => _81.ownerAddress]))), () => ( null));
|
|
2832
2836
|
const lastTargetRef = _react.useRef.call(void 0, null);
|
|
2833
2837
|
_react.useEffect.call(void 0, () => {
|
|
2834
2838
|
const prev = lastTargetRef.current;
|
|
@@ -2905,7 +2909,7 @@ function DepositFlow({
|
|
|
2905
2909
|
const stepIndex = step.type === "setup" ? 0 : step.type === "deposit-address" ? 1 : step.type === "select-asset" ? 1 : step.type === "solana-token-select" ? 1 : step.type === "solana-amount" ? 2 : step.type === "amount" ? 2 : step.type === "confirm" ? 3 : step.type === "solana-confirm" ? 3 : 4;
|
|
2906
2910
|
const currentBackHandler = step.type === "deposit-address" ? handleBackFromDepositAddress : step.type === "select-asset" && signerContext && !canAutoLock ? handleBackFromSelectAsset : step.type === "solana-token-select" ? handleBackFromSolanaTokenSelect : step.type === "solana-amount" ? handleBackFromSolanaAmount : step.type === "solana-confirm" ? handleBackFromSolanaConfirm : step.type === "amount" ? handleBackFromAmount : step.type === "confirm" ? handleBackFromConfirm : void 0;
|
|
2907
2911
|
_react.useEffect.call(void 0, () => {
|
|
2908
|
-
_optionalChain([onStepChange, 'optionalCall',
|
|
2912
|
+
_optionalChain([onStepChange, 'optionalCall', _82 => _82(stepIndex, currentBackHandler)]);
|
|
2909
2913
|
}, [stepIndex, currentBackHandler, onStepChange]);
|
|
2910
2914
|
_react.useEffect.call(void 0, () => {
|
|
2911
2915
|
logFlow("state:changed", {
|
|
@@ -2924,7 +2928,7 @@ function DepositFlow({
|
|
|
2924
2928
|
targetToken
|
|
2925
2929
|
]);
|
|
2926
2930
|
_react.useEffect.call(void 0, () => {
|
|
2927
|
-
_optionalChain([onTotalBalanceChange, 'optionalCall',
|
|
2931
|
+
_optionalChain([onTotalBalanceChange, 'optionalCall', _83 => _83(totalBalanceUsd)]);
|
|
2928
2932
|
}, [totalBalanceUsd, onTotalBalanceChange]);
|
|
2929
2933
|
const isDepositAddressMode = flowMode === "deposit-address";
|
|
2930
2934
|
const isSolanaWalletMode = flowMode === "solana-wallet";
|
|
@@ -2966,7 +2970,7 @@ function DepositFlow({
|
|
|
2966
2970
|
solanaDepositAddress
|
|
2967
2971
|
});
|
|
2968
2972
|
} else {
|
|
2969
|
-
_optionalChain([onError, 'optionalCall',
|
|
2973
|
+
_optionalChain([onError, 'optionalCall', _84 => _84({
|
|
2970
2974
|
message: "Solana deposit address not available. Please try again.",
|
|
2971
2975
|
code: "SOLANA_SETUP_FAILED"
|
|
2972
2976
|
})]);
|
|
@@ -3001,7 +3005,7 @@ function DepositFlow({
|
|
|
3001
3005
|
directTransfer
|
|
3002
3006
|
};
|
|
3003
3007
|
});
|
|
3004
|
-
_optionalChain([onDepositSubmitted, 'optionalCall',
|
|
3008
|
+
_optionalChain([onDepositSubmitted, 'optionalCall', _85 => _85({ txHash, sourceChain: chainId, amount })]);
|
|
3005
3009
|
},
|
|
3006
3010
|
[onDepositSubmitted, targetChain, targetToken]
|
|
3007
3011
|
);
|
|
@@ -3073,7 +3077,7 @@ function DepositFlow({
|
|
|
3073
3077
|
sourceDecimals: prev.token.decimals
|
|
3074
3078
|
};
|
|
3075
3079
|
});
|
|
3076
|
-
_optionalChain([onDepositSubmitted, 'optionalCall',
|
|
3080
|
+
_optionalChain([onDepositSubmitted, 'optionalCall', _86 => _86({
|
|
3077
3081
|
txHash,
|
|
3078
3082
|
sourceChain: "solana",
|
|
3079
3083
|
amount: amountUnits
|
|
@@ -3083,7 +3087,7 @@ function DepositFlow({
|
|
|
3083
3087
|
);
|
|
3084
3088
|
const handleConnected = _react.useCallback.call(void 0,
|
|
3085
3089
|
(addr, smartAccount) => {
|
|
3086
|
-
_optionalChain([onConnected, 'optionalCall',
|
|
3090
|
+
_optionalChain([onConnected, 'optionalCall', _87 => _87({ address: addr, smartAccount })]);
|
|
3087
3091
|
},
|
|
3088
3092
|
[onConnected]
|
|
3089
3093
|
);
|
|
@@ -3146,28 +3150,28 @@ function DepositFlow({
|
|
|
3146
3150
|
);
|
|
3147
3151
|
const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
|
|
3148
3152
|
(txHash, sourceChain, amount) => {
|
|
3149
|
-
_optionalChain([onDepositSubmitted, 'optionalCall',
|
|
3153
|
+
_optionalChain([onDepositSubmitted, 'optionalCall', _88 => _88({ txHash, sourceChain, amount })]);
|
|
3150
3154
|
},
|
|
3151
3155
|
[onDepositSubmitted]
|
|
3152
3156
|
);
|
|
3153
3157
|
const handleDepositComplete = _react.useCallback.call(void 0,
|
|
3154
3158
|
(txHash, destinationTxHash, context) => {
|
|
3155
3159
|
logFlow("deposit:complete", { txHash, destinationTxHash, ...context });
|
|
3156
|
-
_optionalChain([onDepositComplete, 'optionalCall',
|
|
3160
|
+
_optionalChain([onDepositComplete, 'optionalCall', _89 => _89({ txHash, destinationTxHash, ...context })]);
|
|
3157
3161
|
},
|
|
3158
3162
|
[logFlow, onDepositComplete]
|
|
3159
3163
|
);
|
|
3160
3164
|
const handleDepositFailed = _react.useCallback.call(void 0,
|
|
3161
3165
|
(txHash, error) => {
|
|
3162
3166
|
logFlowError("deposit:failed", error, { txHash });
|
|
3163
|
-
_optionalChain([onDepositFailed, 'optionalCall',
|
|
3167
|
+
_optionalChain([onDepositFailed, 'optionalCall', _90 => _90({ txHash, error })]);
|
|
3164
3168
|
},
|
|
3165
3169
|
[logFlowError, onDepositFailed]
|
|
3166
3170
|
);
|
|
3167
3171
|
const handleError = _react.useCallback.call(void 0,
|
|
3168
3172
|
(message, code) => {
|
|
3169
3173
|
logFlowError("flow:error", message, { code });
|
|
3170
|
-
_optionalChain([onError, 'optionalCall',
|
|
3174
|
+
_optionalChain([onError, 'optionalCall', _91 => _91({ message, code })]);
|
|
3171
3175
|
},
|
|
3172
3176
|
[logFlowError, onError]
|
|
3173
3177
|
);
|
|
@@ -3224,7 +3228,7 @@ function DepositFlow({
|
|
|
3224
3228
|
if (walletId) {
|
|
3225
3229
|
const selectedOption = walletOptions.find((o) => o.id === walletId);
|
|
3226
3230
|
setSelectedWalletId(walletId);
|
|
3227
|
-
if (enableSolana && _optionalChain([selectedOption, 'optionalAccess',
|
|
3231
|
+
if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _92 => _92.kind]) === "solana") {
|
|
3228
3232
|
handleSelectSolanaWallet();
|
|
3229
3233
|
} else {
|
|
3230
3234
|
handleSelectProvider();
|
|
@@ -3273,7 +3277,7 @@ function DepositFlow({
|
|
|
3273
3277
|
const selectedOption = walletOptions.find(
|
|
3274
3278
|
(o) => o.id === selectedWalletIdEffective
|
|
3275
3279
|
);
|
|
3276
|
-
if (enableSolana && _optionalChain([selectedOption, 'optionalAccess',
|
|
3280
|
+
if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _93 => _93.kind]) === "solana") {
|
|
3277
3281
|
handleSelectSolanaWallet();
|
|
3278
3282
|
} else {
|
|
3279
3283
|
handleSelectProvider();
|
|
@@ -3296,6 +3300,7 @@ function DepositFlow({
|
|
|
3296
3300
|
signerAddress,
|
|
3297
3301
|
sessionChainIds,
|
|
3298
3302
|
recipient,
|
|
3303
|
+
postBridgeActions,
|
|
3299
3304
|
forceRegister,
|
|
3300
3305
|
enableSolana,
|
|
3301
3306
|
service,
|
|
@@ -3342,8 +3347,8 @@ function DepositFlow({
|
|
|
3342
3347
|
}
|
|
3343
3348
|
if (isSolanaWalletMode) {
|
|
3344
3349
|
if (!sessionKeyAddress) return null;
|
|
3345
|
-
const solanaAddr = _optionalChain([reownWallet, 'optionalAccess',
|
|
3346
|
-
const solanaProvider = _optionalChain([reownWallet, 'optionalAccess',
|
|
3350
|
+
const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _94 => _94.solanaAddress]);
|
|
3351
|
+
const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _95 => _95.solanaProvider]);
|
|
3347
3352
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
3348
3353
|
step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3349
3354
|
SetupStep,
|
|
@@ -3354,6 +3359,7 @@ function DepositFlow({
|
|
|
3354
3359
|
signerAddress,
|
|
3355
3360
|
sessionChainIds,
|
|
3356
3361
|
recipient,
|
|
3362
|
+
postBridgeActions,
|
|
3357
3363
|
forceRegister,
|
|
3358
3364
|
enableSolana,
|
|
3359
3365
|
service,
|
|
@@ -3462,13 +3468,13 @@ function DepositFlow({
|
|
|
3462
3468
|
)
|
|
3463
3469
|
] });
|
|
3464
3470
|
}
|
|
3465
|
-
if (!_optionalChain([signerContext, 'optionalAccess',
|
|
3471
|
+
if (!_optionalChain([signerContext, 'optionalAccess', _96 => _96.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _97 => _97.publicClient])) {
|
|
3466
3472
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-state", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: "Connecting wallet..." }) }) }) }) });
|
|
3467
3473
|
}
|
|
3468
3474
|
const ownerAddress = signerContext.ownerAddress;
|
|
3469
|
-
const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access',
|
|
3475
|
+
const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _98 => _98.walletClient, 'optionalAccess', _99 => _99.chain, 'optionalAccess', _100 => _100.id]), () => ( _optionalChain([signerContext, 'access', _101 => _101.publicClient, 'access', _102 => _102.chain, 'optionalAccess', _103 => _103.id]))), () => ( targetChain));
|
|
3470
3476
|
const getReadClientForChain = (chainId) => {
|
|
3471
|
-
if (_optionalChain([signerContext, 'access',
|
|
3477
|
+
if (_optionalChain([signerContext, 'access', _104 => _104.publicClient, 'access', _105 => _105.chain, 'optionalAccess', _106 => _106.id]) === chainId) {
|
|
3472
3478
|
return signerContext.publicClient;
|
|
3473
3479
|
}
|
|
3474
3480
|
return _chunkTQ6IIGRScjs.getPublicClient.call(void 0, chainId);
|
|
@@ -3484,6 +3490,7 @@ function DepositFlow({
|
|
|
3484
3490
|
signerAddress,
|
|
3485
3491
|
sessionChainIds,
|
|
3486
3492
|
recipient,
|
|
3493
|
+
postBridgeActions,
|
|
3487
3494
|
forceRegister,
|
|
3488
3495
|
enableSolana,
|
|
3489
3496
|
service,
|
|
@@ -3570,7 +3577,7 @@ function DepositFlow({
|
|
|
3570
3577
|
// src/DepositModal.tsx
|
|
3571
3578
|
|
|
3572
3579
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
3573
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
3580
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-DPCGEQT5.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
3574
3581
|
);
|
|
3575
3582
|
function DepositModal(props) {
|
|
3576
3583
|
const needsReown = !!props.reownAppId;
|
|
@@ -3618,6 +3625,7 @@ function DepositModalInner({
|
|
|
3618
3625
|
forceRegister = false,
|
|
3619
3626
|
waitForFinalTx = true,
|
|
3620
3627
|
enableSolana = true,
|
|
3628
|
+
postBridgeActions,
|
|
3621
3629
|
reownWallet,
|
|
3622
3630
|
onConnect,
|
|
3623
3631
|
onDisconnect,
|
|
@@ -3661,7 +3669,7 @@ function DepositModalInner({
|
|
|
3661
3669
|
_react.useEffect.call(void 0, () => {
|
|
3662
3670
|
if (isOpen && !hasCalledReady.current) {
|
|
3663
3671
|
hasCalledReady.current = true;
|
|
3664
|
-
_optionalChain([onReady, 'optionalCall',
|
|
3672
|
+
_optionalChain([onReady, 'optionalCall', _107 => _107()]);
|
|
3665
3673
|
}
|
|
3666
3674
|
}, [isOpen, onReady]);
|
|
3667
3675
|
_react.useEffect.call(void 0, () => {
|
|
@@ -3680,14 +3688,14 @@ function DepositModalInner({
|
|
|
3680
3688
|
setTotalBalanceUsd(balance2);
|
|
3681
3689
|
}, []);
|
|
3682
3690
|
const handleBack = _react.useCallback.call(void 0, () => {
|
|
3683
|
-
_optionalChain([backHandlerRef, 'access',
|
|
3691
|
+
_optionalChain([backHandlerRef, 'access', _108 => _108.current, 'optionalCall', _109 => _109()]);
|
|
3684
3692
|
}, []);
|
|
3685
|
-
const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
3686
|
-
const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
3687
|
-
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
3688
|
-
const balance = _optionalChain([uiConfig, 'optionalAccess',
|
|
3689
|
-
const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess',
|
|
3690
|
-
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess',
|
|
3693
|
+
const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _110 => _110.showLogo]), () => ( false));
|
|
3694
|
+
const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _111 => _111.showStepper]), () => ( false));
|
|
3695
|
+
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _112 => _112.showBackButton]), () => ( true));
|
|
3696
|
+
const balance = _optionalChain([uiConfig, 'optionalAccess', _113 => _113.balance]);
|
|
3697
|
+
const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _114 => _114.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
|
|
3698
|
+
const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _115 => _115.title]), () => ( "Deposit"));
|
|
3691
3699
|
const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
|
|
3692
3700
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3693
3701
|
_chunkTQ6IIGRScjs.Modal,
|
|
@@ -3827,6 +3835,7 @@ function DepositModalInner({
|
|
|
3827
3835
|
sourceToken,
|
|
3828
3836
|
amount: defaultAmount,
|
|
3829
3837
|
recipient,
|
|
3838
|
+
postBridgeActions,
|
|
3830
3839
|
signerAddress,
|
|
3831
3840
|
sessionChainIds,
|
|
3832
3841
|
forceRegister,
|
package/dist/deposit.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkM4QDXLINcjs = require('./chunk-M4QDXLIN.cjs');
|
|
4
4
|
require('./chunk-TQ6IIGRS.cjs');
|
|
5
5
|
require('./chunk-R6U6BHCV.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.DepositModal =
|
|
8
|
+
exports.DepositModal = _chunkM4QDXLINcjs.DepositModal;
|
package/dist/deposit.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { d as DepositModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData } from './types-
|
|
2
|
+
import { d as DepositModalProps } from './types-Dp8Wj8Vt.cjs';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData } from './types-Dp8Wj8Vt.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import './safe.cjs';
|
|
6
6
|
|
package/dist/deposit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { d as DepositModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData } from './types-
|
|
2
|
+
import { d as DepositModalProps } from './types-CB9x9ab7.js';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData } from './types-CB9x9ab7.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import './safe.js';
|
|
6
6
|
|
package/dist/deposit.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkM4QDXLINcjs = require('./chunk-M4QDXLIN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk3FEFGN7Hcjs = require('./chunk-3FEFGN7H.cjs');
|
|
@@ -66,4 +66,4 @@ var _chunkR6U6BHCVcjs = require('./chunk-R6U6BHCV.cjs');
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
exports.CHAIN_BY_ID = _chunkR6U6BHCVcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkR6U6BHCVcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkR6U6BHCVcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal =
|
|
69
|
+
exports.CHAIN_BY_ID = _chunkR6U6BHCVcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkR6U6BHCVcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkR6U6BHCVcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunkM4QDXLINcjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkR6U6BHCVcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkR6U6BHCVcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkR6U6BHCVcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunk3FEFGN7Hcjs.WithdrawModal; exports.chainRegistry = _chunkR6U6BHCVcjs.chainRegistry; exports.findChainIdForToken = _chunkR6U6BHCVcjs.findChainIdForToken; exports.getChainBadge = _chunkR6U6BHCVcjs.getChainBadge; exports.getChainIcon = _chunkR6U6BHCVcjs.getChainIcon; exports.getChainId = _chunkR6U6BHCVcjs.getChainId; exports.getChainName = _chunkR6U6BHCVcjs.getChainName; exports.getChainObject = _chunkR6U6BHCVcjs.getChainObject; exports.getExplorerName = _chunkR6U6BHCVcjs.getExplorerName; exports.getExplorerTxUrl = _chunkR6U6BHCVcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkR6U6BHCVcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkR6U6BHCVcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkR6U6BHCVcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkR6U6BHCVcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkR6U6BHCVcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkR6U6BHCVcjs.getTokenAddress; exports.getTokenDecimals = _chunkR6U6BHCVcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkR6U6BHCVcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkR6U6BHCVcjs.getTokenIcon; exports.getTokenSymbol = _chunkR6U6BHCVcjs.getTokenSymbol; exports.getUsdcAddress = _chunkR6U6BHCVcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkR6U6BHCVcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkR6U6BHCVcjs.isSupportedTokenAddressForChain;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.cjs';
|
|
2
2
|
export { WithdrawModal } from './withdraw.cjs';
|
|
3
|
-
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, d as DepositModalProps, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData, R as RouteConfig, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, d as DepositModalProps, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData, O as OrderBookSwapAction, P as PostBridgeAction, R as RouteConfig, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-Dp8Wj8Vt.cjs';
|
|
4
4
|
export { CHAIN_BY_ID, DEFAULT_BACKEND_URL, DEFAULT_SIGNER_ADDRESS, NATIVE_TOKEN_ADDRESS, SOURCE_CHAINS, SUPPORTED_CHAINS, chainRegistry, findChainIdForToken, getChainBadge, getChainIcon, getChainId, getChainName, getChainObject, getExplorerName, getExplorerTxUrl, getExplorerUrl, getSupportedChainIds, getSupportedTargetTokens, getSupportedTokenSymbolsForChain, getTargetTokenSymbolsForChain, getTokenAddress, getTokenDecimals, getTokenDecimalsByAddress, getTokenIcon, getTokenSymbol, getUsdcAddress, getUsdcDecimals, isSupportedTokenAddressForChain } from './constants.cjs';
|
|
5
5
|
export { SafeTransactionRequest } from './safe.cjs';
|
|
6
6
|
import 'react/jsx-runtime';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.js';
|
|
2
2
|
export { WithdrawModal } from './withdraw.js';
|
|
3
|
-
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, d as DepositModalProps, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData, R as RouteConfig, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, d as DepositModalProps, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData, O as OrderBookSwapAction, P as PostBridgeAction, R as RouteConfig, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-CB9x9ab7.js';
|
|
4
4
|
export { CHAIN_BY_ID, DEFAULT_BACKEND_URL, DEFAULT_SIGNER_ADDRESS, NATIVE_TOKEN_ADDRESS, SOURCE_CHAINS, SUPPORTED_CHAINS, chainRegistry, findChainIdForToken, getChainBadge, getChainIcon, getChainId, getChainName, getChainObject, getExplorerName, getExplorerTxUrl, getExplorerUrl, getSupportedChainIds, getSupportedTargetTokens, getSupportedTokenSymbolsForChain, getTargetTokenSymbolsForChain, getTokenAddress, getTokenDecimals, getTokenDecimalsByAddress, getTokenIcon, getTokenSymbol, getUsdcAddress, getUsdcDecimals, isSupportedTokenAddressForChain } from './constants.js';
|
|
5
5
|
export { SafeTransactionRequest } from './safe.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
package/dist/index.mjs
CHANGED
package/dist/reown.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkM4QDXLINcjs = require('./chunk-M4QDXLIN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk3FEFGN7Hcjs = require('./chunk-3FEFGN7H.cjs');
|
|
@@ -9,4 +9,4 @@ require('./chunk-R6U6BHCV.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.DepositModal =
|
|
12
|
+
exports.DepositModal = _chunkM4QDXLINcjs.DepositModal; exports.WithdrawModal = _chunk3FEFGN7Hcjs.WithdrawModal;
|
package/dist/reown.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.cjs';
|
|
2
2
|
export { WithdrawModal } from './withdraw.cjs';
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, d as DepositModalProps, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, d as DepositModalProps, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-Dp8Wj8Vt.cjs';
|
|
4
4
|
export { SafeTransactionRequest } from './safe.cjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'viem';
|
package/dist/reown.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.js';
|
|
2
2
|
export { WithdrawModal } from './withdraw.js';
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, d as DepositModalProps, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositFailedEventData, c as DepositModalBranding, d as DepositModalProps, e as DepositModalTheme, f as DepositModalUIConfig, g as DepositSubmittedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, i as WithdrawModalProps, j as WithdrawSubmittedEventData } from './types-CB9x9ab7.js';
|
|
4
4
|
export { SafeTransactionRequest } from './safe.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'viem';
|
package/dist/reown.mjs
CHANGED
package/dist/styles.css
CHANGED
|
@@ -193,6 +193,7 @@
|
|
|
193
193
|
.rs-modal-content--inline {
|
|
194
194
|
position: static;
|
|
195
195
|
margin: 0;
|
|
196
|
+
max-width: 100%;
|
|
196
197
|
transform: none;
|
|
197
198
|
max-height: none;
|
|
198
199
|
}
|
|
@@ -2823,8 +2824,8 @@
|
|
|
2823
2824
|
}
|
|
2824
2825
|
|
|
2825
2826
|
.rs-success-badge {
|
|
2826
|
-
width:
|
|
2827
|
-
height:
|
|
2827
|
+
width: 44px;
|
|
2828
|
+
height: 44px;
|
|
2828
2829
|
border-radius: 50%;
|
|
2829
2830
|
background-color: var(--rs-success);
|
|
2830
2831
|
color: white;
|
|
@@ -2836,8 +2837,8 @@
|
|
|
2836
2837
|
}
|
|
2837
2838
|
|
|
2838
2839
|
.rs-success-badge svg {
|
|
2839
|
-
width:
|
|
2840
|
-
height:
|
|
2840
|
+
width: 22px;
|
|
2841
|
+
height: 22px;
|
|
2841
2842
|
}
|
|
2842
2843
|
|
|
2843
2844
|
@keyframes rs-success-glow {
|
|
@@ -91,6 +91,7 @@ interface DepositModalProps {
|
|
|
91
91
|
sourceToken?: Address;
|
|
92
92
|
defaultAmount?: string;
|
|
93
93
|
recipient: Address;
|
|
94
|
+
postBridgeActions?: PostBridgeAction[];
|
|
94
95
|
backendUrl?: string;
|
|
95
96
|
solanaRpcUrl?: string;
|
|
96
97
|
rhinestoneApiKey?: string;
|
|
@@ -165,5 +166,11 @@ interface AssetOption {
|
|
|
165
166
|
balance?: string;
|
|
166
167
|
balanceUsd?: number;
|
|
167
168
|
}
|
|
169
|
+
interface OrderBookSwapAction {
|
|
170
|
+
type: "orderbook-swap";
|
|
171
|
+
contract: Address;
|
|
172
|
+
outputToken: Address;
|
|
173
|
+
}
|
|
174
|
+
type PostBridgeAction = OrderBookSwapAction;
|
|
168
175
|
|
|
169
|
-
export type { AssetOption as A, ChainId as C, DepositCompleteEventData as D, ErrorEventData as E, RouteConfig as R, WithdrawCompleteEventData as W, ConnectedEventData as a, DepositFailedEventData as b, DepositModalBranding as c, DepositModalProps as d, DepositModalTheme as e, DepositModalUIConfig as f, DepositSubmittedEventData as g, WithdrawFailedEventData as h, WithdrawModalProps as i, WithdrawSubmittedEventData as j };
|
|
176
|
+
export type { AssetOption as A, ChainId as C, DepositCompleteEventData as D, ErrorEventData as E, OrderBookSwapAction as O, PostBridgeAction as P, RouteConfig as R, WithdrawCompleteEventData as W, ConnectedEventData as a, DepositFailedEventData as b, DepositModalBranding as c, DepositModalProps as d, DepositModalTheme as e, DepositModalUIConfig as f, DepositSubmittedEventData as g, WithdrawFailedEventData as h, WithdrawModalProps as i, WithdrawSubmittedEventData as j };
|
|
@@ -91,6 +91,7 @@ interface DepositModalProps {
|
|
|
91
91
|
sourceToken?: Address;
|
|
92
92
|
defaultAmount?: string;
|
|
93
93
|
recipient: Address;
|
|
94
|
+
postBridgeActions?: PostBridgeAction[];
|
|
94
95
|
backendUrl?: string;
|
|
95
96
|
solanaRpcUrl?: string;
|
|
96
97
|
rhinestoneApiKey?: string;
|
|
@@ -165,5 +166,11 @@ interface AssetOption {
|
|
|
165
166
|
balance?: string;
|
|
166
167
|
balanceUsd?: number;
|
|
167
168
|
}
|
|
169
|
+
interface OrderBookSwapAction {
|
|
170
|
+
type: "orderbook-swap";
|
|
171
|
+
contract: Address;
|
|
172
|
+
outputToken: Address;
|
|
173
|
+
}
|
|
174
|
+
type PostBridgeAction = OrderBookSwapAction;
|
|
168
175
|
|
|
169
|
-
export type { AssetOption as A, ChainId as C, DepositCompleteEventData as D, ErrorEventData as E, RouteConfig as R, WithdrawCompleteEventData as W, ConnectedEventData as a, DepositFailedEventData as b, DepositModalBranding as c, DepositModalProps as d, DepositModalTheme as e, DepositModalUIConfig as f, DepositSubmittedEventData as g, WithdrawFailedEventData as h, WithdrawModalProps as i, WithdrawSubmittedEventData as j };
|
|
176
|
+
export type { AssetOption as A, ChainId as C, DepositCompleteEventData as D, ErrorEventData as E, OrderBookSwapAction as O, PostBridgeAction as P, RouteConfig as R, WithdrawCompleteEventData as W, ConnectedEventData as a, DepositFailedEventData as b, DepositModalBranding as c, DepositModalProps as d, DepositModalTheme as e, DepositModalUIConfig as f, DepositSubmittedEventData as g, WithdrawFailedEventData as h, WithdrawModalProps as i, WithdrawSubmittedEventData as j };
|
package/dist/withdraw.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { i as WithdrawModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, j as WithdrawSubmittedEventData } from './types-
|
|
2
|
+
import { i as WithdrawModalProps } from './types-Dp8Wj8Vt.cjs';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, j as WithdrawSubmittedEventData } from './types-Dp8Wj8Vt.cjs';
|
|
4
4
|
export { SafeTransactionRequest } from './safe.cjs';
|
|
5
5
|
import 'viem';
|
|
6
6
|
|
package/dist/withdraw.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { i as WithdrawModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, j as WithdrawSubmittedEventData } from './types-
|
|
2
|
+
import { i as WithdrawModalProps } from './types-CB9x9ab7.js';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, h as WithdrawFailedEventData, j as WithdrawSubmittedEventData } from './types-CB9x9ab7.js';
|
|
4
4
|
export { SafeTransactionRequest } from './safe.js';
|
|
5
5
|
import 'viem';
|
|
6
6
|
|