@rhinestone/deposit-modal 0.0.0-dev-20260827160309 → 0.0.0-dev-20260827181712
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/bridge-transcript.json +0 -4
- package/dist/{ClaimModal-WWZPSZVX.mjs → ClaimModal-UYAYMYSU.mjs} +5 -5
- package/dist/ClaimModal-VNNFITSK.cjs +13 -0
- package/dist/{DepositModalReown-LQHEH3IV.mjs → DepositModalReown-GK5MDJRT.mjs} +5 -5
- package/dist/{DepositModalReown-H4PPOCH5.cjs → DepositModalReown-HBJALFN6.cjs} +15 -15
- package/dist/{WithdrawModal-H67SQHF2.mjs → WithdrawModal-4O7I2A4X.mjs} +4 -4
- package/dist/WithdrawModal-XULC3R3E.cjs +12 -0
- package/dist/{chunk-6JRKS6VI.cjs → chunk-22UBYG4U.cjs} +1 -1
- package/dist/{chunk-WK2B44Y7.mjs → chunk-2GP7MZCO.mjs} +2 -2
- package/dist/{chunk-ML3OGCIX.mjs → chunk-3II5GKQ2.mjs} +31 -23
- package/dist/{chunk-26XC5335.mjs → chunk-4VOAP4UY.mjs} +14 -15
- package/dist/{chunk-673JGCWL.mjs → chunk-A45ZOIVU.mjs} +1 -1
- package/dist/{chunk-COD2TLAL.cjs → chunk-DIFTU2XL.cjs} +3 -3
- package/dist/{chunk-ANUG4KCP.cjs → chunk-DPZZ355Z.cjs} +8 -8
- package/dist/{chunk-6JNXE36W.mjs → chunk-JCETUEEJ.mjs} +20 -19
- package/dist/{chunk-PMYYZEJ6.cjs → chunk-JTXLLGQP.cjs} +83 -82
- package/dist/{chunk-ORVOLTNH.cjs → chunk-KK6NJJEP.cjs} +66 -66
- package/dist/{chunk-5MTQ7HP2.mjs → chunk-Q7WBJECA.mjs} +1 -1
- package/dist/{chunk-3DRL5BEV.cjs → chunk-WCQUHTL6.cjs} +64 -65
- package/dist/{chunk-W3GFYEEU.mjs → chunk-WESOD2QT.mjs} +1 -1
- package/dist/{chunk-3KCQUPAM.cjs → chunk-WG55GSCF.cjs} +32 -32
- package/dist/{chunk-43W3LEMD.mjs → chunk-WGQZ6XCO.mjs} +1 -1
- package/dist/{chunk-QJMTSNPY.cjs → chunk-Y7XYK2SP.cjs} +299 -291
- package/dist/claim.cjs +6 -6
- package/dist/claim.d.cts +2 -2
- package/dist/claim.d.ts +2 -2
- package/dist/claim.mjs +5 -5
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +5 -5
- package/dist/embed.cjs +18 -18
- package/dist/embed.d.cts +1 -1
- package/dist/embed.d.ts +1 -1
- package/dist/embed.mjs +8 -8
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +8 -8
- package/dist/{types-B3SfhWyv.d.ts → types-Bjtgr4ws.d.ts} +28 -13
- package/dist/{types-5wqvXEiP.d.cts → types-zWYzXdcL.d.cts} +28 -13
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
- package/dist/ClaimModal-SCX7FQWK.cjs +0 -13
- package/dist/WithdrawModal-Q6QIFAGZ.cjs +0 -12
package/bridge-transcript.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClaimModal,
|
|
3
3
|
buildClaimAnalyticsSessionProperties
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-4VOAP4UY.mjs";
|
|
5
|
+
import "./chunk-2GP7MZCO.mjs";
|
|
6
|
+
import "./chunk-Q7WBJECA.mjs";
|
|
7
|
+
import "./chunk-A45ZOIVU.mjs";
|
|
8
|
+
import "./chunk-WESOD2QT.mjs";
|
|
9
9
|
import "./chunk-VUATPOWJ.mjs";
|
|
10
10
|
export {
|
|
11
11
|
ClaimModal,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkWCQUHTL6cjs = require('./chunk-WCQUHTL6.cjs');
|
|
5
|
+
require('./chunk-DPZZ355Z.cjs');
|
|
6
|
+
require('./chunk-DIFTU2XL.cjs');
|
|
7
|
+
require('./chunk-WG55GSCF.cjs');
|
|
8
|
+
require('./chunk-22UBYG4U.cjs');
|
|
9
|
+
require('./chunk-4KCSH4T3.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.ClaimModal = _chunkWCQUHTL6cjs.ClaimModal; exports.buildClaimAnalyticsSessionProperties = _chunkWCQUHTL6cjs.buildClaimAnalyticsSessionProperties;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3II5GKQ2.mjs";
|
|
4
|
+
import "./chunk-WGQZ6XCO.mjs";
|
|
5
|
+
import "./chunk-Q7WBJECA.mjs";
|
|
6
6
|
import {
|
|
7
7
|
followSystemAppearance,
|
|
8
8
|
isUnsupportedChainSwitchError,
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
resolveThemeMode,
|
|
12
12
|
rpcUrlFor,
|
|
13
13
|
useStableRpcUrls
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-A45ZOIVU.mjs";
|
|
15
|
+
import "./chunk-WESOD2QT.mjs";
|
|
16
16
|
import "./chunk-RN5VKWI6.mjs";
|
|
17
17
|
import {
|
|
18
18
|
SUPPORTED_CHAIN_IDS,
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var _chunkY7XYK2SPcjs = require('./chunk-Y7XYK2SP.cjs');
|
|
4
|
+
require('./chunk-KK6NJJEP.cjs');
|
|
5
|
+
require('./chunk-DIFTU2XL.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,8 +11,8 @@ require('./chunk-COD2TLAL.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
require('./chunk-
|
|
14
|
+
var _chunkWG55GSCFcjs = require('./chunk-WG55GSCF.cjs');
|
|
15
|
+
require('./chunk-22UBYG4U.cjs');
|
|
16
16
|
require('./chunk-DW2EQA2U.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
@@ -89,7 +89,7 @@ function getAppKitNetwork(chainId) {
|
|
|
89
89
|
|
|
90
90
|
// src/core/reown-theme.ts
|
|
91
91
|
function mapTheme(theme) {
|
|
92
|
-
const themeMode =
|
|
92
|
+
const themeMode = _chunkWG55GSCFcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
|
|
93
93
|
const themeVariables = {
|
|
94
94
|
"--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
|
|
95
95
|
};
|
|
@@ -110,14 +110,14 @@ function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
|
|
|
110
110
|
const transports = {};
|
|
111
111
|
for (const network of networks) {
|
|
112
112
|
const id = Number(network.id);
|
|
113
|
-
transports[id] = _viem.http.call(void 0,
|
|
113
|
+
transports[id] = _viem.http.call(void 0, _chunkWG55GSCFcjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
114
114
|
}
|
|
115
115
|
return transports;
|
|
116
116
|
}
|
|
117
117
|
function getEvmRpcFingerprint(rpcUrls, networks) {
|
|
118
118
|
return networks.map((network) => {
|
|
119
119
|
const id = Number(network.id);
|
|
120
|
-
return `${id}=${_nullishCoalesce(
|
|
120
|
+
return `${id}=${_nullishCoalesce(_chunkWG55GSCFcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
121
121
|
}).join("|");
|
|
122
122
|
}
|
|
123
123
|
var cachedAdapter = null;
|
|
@@ -188,7 +188,7 @@ function ReownWalletProvider({
|
|
|
188
188
|
backendUrl,
|
|
189
189
|
children
|
|
190
190
|
}) {
|
|
191
|
-
const rpcUrls =
|
|
191
|
+
const rpcUrls = _chunkWG55GSCFcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
192
192
|
const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
|
|
193
193
|
const overrides = _react.useMemo.call(void 0, () => {
|
|
194
194
|
if (!rpcUrls) return void 0;
|
|
@@ -200,14 +200,14 @@ function ReownWalletProvider({
|
|
|
200
200
|
return out;
|
|
201
201
|
}, [rpcUrls]);
|
|
202
202
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
203
|
-
const primed =
|
|
203
|
+
const primed = _chunkWG55GSCFcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
204
204
|
return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
|
|
205
205
|
});
|
|
206
206
|
_react.useEffect.call(void 0, () => {
|
|
207
207
|
let active = true;
|
|
208
|
-
const primed =
|
|
208
|
+
const primed = _chunkWG55GSCFcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
209
209
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
210
|
-
|
|
210
|
+
_chunkWG55GSCFcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
|
|
211
211
|
if (active) setState({ ready: true, chains });
|
|
212
212
|
});
|
|
213
213
|
return () => {
|
|
@@ -216,7 +216,7 @@ function ReownWalletProvider({
|
|
|
216
216
|
}, [backendUrl, overrides]);
|
|
217
217
|
_react.useEffect.call(void 0, () => {
|
|
218
218
|
setAppKitTheme(_react3.modal, theme);
|
|
219
|
-
return
|
|
219
|
+
return _chunkWG55GSCFcjs.followSystemAppearance.call(void 0,
|
|
220
220
|
_optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
|
|
221
221
|
() => setAppKitTheme(_react3.modal, theme)
|
|
222
222
|
);
|
|
@@ -280,7 +280,7 @@ function useReownWalletSession() {
|
|
|
280
280
|
await switchChainAsync({ chainId });
|
|
281
281
|
}
|
|
282
282
|
} catch (err) {
|
|
283
|
-
if (
|
|
283
|
+
if (_chunkWG55GSCFcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
284
284
|
throw new Error(
|
|
285
285
|
`Switch to ${chainDisplayName(chainId)} in your wallet to continue`
|
|
286
286
|
);
|
|
@@ -314,7 +314,7 @@ function DepositModalWithReown(props) {
|
|
|
314
314
|
reown.disconnect();
|
|
315
315
|
}, [reown.disconnect]);
|
|
316
316
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
317
|
-
|
|
317
|
+
_chunkY7XYK2SPcjs.DepositModalInner,
|
|
318
318
|
{
|
|
319
319
|
...props,
|
|
320
320
|
walletSession: reownWithSolana,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal,
|
|
3
3
|
buildWithdrawAnalyticsSessionProperties
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-JCETUEEJ.mjs";
|
|
5
|
+
import "./chunk-WGQZ6XCO.mjs";
|
|
6
|
+
import "./chunk-A45ZOIVU.mjs";
|
|
7
|
+
import "./chunk-WESOD2QT.mjs";
|
|
8
8
|
import "./chunk-VUATPOWJ.mjs";
|
|
9
9
|
export {
|
|
10
10
|
WithdrawModal,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkJTXLLGQPcjs = require('./chunk-JTXLLGQP.cjs');
|
|
5
|
+
require('./chunk-KK6NJJEP.cjs');
|
|
6
|
+
require('./chunk-WG55GSCF.cjs');
|
|
7
|
+
require('./chunk-22UBYG4U.cjs');
|
|
8
|
+
require('./chunk-4KCSH4T3.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.WithdrawModal = _chunkJTXLLGQPcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunkJTXLLGQPcjs.buildWithdrawAnalyticsSessionProperties;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/core/version.ts
|
|
2
|
-
var MODAL_VERSION = "0.0.0-dev-
|
|
2
|
+
var MODAL_VERSION = "0.0.0-dev-20260827181712";
|
|
3
3
|
var SERVICE_HEADERS = {
|
|
4
4
|
"Content-Type": "application/json",
|
|
5
5
|
"x-deposit-modal-version": MODAL_VERSION
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
runAccountSetupDeduped,
|
|
20
20
|
txRefsMatch,
|
|
21
21
|
warnRemovedProps
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WGQZ6XCO.mjs";
|
|
23
23
|
import {
|
|
24
24
|
ListRow
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-Q7WBJECA.mjs";
|
|
26
26
|
import {
|
|
27
27
|
AlertTriangleIcon,
|
|
28
28
|
AnalyticsSession,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
useLatestRef,
|
|
89
89
|
useRpcUrls,
|
|
90
90
|
useStableRpcUrls
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-A45ZOIVU.mjs";
|
|
92
92
|
import {
|
|
93
93
|
MULTICALL3_ADDRESS,
|
|
94
94
|
POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
|
|
@@ -2296,7 +2296,7 @@ function DepositNotification({
|
|
|
2296
2296
|
);
|
|
2297
2297
|
const pollIntervalRef = useRef4(INITIAL_POLL_INTERVAL);
|
|
2298
2298
|
const pollTimeoutRef = useRef4(null);
|
|
2299
|
-
const completedRef = useRef4(
|
|
2299
|
+
const completedRef = useRef4(false);
|
|
2300
2300
|
const depositContextRef = useLatestRef({
|
|
2301
2301
|
amount,
|
|
2302
2302
|
sourceChain,
|
|
@@ -5830,17 +5830,19 @@ function failureReasonForCode(code, cause) {
|
|
|
5830
5830
|
const normalized = `${code ?? ""} ${cause ?? ""}`.toLowerCase();
|
|
5831
5831
|
if (normalized.includes("uncertain")) return "submission_uncertain";
|
|
5832
5832
|
if (normalized.includes("reject") && (normalized.includes("sign") || normalized.includes("permit"))) {
|
|
5833
|
-
return "
|
|
5833
|
+
return "wallet_signature_rejected";
|
|
5834
5834
|
}
|
|
5835
|
-
if (normalized.includes("permit"))
|
|
5836
|
-
|
|
5835
|
+
if (normalized.includes("permit")) {
|
|
5836
|
+
return "wallet_permit_preparation_unavailable";
|
|
5837
|
+
}
|
|
5838
|
+
if (normalized.includes("clipboard")) return "transfer_clipboard_failed";
|
|
5837
5839
|
if (normalized.includes("switch") && normalized.includes("reject")) {
|
|
5838
|
-
return "
|
|
5840
|
+
return "wallet_chain_switch_rejected";
|
|
5839
5841
|
}
|
|
5840
5842
|
if (normalized.includes("reject")) return "submission_rejected";
|
|
5841
|
-
if (normalized.includes("switch")) return "
|
|
5843
|
+
if (normalized.includes("switch")) return "wallet_chain_switch_failed";
|
|
5842
5844
|
if (normalized.includes("quote")) return "quote_unavailable";
|
|
5843
|
-
if (normalized.includes("price")) return "
|
|
5845
|
+
if (normalized.includes("price")) return "quote_source_price_unavailable";
|
|
5844
5846
|
if (normalized.includes("iframe_timeout")) return "swapped_iframe_timeout";
|
|
5845
5847
|
if (normalized.includes("connect_exchanges") || normalized.includes("exchange_list")) {
|
|
5846
5848
|
return "exchange_list_failed";
|
|
@@ -5915,15 +5917,14 @@ function createDepositAnalyticsController(emit) {
|
|
|
5915
5917
|
method
|
|
5916
5918
|
);
|
|
5917
5919
|
},
|
|
5918
|
-
friction(reason,
|
|
5920
|
+
friction(reason, eventStep = step ?? void 0) {
|
|
5919
5921
|
if (!eventStep) return;
|
|
5920
5922
|
emitOnce(
|
|
5921
5923
|
`friction:${method}:${eventStep}:${reason}`,
|
|
5922
5924
|
{
|
|
5923
5925
|
type: "deposit_modal_friction",
|
|
5924
5926
|
step: eventStep,
|
|
5925
|
-
reason
|
|
5926
|
-
retryable
|
|
5927
|
+
reason
|
|
5927
5928
|
},
|
|
5928
5929
|
method
|
|
5929
5930
|
);
|
|
@@ -7857,7 +7858,7 @@ function DepositFlow({
|
|
|
7857
7858
|
}, [analytics, analyticsStep]);
|
|
7858
7859
|
useEffect12(() => {
|
|
7859
7860
|
if (setupSlice.status === "loading") {
|
|
7860
|
-
analytics.friction("account_setup_pending",
|
|
7861
|
+
analytics.friction("account_setup_pending", "account_setup");
|
|
7861
7862
|
} else if (setupSlice.status === "error") {
|
|
7862
7863
|
analytics.failure("account_setup_failed", true, "account_setup");
|
|
7863
7864
|
}
|
|
@@ -7993,7 +7994,6 @@ function DepositFlow({
|
|
|
7993
7994
|
if (analytics.method === "asset_migration") {
|
|
7994
7995
|
analytics.friction(
|
|
7995
7996
|
"migration_availability_failed",
|
|
7996
|
-
true,
|
|
7997
7997
|
"migration_provider_selection"
|
|
7998
7998
|
);
|
|
7999
7999
|
}
|
|
@@ -8376,7 +8376,7 @@ function DepositFlow({
|
|
|
8376
8376
|
const showFallback = (reason) => {
|
|
8377
8377
|
if (cancelled || settled) return;
|
|
8378
8378
|
settled = true;
|
|
8379
|
-
analytics.friction(reason,
|
|
8379
|
+
analytics.friction(reason, "fiat_regional_payment_method");
|
|
8380
8380
|
setRegionalMethods({
|
|
8381
8381
|
status: "error",
|
|
8382
8382
|
country: null,
|
|
@@ -8425,13 +8425,11 @@ function DepositFlow({
|
|
|
8425
8425
|
if (cashDisplay.kind === "hidden" && fiatEnabled) {
|
|
8426
8426
|
analytics.friction(
|
|
8427
8427
|
"regional_methods_empty",
|
|
8428
|
-
false,
|
|
8429
8428
|
"fiat_regional_payment_method"
|
|
8430
8429
|
);
|
|
8431
8430
|
} else if (cashDisplay.kind === "list" && cashDisplay.source === "fallback" && !hasConfiguredFiatMethods) {
|
|
8432
8431
|
analytics.friction(
|
|
8433
8432
|
"regional_methods_fallback",
|
|
8434
|
-
true,
|
|
8435
8433
|
"fiat_regional_payment_method"
|
|
8436
8434
|
);
|
|
8437
8435
|
}
|
|
@@ -8856,6 +8854,9 @@ function DepositFlow({
|
|
|
8856
8854
|
const handleDepositComplete = useCallback7(
|
|
8857
8855
|
(txHash, destinationTxHash, context) => {
|
|
8858
8856
|
logFlow("deposit:complete", { txHash, destinationTxHash, ...context });
|
|
8857
|
+
analytics.openStep(
|
|
8858
|
+
analyticsStepForFlowStep(analyticsMethod, "processing")
|
|
8859
|
+
);
|
|
8859
8860
|
analytics.outcome("completed");
|
|
8860
8861
|
onLifecycleRef.current?.({
|
|
8861
8862
|
type: "complete",
|
|
@@ -8864,22 +8865,25 @@ function DepositFlow({
|
|
|
8864
8865
|
...context
|
|
8865
8866
|
});
|
|
8866
8867
|
},
|
|
8867
|
-
[analytics, logFlow, onLifecycleRef]
|
|
8868
|
+
[analytics, analyticsMethod, logFlow, onLifecycleRef]
|
|
8868
8869
|
);
|
|
8869
8870
|
const handleDepositFailed = useCallback7(
|
|
8870
8871
|
(txHash, error) => {
|
|
8871
8872
|
logFlowError("deposit:failed", error, { txHash });
|
|
8873
|
+
analytics.openStep(
|
|
8874
|
+
analyticsStepForFlowStep(analyticsMethod, "processing")
|
|
8875
|
+
);
|
|
8872
8876
|
analytics.outcome("failed");
|
|
8873
8877
|
analytics.failure("processor_failed", false);
|
|
8874
8878
|
onLifecycleRef.current?.({ type: "failed", txHash, error });
|
|
8875
8879
|
},
|
|
8876
|
-
[analytics, logFlowError, onLifecycleRef]
|
|
8880
|
+
[analytics, analyticsMethod, logFlowError, onLifecycleRef]
|
|
8877
8881
|
);
|
|
8878
8882
|
const handleError = useCallback7(
|
|
8879
8883
|
(message, code, cause) => {
|
|
8880
8884
|
logFlowError("flow:error", cause ?? message, { code });
|
|
8881
8885
|
if (code === "PROCESS_TIMEOUT") {
|
|
8882
|
-
analytics.friction("
|
|
8886
|
+
analytics.friction("processor_status_poll_failed");
|
|
8883
8887
|
} else {
|
|
8884
8888
|
const reason = failureReasonForCode(
|
|
8885
8889
|
code,
|
|
@@ -9055,7 +9059,11 @@ function DepositFlow({
|
|
|
9055
9059
|
if (success) {
|
|
9056
9060
|
analytics.completeStep("transfer_copy");
|
|
9057
9061
|
} else {
|
|
9058
|
-
analytics.failure(
|
|
9062
|
+
analytics.failure(
|
|
9063
|
+
"transfer_clipboard_failed",
|
|
9064
|
+
true,
|
|
9065
|
+
"transfer_copy"
|
|
9066
|
+
);
|
|
9059
9067
|
}
|
|
9060
9068
|
},
|
|
9061
9069
|
onReviewDeposit: handleQrReviewRequested,
|
|
@@ -9851,7 +9859,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
9851
9859
|
// src/DepositModal.tsx
|
|
9852
9860
|
import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
9853
9861
|
var ReownDepositInner = lazy2(
|
|
9854
|
-
() => import("./DepositModalReown-
|
|
9862
|
+
() => import("./DepositModalReown-GK5MDJRT.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
9855
9863
|
);
|
|
9856
9864
|
function sortByCreatedAtDesc(items) {
|
|
9857
9865
|
return [...items].sort((a, b) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RecoveryError,
|
|
3
3
|
submitSignedRecovery
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2GP7MZCO.mjs";
|
|
5
5
|
import {
|
|
6
6
|
ListRow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q7WBJECA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
AlertTriangleIcon,
|
|
10
10
|
AnalyticsSession,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
useExplorerTxUrl,
|
|
33
33
|
useLatestRef,
|
|
34
34
|
useStableRpcUrls
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-A45ZOIVU.mjs";
|
|
36
36
|
import {
|
|
37
37
|
getChainIcon,
|
|
38
38
|
getChainName,
|
|
@@ -90,18 +90,18 @@ function claimFailureReasonForError(error) {
|
|
|
90
90
|
case "SIGNATURE_INVALID":
|
|
91
91
|
return "signature_invalid";
|
|
92
92
|
case "DEPOSIT_NOT_RECOVERABLE":
|
|
93
|
-
return "
|
|
93
|
+
return "recovery_deposit_not_recoverable";
|
|
94
94
|
case "RECOVERY_UNSUPPORTED":
|
|
95
95
|
return "recovery_unsupported";
|
|
96
96
|
case "VERIFICATION_UNAVAILABLE":
|
|
97
|
-
return "
|
|
97
|
+
return "signature_verification_unavailable";
|
|
98
98
|
case "REFUND_RECONCILIATION_REQUIRED":
|
|
99
99
|
return "refund_reconciliation_required";
|
|
100
100
|
case "REFUND_FAILED":
|
|
101
101
|
return "refund_failed";
|
|
102
102
|
default:
|
|
103
103
|
if (error.phase === "signature") return "signature_rejected";
|
|
104
|
-
if (error.phase === "request") return "
|
|
104
|
+
if (error.phase === "request") return "refund_service_unreachable";
|
|
105
105
|
return "refund_failed";
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -168,13 +168,12 @@ function createClaimAnalyticsController(emit) {
|
|
|
168
168
|
auto_selected: autoSelected
|
|
169
169
|
});
|
|
170
170
|
},
|
|
171
|
-
friction(reason,
|
|
171
|
+
friction(reason, eventStep = step ?? void 0) {
|
|
172
172
|
if (!eventStep) return;
|
|
173
173
|
emitOnce(`friction:${eventStep}:${reason}`, {
|
|
174
174
|
type: "claim_modal_friction",
|
|
175
175
|
step: eventStep,
|
|
176
|
-
reason
|
|
177
|
-
retryable
|
|
176
|
+
reason
|
|
178
177
|
});
|
|
179
178
|
},
|
|
180
179
|
failure(reason, retryable, eventStep = step ?? void 0) {
|
|
@@ -444,7 +443,7 @@ function ClaimModal({
|
|
|
444
443
|
(source) => {
|
|
445
444
|
const analytics = analyticsControllerRef.current;
|
|
446
445
|
if (state.step === "processing") {
|
|
447
|
-
analytics?.friction("
|
|
446
|
+
analytics?.friction("modal_close_refused_in_flight", "submit");
|
|
448
447
|
return;
|
|
449
448
|
}
|
|
450
449
|
analytics?.abandon("modal_close");
|
|
@@ -661,7 +660,7 @@ function ClaimBody({
|
|
|
661
660
|
if (!deposit) return;
|
|
662
661
|
const sourceChainId = evmChainIdFromCaip2(deposit.chain);
|
|
663
662
|
if (sourceChainId == null || !deposit.id || !deposit.recipient || !deposit.depositAddress || !deposit.token || !deposit.chain) {
|
|
664
|
-
analytics.failure("
|
|
663
|
+
analytics.failure("recovery_deposit_data_incomplete", false, "review");
|
|
665
664
|
analytics.outcome("failed");
|
|
666
665
|
dispatch({
|
|
667
666
|
type: "failed",
|
|
@@ -772,7 +771,7 @@ function LookupStep({
|
|
|
772
771
|
const validTxHash = /^0x[a-fA-F0-9]{64}$/.test(trimmed);
|
|
773
772
|
useEffect(() => {
|
|
774
773
|
if (trimmed.length > 0 && !validTxHash) {
|
|
775
|
-
analytics.friction("
|
|
774
|
+
analytics.friction("lookup_transaction_hash_invalid", "lookup");
|
|
776
775
|
}
|
|
777
776
|
}, [analytics, trimmed, validTxHash]);
|
|
778
777
|
const handleLookup = useCallback(async () => {
|
|
@@ -794,12 +793,12 @@ function LookupStep({
|
|
|
794
793
|
const eligible = deposits.filter(isEligible);
|
|
795
794
|
analytics.lookupResult(deposits.length, eligible.length);
|
|
796
795
|
if (deposits.length === 0) {
|
|
797
|
-
analytics.friction("
|
|
796
|
+
analytics.friction("lookup_no_deposits_found", "lookup");
|
|
798
797
|
setError("No deposits found for this transaction.");
|
|
799
798
|
return;
|
|
800
799
|
}
|
|
801
800
|
if (eligible.length === 0) {
|
|
802
|
-
analytics.friction("
|
|
801
|
+
analytics.friction("lookup_no_eligible_deposits", "lookup");
|
|
803
802
|
setError(
|
|
804
803
|
"This transaction has no failed or rejected deposits available to recover."
|
|
805
804
|
);
|
|
@@ -910,7 +909,7 @@ function ReviewStep({
|
|
|
910
909
|
const destinationValid = isAddress(destination);
|
|
911
910
|
useEffect(() => {
|
|
912
911
|
if (destination.length > 0 && !destinationValid) {
|
|
913
|
-
analytics.friction("
|
|
912
|
+
analytics.friction("refund_destination_invalid", "review");
|
|
914
913
|
}
|
|
915
914
|
}, [analytics, destination, destinationValid]);
|
|
916
915
|
return /* @__PURE__ */ jsxs2("div", { className: "rs-screen", children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWG55GSCFcjs = require('./chunk-WG55GSCF.cjs');
|
|
5
5
|
|
|
6
6
|
// src/components/ui/ListRow.tsx
|
|
7
7
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -19,7 +19,7 @@ function ListRow({
|
|
|
19
19
|
...props
|
|
20
20
|
}) {
|
|
21
21
|
const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
22
|
-
leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
22
|
+
leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWG55GSCFcjs.CdnIcon, { src: leadingMedia }) }) : leading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading", children: leading }) : null,
|
|
23
23
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-body", children: [
|
|
24
24
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-text", children: [
|
|
25
25
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-title", children: title }),
|
|
@@ -39,7 +39,7 @@ function ListRow({
|
|
|
39
39
|
}
|
|
40
40
|
) : meta && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-list-row-meta", children: meta })
|
|
41
41
|
] }),
|
|
42
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( (disabled ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
42
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( (disabled ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWG55GSCFcjs.ChevronRightIcon, {})))) })
|
|
43
43
|
] });
|
|
44
44
|
if (action) {
|
|
45
45
|
const handleKey = (e) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWG55GSCFcjs = require('./chunk-WG55GSCF.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk22UBYG4Ucjs = require('./chunk-22UBYG4U.cjs');
|
|
8
8
|
|
|
9
9
|
// src/core/recovery.ts
|
|
10
10
|
var RECOVER_DOMAIN = {
|
|
@@ -91,7 +91,7 @@ async function submitSignedRecovery(params) {
|
|
|
91
91
|
destination
|
|
92
92
|
});
|
|
93
93
|
} catch (error) {
|
|
94
|
-
|
|
94
|
+
_chunkWG55GSCFcjs.debugError.call(void 0, debug, scope, "signRecovery:failed", error);
|
|
95
95
|
throw new RecoveryError(
|
|
96
96
|
"Signature request was declined. Approve it in your wallet to recover this deposit.",
|
|
97
97
|
0,
|
|
@@ -110,7 +110,7 @@ async function submitSignedRecovery(params) {
|
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
const url = `${backendUrl.replace(/\/$/, "")}/deposits/recover`;
|
|
113
|
-
|
|
113
|
+
_chunkWG55GSCFcjs.debugLog.call(void 0, debug, scope, "submitSignedRecovery:request", {
|
|
114
114
|
url,
|
|
115
115
|
depositId,
|
|
116
116
|
signer
|
|
@@ -122,19 +122,19 @@ async function submitSignedRecovery(params) {
|
|
|
122
122
|
// The shared const, so recovery carries `x-deposit-modal-version` like
|
|
123
123
|
// every other backend call. Without it this path would be invisible in the
|
|
124
124
|
// per-client version telemetry the processor records.
|
|
125
|
-
headers:
|
|
125
|
+
headers: _chunk22UBYG4Ucjs.serviceHeaders.call(void 0, ),
|
|
126
126
|
// `depositId` as a string: it is a uint256 upstream and JSON numbers lose
|
|
127
127
|
// precision well before that range.
|
|
128
128
|
body: JSON.stringify({ depositId, destination, signature })
|
|
129
129
|
});
|
|
130
130
|
} catch (error) {
|
|
131
|
-
|
|
131
|
+
_chunkWG55GSCFcjs.debugError.call(void 0, debug, scope, "submitSignedRecovery:network", error);
|
|
132
132
|
const { message, retryable } = formatRecoveryError(0);
|
|
133
133
|
throw new RecoveryError(message, 0, void 0, retryable, "request");
|
|
134
134
|
}
|
|
135
135
|
if (!response.ok) {
|
|
136
136
|
const body = await response.json().catch(() => ({}));
|
|
137
|
-
|
|
137
|
+
_chunkWG55GSCFcjs.debugError.call(void 0, debug, scope, "submitSignedRecovery:failed", body, {
|
|
138
138
|
status: response.status
|
|
139
139
|
});
|
|
140
140
|
const { message, retryable } = formatRecoveryError(
|
|
@@ -151,7 +151,7 @@ async function submitSignedRecovery(params) {
|
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
153
|
const result = await response.json();
|
|
154
|
-
|
|
154
|
+
_chunkWG55GSCFcjs.debugLog.call(void 0, debug, scope, "submitSignedRecovery:success", {
|
|
155
155
|
transactionHash: result.transactionHash
|
|
156
156
|
});
|
|
157
157
|
return result;
|