@rhinestone/deposit-modal 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-FMAPWBQM.cjs → DepositModalReown-MCDIOJLT.cjs} +6 -6
- package/dist/{DepositModalReown-EXI7MW65.mjs → DepositModalReown-ORSBSEMO.mjs} +3 -3
- package/dist/{WithdrawModalReown-CTT3EXMG.cjs → WithdrawModalReown-KKGW62YO.cjs} +6 -6
- package/dist/{WithdrawModalReown-G7EM6HXO.mjs → WithdrawModalReown-XPB53FKZ.mjs} +3 -3
- package/dist/{chunk-BTDRUAPJ.cjs → chunk-36R7XKXP.cjs} +396 -418
- package/dist/{chunk-JHT2MJ42.cjs → chunk-3NZUMDST.cjs} +116 -92
- package/dist/{chunk-A33QFRKD.mjs → chunk-7EQQD7B4.mjs} +18 -0
- package/dist/{chunk-RTAIW3WW.mjs → chunk-ANPDY6NJ.mjs} +40 -62
- package/dist/{chunk-LJJCPDZO.cjs → chunk-EDUWRMQI.cjs} +22 -4
- package/dist/{chunk-3GLQC2KQ.mjs → chunk-IDJBMNV2.mjs} +27 -3
- package/dist/{chunk-ULCCXH2A.cjs → chunk-PQDHZZ2B.cjs} +2 -2
- package/dist/{chunk-43RTPRQY.mjs → chunk-V72YVCR6.mjs} +1 -1
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{types-CFRuisqK.d.cts → types-CUOqIIvZ.d.cts} +7 -0
- package/dist/{types-CFRuisqK.d.ts → types-CUOqIIvZ.d.ts} +7 -0
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -3059,6 +3059,23 @@ function estimateReceiveAmount(params) {
|
|
|
3059
3059
|
if (targetPrice === void 0) return void 0;
|
|
3060
3060
|
return usdValue / targetPrice;
|
|
3061
3061
|
}
|
|
3062
|
+
function formatQuotedReceive(output, fallbackSymbol) {
|
|
3063
|
+
if (output.decimals === null) return void 0;
|
|
3064
|
+
let raw;
|
|
3065
|
+
try {
|
|
3066
|
+
raw = BigInt(output.amount);
|
|
3067
|
+
} catch {
|
|
3068
|
+
return void 0;
|
|
3069
|
+
}
|
|
3070
|
+
if (raw <= 0n) return void 0;
|
|
3071
|
+
const symbol = output.symbol ?? fallbackSymbol;
|
|
3072
|
+
const formatted = formatRawTokenAmount(raw, {
|
|
3073
|
+
symbol,
|
|
3074
|
+
decimals: output.decimals
|
|
3075
|
+
});
|
|
3076
|
+
if (formatted === void 0) return void 0;
|
|
3077
|
+
return `~${formatted} ${symbol}`;
|
|
3078
|
+
}
|
|
3062
3079
|
function formatReceiveEstimate(params) {
|
|
3063
3080
|
const estimate = estimateReceiveAmount(params);
|
|
3064
3081
|
if (estimate === void 0) return void 0;
|
|
@@ -4014,6 +4031,7 @@ export {
|
|
|
4014
4031
|
formatUserError,
|
|
4015
4032
|
Tooltip,
|
|
4016
4033
|
formatTokenAmount,
|
|
4034
|
+
formatQuotedReceive,
|
|
4017
4035
|
formatReceiveEstimate,
|
|
4018
4036
|
getEventTxHash,
|
|
4019
4037
|
getEventSourceDetails,
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
debugError,
|
|
46
46
|
debugLog,
|
|
47
47
|
failureMessageForEvent,
|
|
48
|
+
formatQuotedReceive,
|
|
48
49
|
formatReceiveEstimate,
|
|
49
50
|
formatTokenAmount,
|
|
50
51
|
formatUserError,
|
|
@@ -63,7 +64,7 @@ import {
|
|
|
63
64
|
tokenFormatter,
|
|
64
65
|
txRefsMatch,
|
|
65
66
|
useLatestRef
|
|
66
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-7EQQD7B4.mjs";
|
|
67
68
|
import {
|
|
68
69
|
SAFE_ABI
|
|
69
70
|
} from "./chunk-F7P4MV72.mjs";
|
|
@@ -119,7 +120,6 @@ import {
|
|
|
119
120
|
useLayoutEffect as useLayoutEffect2,
|
|
120
121
|
useRef as useRef8
|
|
121
122
|
} from "react";
|
|
122
|
-
import { formatUnits as formatUnits7 } from "viem";
|
|
123
123
|
|
|
124
124
|
// src/components/steps/AssetSelectStep.tsx
|
|
125
125
|
import { useEffect, useMemo, useState } from "react";
|
|
@@ -134,7 +134,6 @@ function AssetSelectStep({
|
|
|
134
134
|
service,
|
|
135
135
|
onContinue,
|
|
136
136
|
onTotalBalanceComputed,
|
|
137
|
-
onAssetsLoaded,
|
|
138
137
|
onDisconnect
|
|
139
138
|
}) {
|
|
140
139
|
const [assets, setAssets] = useState([]);
|
|
@@ -149,7 +148,6 @@ function AssetSelectStep({
|
|
|
149
148
|
});
|
|
150
149
|
}, [defaultSourceChain, defaultSourceToken]);
|
|
151
150
|
const onTotalBalanceComputedRef = useLatestRef(onTotalBalanceComputed);
|
|
152
|
-
const onAssetsLoadedRef = useLatestRef(onAssetsLoaded);
|
|
153
151
|
useEffect(() => {
|
|
154
152
|
let active = true;
|
|
155
153
|
function emitAssetsUpdate(currentAssets) {
|
|
@@ -158,7 +156,6 @@ function AssetSelectStep({
|
|
|
158
156
|
0
|
|
159
157
|
);
|
|
160
158
|
onTotalBalanceComputedRef.current?.(total);
|
|
161
|
-
if (currentAssets.length > 0) onAssetsLoadedRef.current?.(currentAssets);
|
|
162
159
|
}
|
|
163
160
|
async function loadPortfolio() {
|
|
164
161
|
if (!address) {
|
|
@@ -202,7 +199,7 @@ function AssetSelectStep({
|
|
|
202
199
|
return () => {
|
|
203
200
|
active = false;
|
|
204
201
|
};
|
|
205
|
-
}, [address, publicClient, service, onTotalBalanceComputedRef
|
|
202
|
+
}, [address, publicClient, service, onTotalBalanceComputedRef]);
|
|
206
203
|
useEffect(() => {
|
|
207
204
|
if (!defaultAssetId || selectedAssetId) return;
|
|
208
205
|
if (assets.some((asset) => asset.id === defaultAssetId)) {
|
|
@@ -706,32 +703,34 @@ function AmountStep({
|
|
|
706
703
|
}
|
|
707
704
|
setError(null);
|
|
708
705
|
onCtaClick?.("continue");
|
|
709
|
-
setIsCheckingLiquidity(true);
|
|
710
706
|
let liquidityWarning;
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
707
|
+
if (uiConfig?.checkLiquidity) {
|
|
708
|
+
setIsCheckingLiquidity(true);
|
|
709
|
+
try {
|
|
710
|
+
const liquidity = await service.checkLiquidity({
|
|
711
|
+
sourceChainId: liquiditySource?.chainId ?? asset.chainId,
|
|
712
|
+
sourceToken: liquiditySource?.token ?? asset.token,
|
|
713
|
+
destinationChainId: targetChain,
|
|
714
|
+
destinationToken: targetToken,
|
|
715
|
+
amount: amountInUnits.toString()
|
|
716
|
+
});
|
|
717
|
+
if (liquidity.unlimited || liquidity.hasLiquidity) {
|
|
718
|
+
liquidityWarning = void 0;
|
|
719
|
+
} else if (liquidity.maxAmount !== null) {
|
|
720
|
+
liquidityWarning = {
|
|
721
|
+
kind: "low",
|
|
722
|
+
maxAmount: liquidity.maxAmount,
|
|
723
|
+
decimals: liquidity.decimals,
|
|
724
|
+
symbol: liquidity.symbol
|
|
725
|
+
};
|
|
726
|
+
} else {
|
|
727
|
+
liquidityWarning = { kind: "unavailable" };
|
|
728
|
+
}
|
|
729
|
+
} catch {
|
|
730
|
+
liquidityWarning = { kind: "check-failed" };
|
|
731
|
+
} finally {
|
|
732
|
+
setIsCheckingLiquidity(false);
|
|
730
733
|
}
|
|
731
|
-
} catch {
|
|
732
|
-
liquidityWarning = { kind: "check-failed" };
|
|
733
|
-
} finally {
|
|
734
|
-
setIsCheckingLiquidity(false);
|
|
735
734
|
}
|
|
736
735
|
onContinue(
|
|
737
736
|
sourceAmount.toString(),
|
|
@@ -882,6 +881,10 @@ function ConfirmStep({
|
|
|
882
881
|
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? formatTokenAmount(Number(amount), asset.symbol) ?? "0" : "0";
|
|
883
882
|
const receiveDisplay = (() => {
|
|
884
883
|
if (sameRoute) return `${formattedSendAmount} ${asset.symbol}`;
|
|
884
|
+
if (quote) {
|
|
885
|
+
const quoted = formatQuotedReceive(quote.output, targetSymbol);
|
|
886
|
+
if (quoted !== void 0) return quoted;
|
|
887
|
+
}
|
|
885
888
|
const usdValue = Number(targetAmount);
|
|
886
889
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
887
890
|
const estimate = formatReceiveEstimate({
|
|
@@ -892,7 +895,7 @@ function ConfirmStep({
|
|
|
892
895
|
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : {}
|
|
893
896
|
});
|
|
894
897
|
if (estimate !== void 0) return estimate;
|
|
895
|
-
return
|
|
898
|
+
return targetSymbol;
|
|
896
899
|
})();
|
|
897
900
|
const feeSponsored = uiConfig?.feeSponsored ?? false;
|
|
898
901
|
const feeTooltip = uiConfig?.feeTooltip ?? (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.");
|
|
@@ -3480,7 +3483,7 @@ function SolanaConfirmStep({
|
|
|
3480
3483
|
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : {}
|
|
3481
3484
|
});
|
|
3482
3485
|
if (estimate !== void 0) return estimate;
|
|
3483
|
-
return
|
|
3486
|
+
return targetSymbol;
|
|
3484
3487
|
})();
|
|
3485
3488
|
const handleConfirm = async () => {
|
|
3486
3489
|
if (!solanaProvider) {
|
|
@@ -5370,7 +5373,6 @@ function DepositFlow({
|
|
|
5370
5373
|
const isConnectSelectionConfirmed = flowSlice.isConnectSelectionConfirmed;
|
|
5371
5374
|
const selectedWalletId = useDepositStore(selectedWalletIdSelector);
|
|
5372
5375
|
const [totalBalanceUsd, setTotalBalanceUsd] = useState11(0);
|
|
5373
|
-
const portfolioAssetsRef = useRef8([]);
|
|
5374
5376
|
const stableWalletSignerRef = useRef8(null);
|
|
5375
5377
|
const stableWalletSelectionKeyRef = useRef8(null);
|
|
5376
5378
|
const logFlow = useCallback7(
|
|
@@ -5385,24 +5387,6 @@ function DepositFlow({
|
|
|
5385
5387
|
},
|
|
5386
5388
|
[debug]
|
|
5387
5389
|
);
|
|
5388
|
-
const handleAssetsLoaded = useCallback7((assets) => {
|
|
5389
|
-
portfolioAssetsRef.current = assets;
|
|
5390
|
-
}, []);
|
|
5391
|
-
const getTokenPriceUsd = useCallback7((symbol) => {
|
|
5392
|
-
const sym = symbol.toLowerCase();
|
|
5393
|
-
for (const asset of portfolioAssetsRef.current) {
|
|
5394
|
-
if (asset.symbol.toLowerCase() === sym && asset.balanceUsd && asset.balance) {
|
|
5395
|
-
try {
|
|
5396
|
-
const balanceUnits = Number(
|
|
5397
|
-
formatUnits7(BigInt(asset.balance), asset.decimals)
|
|
5398
|
-
);
|
|
5399
|
-
if (balanceUnits > 0) return asset.balanceUsd / balanceUnits;
|
|
5400
|
-
} catch {
|
|
5401
|
-
}
|
|
5402
|
-
}
|
|
5403
|
-
}
|
|
5404
|
-
return null;
|
|
5405
|
-
}, []);
|
|
5406
5390
|
const dappSwitchChain = useMemo7(() => {
|
|
5407
5391
|
if (!dappWalletClient?.switchChain) return void 0;
|
|
5408
5392
|
return async (chainId) => {
|
|
@@ -5714,14 +5698,10 @@ function DepositFlow({
|
|
|
5714
5698
|
);
|
|
5715
5699
|
const step = effectiveStep;
|
|
5716
5700
|
const handleBack = useCallback7(() => {
|
|
5717
|
-
const stepBeforeBack = storeApi.getState().flow.step;
|
|
5718
5701
|
storeApi.dispatch({
|
|
5719
5702
|
type: "back/requested",
|
|
5720
5703
|
hasWalletOptions: hasWalletOptions || Boolean(reownWallet)
|
|
5721
5704
|
});
|
|
5722
|
-
if (stepBeforeBack === "deposit-address" || stepBeforeBack === "select-asset" || stepBeforeBack === "solana-token-select") {
|
|
5723
|
-
portfolioAssetsRef.current = [];
|
|
5724
|
-
}
|
|
5725
5705
|
}, [storeApi, hasWalletOptions, reownWallet]);
|
|
5726
5706
|
const canGoBackFromHere = effectiveStep.type === "deposit-address" || effectiveStep.type === "solana-token-select" || effectiveStep.type === "solana-amount" || effectiveStep.type === "solana-confirm" || effectiveStep.type === "amount" || effectiveStep.type === "confirm" || // Escape hatch from a slow or stuck pre-routed resolve. Mode-gated so
|
|
5727
5707
|
// the chevron doesn't linger if a disconnect cleared the mode out from
|
|
@@ -6120,7 +6100,6 @@ function DepositFlow({
|
|
|
6120
6100
|
solana: null
|
|
6121
6101
|
});
|
|
6122
6102
|
storeApi.dispatch({ type: "flow/reset" });
|
|
6123
|
-
portfolioAssetsRef.current = [];
|
|
6124
6103
|
stableWalletSignerRef.current = null;
|
|
6125
6104
|
stableWalletSelectionKeyRef.current = null;
|
|
6126
6105
|
}, [onLifecycleRef, storeApi]);
|
|
@@ -6294,7 +6273,7 @@ function DepositFlow({
|
|
|
6294
6273
|
(token, sourceAmount, inputAmountUsd) => {
|
|
6295
6274
|
const targetSym = getTargetTokenSymbol(targetToken, targetChain);
|
|
6296
6275
|
const isTargetStable = isStablecoinSymbol(targetSym);
|
|
6297
|
-
const targetTokenPriceUsd = isTargetStable ? 1 :
|
|
6276
|
+
const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
|
|
6298
6277
|
logFlow("solana:amount:continue", {
|
|
6299
6278
|
token: token.symbol,
|
|
6300
6279
|
sourceAmount,
|
|
@@ -6310,7 +6289,7 @@ function DepositFlow({
|
|
|
6310
6289
|
targetTokenPriceUsd
|
|
6311
6290
|
});
|
|
6312
6291
|
},
|
|
6313
|
-
[targetToken, targetChain,
|
|
6292
|
+
[targetToken, targetChain, logFlow, storeApi]
|
|
6314
6293
|
);
|
|
6315
6294
|
const handleSolanaConfirmed = useCallback7(
|
|
6316
6295
|
(txHash, amountUnits) => {
|
|
@@ -6371,7 +6350,7 @@ function DepositFlow({
|
|
|
6371
6350
|
if (entry.status !== "ready") return;
|
|
6372
6351
|
const targetSym = getTargetTokenSymbol(targetToken, targetChain);
|
|
6373
6352
|
const isTargetStable = isStablecoinSymbol(targetSym);
|
|
6374
|
-
const targetTokenPriceUsd = isTargetStable ? 1 :
|
|
6353
|
+
const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
|
|
6375
6354
|
storeApi.dispatch({
|
|
6376
6355
|
type: "amount/entered",
|
|
6377
6356
|
amount,
|
|
@@ -6381,7 +6360,7 @@ function DepositFlow({
|
|
|
6381
6360
|
liquidityWarning
|
|
6382
6361
|
});
|
|
6383
6362
|
},
|
|
6384
|
-
[targetToken, targetChain,
|
|
6363
|
+
[targetToken, targetChain, storeApi, activeOwner]
|
|
6385
6364
|
);
|
|
6386
6365
|
const handleDepositSubmitted = useCallback7(
|
|
6387
6366
|
(txHash, chainId, amount, token) => {
|
|
@@ -6942,7 +6921,6 @@ function DepositFlow({
|
|
|
6942
6921
|
service,
|
|
6943
6922
|
onContinue: handleAssetContinue,
|
|
6944
6923
|
onTotalBalanceComputed: handleTotalBalanceComputed,
|
|
6945
|
-
onAssetsLoaded: handleAssetsLoaded,
|
|
6946
6924
|
onDisconnect: onDisconnect ? () => {
|
|
6947
6925
|
onDisconnect();
|
|
6948
6926
|
handleBack();
|
|
@@ -7347,7 +7325,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7347
7325
|
// src/DepositModal.tsx
|
|
7348
7326
|
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7349
7327
|
var ReownDepositInner = lazy2(
|
|
7350
|
-
() => import("./DepositModalReown-
|
|
7328
|
+
() => import("./DepositModalReown-ORSBSEMO.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7351
7329
|
);
|
|
7352
7330
|
function sortByCreatedAtDesc(items) {
|
|
7353
7331
|
return [...items].sort((a, b) => {
|
|
@@ -3059,6 +3059,23 @@ function estimateReceiveAmount(params) {
|
|
|
3059
3059
|
if (targetPrice === void 0) return void 0;
|
|
3060
3060
|
return usdValue / targetPrice;
|
|
3061
3061
|
}
|
|
3062
|
+
function formatQuotedReceive(output, fallbackSymbol) {
|
|
3063
|
+
if (output.decimals === null) return void 0;
|
|
3064
|
+
let raw;
|
|
3065
|
+
try {
|
|
3066
|
+
raw = BigInt(output.amount);
|
|
3067
|
+
} catch (e5) {
|
|
3068
|
+
return void 0;
|
|
3069
|
+
}
|
|
3070
|
+
if (raw <= 0n) return void 0;
|
|
3071
|
+
const symbol = _nullishCoalesce(output.symbol, () => ( fallbackSymbol));
|
|
3072
|
+
const formatted = formatRawTokenAmount(raw, {
|
|
3073
|
+
symbol,
|
|
3074
|
+
decimals: output.decimals
|
|
3075
|
+
});
|
|
3076
|
+
if (formatted === void 0) return void 0;
|
|
3077
|
+
return `~${formatted} ${symbol}`;
|
|
3078
|
+
}
|
|
3062
3079
|
function formatReceiveEstimate(params) {
|
|
3063
3080
|
const estimate = estimateReceiveAmount(params);
|
|
3064
3081
|
if (estimate === void 0) return void 0;
|
|
@@ -3196,7 +3213,7 @@ function loadPhaseTimings(txHash) {
|
|
|
3196
3213
|
const parsed = JSON.parse(raw);
|
|
3197
3214
|
if (typeof parsed.startedAt !== "number") return null;
|
|
3198
3215
|
return parsed;
|
|
3199
|
-
} catch (
|
|
3216
|
+
} catch (e6) {
|
|
3200
3217
|
return null;
|
|
3201
3218
|
}
|
|
3202
3219
|
}
|
|
@@ -3207,7 +3224,7 @@ function savePhaseTimings(txHash, timings) {
|
|
|
3207
3224
|
`${PHASE_TIMINGS_PREFIX}:${txHash}`,
|
|
3208
3225
|
JSON.stringify(timings)
|
|
3209
3226
|
);
|
|
3210
|
-
} catch (
|
|
3227
|
+
} catch (e7) {
|
|
3211
3228
|
}
|
|
3212
3229
|
}
|
|
3213
3230
|
function isEventForTx(event, txHash) {
|
|
@@ -3945,7 +3962,7 @@ function loadSessionOwnerFromStorage(eoaAddress) {
|
|
|
3945
3962
|
privateKey: parsed.privateKey,
|
|
3946
3963
|
address: account.address
|
|
3947
3964
|
};
|
|
3948
|
-
} catch (
|
|
3965
|
+
} catch (e8) {
|
|
3949
3966
|
return null;
|
|
3950
3967
|
}
|
|
3951
3968
|
}
|
|
@@ -4030,4 +4047,5 @@ function accountFromPrivateKey(privateKey) {
|
|
|
4030
4047
|
|
|
4031
4048
|
|
|
4032
4049
|
|
|
4033
|
-
|
|
4050
|
+
|
|
4051
|
+
exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BankIcon = BankIcon; exports.UnplugIcon = UnplugIcon; exports.Callout = Callout; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.getExchangeLogo = getExchangeLogo; exports.ConnectStep = ConnectStep; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.formatTokenAmount = formatTokenAmount; exports.formatQuotedReceive = formatQuotedReceive; exports.formatReceiveEstimate = formatReceiveEstimate; exports.getEventTxHash = getEventTxHash; exports.getEventSourceDetails = getEventSourceDetails; exports.isDepositEvent = isDepositEvent; exports.isFailedEvent = isFailedEvent; exports.txRefsMatch = txRefsMatch; exports.failureMessageForEvent = failureMessageForEvent; exports.useTokenPrices = useTokenPrices; exports.ProcessingStep = ProcessingStep; exports.getPublicClient = getPublicClient; exports.getHyperEvmReadClient = getHyperEvmReadClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
saveSessionOwnerToStorage,
|
|
31
31
|
useLatestRef,
|
|
32
32
|
useTokenPrices
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7EQQD7B4.mjs";
|
|
34
34
|
import {
|
|
35
35
|
buildSafeTransaction,
|
|
36
36
|
executeSafeErc20Transfer,
|
|
@@ -200,6 +200,7 @@ function WithdrawFormStep({
|
|
|
200
200
|
publicClient,
|
|
201
201
|
connectedRecipient,
|
|
202
202
|
safeAddress,
|
|
203
|
+
depositAddress,
|
|
203
204
|
asset,
|
|
204
205
|
defaultRecipient,
|
|
205
206
|
defaultAmount,
|
|
@@ -361,6 +362,13 @@ function WithdrawFormStep({
|
|
|
361
362
|
setError("Enter a valid recipient address");
|
|
362
363
|
return;
|
|
363
364
|
}
|
|
365
|
+
const lowerRecipient = recipient.toLowerCase();
|
|
366
|
+
if (lowerRecipient === safeAddress.toLowerCase() || lowerRecipient === depositAddress?.toLowerCase()) {
|
|
367
|
+
setError(
|
|
368
|
+
"Recipient can't be your own account. Send to a different wallet."
|
|
369
|
+
);
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
364
372
|
const parsed = Number(amount);
|
|
365
373
|
if (!amount || !Number.isFinite(parsed) || parsed <= 0) {
|
|
366
374
|
setError("Enter a valid amount");
|
|
@@ -388,7 +396,15 @@ function WithdrawFormStep({
|
|
|
388
396
|
} finally {
|
|
389
397
|
setIsSubmitting(false);
|
|
390
398
|
}
|
|
391
|
-
}, [
|
|
399
|
+
}, [
|
|
400
|
+
recipient,
|
|
401
|
+
amount,
|
|
402
|
+
balance,
|
|
403
|
+
asset.decimals,
|
|
404
|
+
safeAddress,
|
|
405
|
+
depositAddress,
|
|
406
|
+
onSubmit
|
|
407
|
+
]);
|
|
392
408
|
if (isBalanceLoading) {
|
|
393
409
|
return /* @__PURE__ */ jsxs("div", { className: "rs-screen", children: [
|
|
394
410
|
/* @__PURE__ */ jsxs("div", { className: "rs-screen-body rs-withdraw-loading", children: [
|
|
@@ -1209,6 +1225,12 @@ function WithdrawFlow({
|
|
|
1209
1225
|
throw new Error("Withdrawal target is still being prepared");
|
|
1210
1226
|
}
|
|
1211
1227
|
const smartAccount = matchingRegistration.smartAccount;
|
|
1228
|
+
const lowerRecipient = recipient.toLowerCase();
|
|
1229
|
+
if (lowerRecipient === safeAddress.toLowerCase() || lowerRecipient === smartAccount.toLowerCase()) {
|
|
1230
|
+
throw new Error(
|
|
1231
|
+
"Recipient can't be your own account. Send to a different wallet."
|
|
1232
|
+
);
|
|
1233
|
+
}
|
|
1212
1234
|
if (!onSignTransaction && !signerContext?.walletClient) {
|
|
1213
1235
|
throw new Error("Wallet not connected");
|
|
1214
1236
|
}
|
|
@@ -1478,6 +1500,7 @@ function WithdrawFlow({
|
|
|
1478
1500
|
if (!onSignTransaction && !signerContext.walletClient) return null;
|
|
1479
1501
|
const resolvedConnectedRecipient = selectedWalletOption?.kind === "external" ? selectedWalletOption.address : void 0;
|
|
1480
1502
|
const formPublicClient = signerContext.publicClient ?? getPublicClient(sourceChain);
|
|
1503
|
+
const depositAddress = registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : void 0;
|
|
1481
1504
|
const stepView = deriveStepView(flowStep, registration);
|
|
1482
1505
|
return /* @__PURE__ */ jsxs3("div", { className: "rs-modal-body", children: [
|
|
1483
1506
|
stepView === "form" && /* @__PURE__ */ jsx3(
|
|
@@ -1487,6 +1510,7 @@ function WithdrawFlow({
|
|
|
1487
1510
|
publicClient: formPublicClient,
|
|
1488
1511
|
connectedRecipient: resolvedConnectedRecipient,
|
|
1489
1512
|
safeAddress,
|
|
1513
|
+
depositAddress,
|
|
1490
1514
|
asset,
|
|
1491
1515
|
defaultRecipient,
|
|
1492
1516
|
defaultAmount,
|
|
@@ -1564,7 +1588,7 @@ function deriveStepView(step, _registration) {
|
|
|
1564
1588
|
// src/WithdrawModal.tsx
|
|
1565
1589
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1566
1590
|
var ReownWithdrawInner = lazy(
|
|
1567
|
-
() => import("./WithdrawModalReown-
|
|
1591
|
+
() => import("./WithdrawModalReown-XPB53FKZ.mjs").then((m) => ({
|
|
1568
1592
|
default: m.WithdrawModalReown
|
|
1569
1593
|
}))
|
|
1570
1594
|
);
|
|
@@ -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(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEDUWRMQIcjs = require('./chunk-EDUWRMQI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -155,7 +155,7 @@ function useReownWallet() {
|
|
|
155
155
|
await switchChainAsync({ chainId });
|
|
156
156
|
}
|
|
157
157
|
} catch (err) {
|
|
158
|
-
if (
|
|
158
|
+
if (_chunkEDUWRMQIcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
159
159
|
throw new Error(
|
|
160
160
|
`Switch to ${_chunkABVRVW3Pcjs.getChainName.call(void 0, chainId)} in your wallet to continue`
|
|
161
161
|
);
|
package/dist/deposit.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk36R7XKXPcjs = require('./chunk-36R7XKXP.cjs');
|
|
4
4
|
require('./chunk-NRNJAQUA.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-EDUWRMQI.cjs');
|
|
6
6
|
require('./chunk-UEKPBRBY.cjs');
|
|
7
7
|
require('./chunk-ABVRVW3P.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.DepositModal =
|
|
10
|
+
exports.DepositModal = _chunk36R7XKXPcjs.DepositModal;
|
package/dist/deposit.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { f as DepositModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-
|
|
2
|
+
import { f as DepositModalProps } from './types-CUOqIIvZ.cjs';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-CUOqIIvZ.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
6
6
|
declare function DepositModal(props: DepositModalProps): react.JSX.Element;
|
package/dist/deposit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { f as DepositModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-
|
|
2
|
+
import { f as DepositModalProps } from './types-CUOqIIvZ.js';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DappImportsConfig, c as DepositCompleteEventData, d as DepositFailedEventData, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData } from './types-CUOqIIvZ.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
6
6
|
declare function DepositModal(props: DepositModalProps): react.JSX.Element;
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ANPDY6NJ.mjs";
|
|
4
4
|
import "./chunk-FJWLC4AM.mjs";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-7EQQD7B4.mjs";
|
|
6
6
|
import "./chunk-F7P4MV72.mjs";
|
|
7
7
|
import "./chunk-WJX3TJFK.mjs";
|
|
8
8
|
export {
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk36R7XKXPcjs = require('./chunk-36R7XKXP.cjs');
|
|
4
4
|
require('./chunk-NRNJAQUA.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunk3NZUMDSTcjs = require('./chunk-3NZUMDST.cjs');
|
|
8
|
+
require('./chunk-EDUWRMQI.cjs');
|
|
9
9
|
require('./chunk-UEKPBRBY.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
@@ -85,4 +85,4 @@ async function disconnectWallet() {
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
exports.CHAIN_BY_ID = _chunkABVRVW3Pcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal =
|
|
88
|
+
exports.CHAIN_BY_ID = _chunkABVRVW3Pcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunk36R7XKXPcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkABVRVW3Pcjs.HYPERCORE_USDC_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkABVRVW3Pcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkABVRVW3Pcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunk3NZUMDSTcjs.WithdrawModal; exports.chainRegistry = _chunkABVRVW3Pcjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunkABVRVW3Pcjs.findChainIdForToken; exports.getChainBadge = _chunkABVRVW3Pcjs.getChainBadge; exports.getChainIcon = _chunkABVRVW3Pcjs.getChainIcon; exports.getChainId = _chunkABVRVW3Pcjs.getChainId; exports.getChainName = _chunkABVRVW3Pcjs.getChainName; exports.getChainObject = _chunkABVRVW3Pcjs.getChainObject; exports.getExplorerName = _chunkABVRVW3Pcjs.getExplorerName; exports.getExplorerTxUrl = _chunkABVRVW3Pcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkABVRVW3Pcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkABVRVW3Pcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkABVRVW3Pcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkABVRVW3Pcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkABVRVW3Pcjs.getTokenAddress; exports.getTokenDecimals = _chunkABVRVW3Pcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon; exports.getTokenSymbol = _chunkABVRVW3Pcjs.getTokenSymbol; exports.getUsdcAddress = _chunkABVRVW3Pcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkABVRVW3Pcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkABVRVW3Pcjs.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 DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.cjs';
|
|
4
4
|
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.cjs';
|
|
5
5
|
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.cjs';
|
|
6
6
|
import 'react';
|
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 DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DappImportsConfig, b as DepositAnalyticsEvent, c as DepositCompleteEventData, d as DepositFailedEventData, e as DepositLifecycleEvent, f as DepositModalProps, g as DepositModalTheme, h as DepositModalUIConfig, i as DepositSubmittedEventData, E as ErrorEventData, M as ModalAnalyticsEvent, O as OrderBookSwapAction, j as OutputTokenRule, P as PostBridgeAction, R as RouteConfig, S as SafeTransactionRequest, W as WithdrawAnalyticsEvent, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, m as WithdrawLifecycleEvent, n as WithdrawModalProps, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.js';
|
|
4
4
|
export { PolymarketAccount, PolymarketTokenBalance } from './polymarket.js';
|
|
5
5
|
export { C as CHAIN_BY_ID, D as DEFAULT_BACKEND_URL, a as DEFAULT_SIGNER_ADDRESS, H as HYPERCORE_CHAIN_ID, b as HYPERCORE_USDC_ADDRESS, N as NATIVE_TOKEN_ADDRESS, S as SOURCE_CHAINS, c as SUPPORTED_CHAINS, e as chainRegistry, f as findChainIdForToken, g as getChainBadge, h as getChainIcon, i as getChainId, j as getChainName, k as getChainObject, l as getExplorerName, m as getExplorerTxUrl, n as getExplorerUrl, o as getSupportedChainIds, p as getSupportedTargetTokens, q as getSupportedTokenSymbolsForChain, r as getTargetTokenSymbolsForChain, s as getTokenAddress, t as getTokenDecimals, u as getTokenDecimalsByAddress, v as getTokenIcon, w as getTokenSymbol, x as getUsdcAddress, y as getUsdcDecimals, z as isSupportedTokenAddressForChain } from './caip-CsslyHGL.js';
|
|
6
6
|
import 'react';
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ANPDY6NJ.mjs";
|
|
4
4
|
import "./chunk-FJWLC4AM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
WithdrawModal
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-IDJBMNV2.mjs";
|
|
8
|
+
import "./chunk-7EQQD7B4.mjs";
|
|
9
9
|
import "./chunk-F7P4MV72.mjs";
|
|
10
10
|
import {
|
|
11
11
|
CHAIN_BY_ID,
|
|
@@ -95,6 +95,13 @@ interface DepositModalUIConfig {
|
|
|
95
95
|
* "Fees are sponsored" / "Fees apply" message based on `feeSponsored`.
|
|
96
96
|
*/
|
|
97
97
|
feeTooltip?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Run the liquidity check before the amount step continues. Off by default:
|
|
100
|
+
* the check adds an orchestrator round-trip per continue and its low/unavailable
|
|
101
|
+
* result isn't surfaced anyway, so skipping it makes the route faster. Enable
|
|
102
|
+
* to gate continue on liquidity and show the unavailable/check-failed warning.
|
|
103
|
+
*/
|
|
104
|
+
checkLiquidity?: boolean;
|
|
98
105
|
}
|
|
99
106
|
interface ConnectedEventData {
|
|
100
107
|
address: Address;
|
|
@@ -95,6 +95,13 @@ interface DepositModalUIConfig {
|
|
|
95
95
|
* "Fees are sponsored" / "Fees apply" message based on `feeSponsored`.
|
|
96
96
|
*/
|
|
97
97
|
feeTooltip?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Run the liquidity check before the amount step continues. Off by default:
|
|
100
|
+
* the check adds an orchestrator round-trip per continue and its low/unavailable
|
|
101
|
+
* result isn't surfaced anyway, so skipping it makes the route faster. Enable
|
|
102
|
+
* to gate continue on liquidity and show the unavailable/check-failed warning.
|
|
103
|
+
*/
|
|
104
|
+
checkLiquidity?: boolean;
|
|
98
105
|
}
|
|
99
106
|
interface ConnectedEventData {
|
|
100
107
|
address: Address;
|
package/dist/withdraw.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk3NZUMDSTcjs = require('./chunk-3NZUMDST.cjs');
|
|
4
|
+
require('./chunk-EDUWRMQI.cjs');
|
|
5
5
|
require('./chunk-UEKPBRBY.cjs');
|
|
6
6
|
require('./chunk-ABVRVW3P.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.WithdrawModal =
|
|
9
|
+
exports.WithdrawModal = _chunk3NZUMDSTcjs.WithdrawModal;
|
package/dist/withdraw.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { n as WithdrawModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, o as WithdrawSubmittedEventData } from './types-
|
|
2
|
+
import { n as WithdrawModalProps } from './types-CUOqIIvZ.cjs';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
6
6
|
declare function WithdrawModal(props: WithdrawModalProps): react.JSX.Element;
|
package/dist/withdraw.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { n as WithdrawModalProps } from './types-
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, o as WithdrawSubmittedEventData } from './types-
|
|
2
|
+
import { n as WithdrawModalProps } from './types-CUOqIIvZ.js';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, S as SafeTransactionRequest, k as WithdrawCompleteEventData, l as WithdrawFailedEventData, o as WithdrawSubmittedEventData } from './types-CUOqIIvZ.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
6
6
|
declare function WithdrawModal(props: WithdrawModalProps): react.JSX.Element;
|
package/dist/withdraw.mjs
CHANGED