@rhinestone/deposit-modal 0.0.0-dev-20260902162507 → 0.0.0-dev-20260902191610
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/ClaimModal-3TUB275D.cjs +11 -0
- package/dist/{ClaimModal-Q7GCAKZY.mjs → ClaimModal-BA76ATTU.mjs} +3 -3
- package/dist/{DepositModalReown-7YVP3QN4.mjs → DepositModalReown-D2ICLRCT.mjs} +4 -4
- package/dist/{DepositModalReown-MCLDIPMR.cjs → DepositModalReown-IV462TIG.cjs} +17 -17
- package/dist/{WithdrawModal-HD26VDR3.mjs → WithdrawModal-27BX6NWO.mjs} +4 -4
- package/dist/WithdrawModal-YVA7N4HF.cjs +12 -0
- package/dist/{chunk-VH6CUSWV.mjs → chunk-33BA2DC4.mjs} +1 -1
- package/dist/{chunk-D4OYOKTM.cjs → chunk-5VD4YQZD.cjs} +41 -41
- package/dist/{chunk-CN6ZMFAR.cjs → chunk-7RXDQFGR.cjs} +33 -33
- package/dist/{chunk-27ITTY4Z.mjs → chunk-GU5NK7DZ.mjs} +1 -1
- package/dist/{chunk-JADEZHNK.mjs → chunk-IBX3EYLV.mjs} +1 -1
- package/dist/{chunk-ENCVUQXF.cjs → chunk-IU7FW2EF.cjs} +118 -118
- package/dist/{chunk-7MR4ZT4V.mjs → chunk-JMOX5YQ6.mjs} +3 -3
- package/dist/{chunk-U27BRRE5.mjs → chunk-KU2SGJIS.mjs} +2 -2
- package/dist/{chunk-7P2GGJFH.cjs → chunk-OTULTMYG.cjs} +261 -261
- package/dist/{chunk-BJRDGVUT.mjs → chunk-VME7YMLI.mjs} +1 -1
- package/dist/{chunk-DSXOWFG6.cjs → chunk-W6ZE7BKL.cjs} +72 -72
- package/dist/{chunk-UZF3KMHH.cjs → chunk-YNVSHUSV.cjs} +1 -1
- package/dist/claim.cjs +4 -4
- package/dist/claim.mjs +3 -3
- 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 +5 -5
- package/dist/deposit.mjs +4 -4
- package/dist/embed.cjs +16 -16
- package/dist/embed.mjs +6 -6
- package/dist/index.cjs +7 -7
- package/dist/index.mjs +6 -6
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
- package/dist/ClaimModal-EQFWLZWZ.cjs +0 -11
- package/dist/WithdrawModal-CZ4YRI4T.cjs +0 -12
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk5VD4YQZDcjs = require('./chunk-5VD4YQZD.cjs');
|
|
5
|
+
require('./chunk-7RXDQFGR.cjs');
|
|
6
|
+
require('./chunk-YNVSHUSV.cjs');
|
|
7
|
+
require('./chunk-OY5N3E6L.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.ClaimModal = _chunk5VD4YQZDcjs.ClaimModal; exports.buildClaimAnalyticsSessionProperties = _chunk5VD4YQZDcjs.buildClaimAnalyticsSessionProperties;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClaimModal,
|
|
3
3
|
buildClaimAnalyticsSessionProperties
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-GU5NK7DZ.mjs";
|
|
5
|
+
import "./chunk-VME7YMLI.mjs";
|
|
6
|
+
import "./chunk-33BA2DC4.mjs";
|
|
7
7
|
import "./chunk-EAGMY3QE.mjs";
|
|
8
8
|
export {
|
|
9
9
|
ClaimModal,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner,
|
|
3
3
|
getReownDependencies
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-JMOX5YQ6.mjs";
|
|
5
|
+
import "./chunk-IBX3EYLV.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-VME7YMLI.mjs";
|
|
15
|
+
import "./chunk-33BA2DC4.mjs";
|
|
16
16
|
import "./chunk-FTWKAJGN.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
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkOTULTMYGcjs = require('./chunk-OTULTMYG.cjs');
|
|
5
|
+
require('./chunk-IU7FW2EF.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,8 +11,8 @@ require('./chunk-ENCVUQXF.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
require('./chunk-
|
|
14
|
+
var _chunk7RXDQFGRcjs = require('./chunk-7RXDQFGR.cjs');
|
|
15
|
+
require('./chunk-YNVSHUSV.cjs');
|
|
16
16
|
require('./chunk-LVCD6RHF.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
@@ -45,7 +45,7 @@ var {
|
|
|
45
45
|
unichain,
|
|
46
46
|
katana,
|
|
47
47
|
hyperEvm
|
|
48
|
-
} =
|
|
48
|
+
} = _chunkOTULTMYGcjs.getReownDependencies.call(void 0, )[1];
|
|
49
49
|
var APPKIT_NETWORK_BY_ID = {
|
|
50
50
|
[mainnet.id]: mainnet,
|
|
51
51
|
[optimism.id]: optimism,
|
|
@@ -77,7 +77,7 @@ function getAppKitNetwork(chainId) {
|
|
|
77
77
|
|
|
78
78
|
// src/core/reown-theme.ts
|
|
79
79
|
function mapTheme(theme) {
|
|
80
|
-
const themeMode =
|
|
80
|
+
const themeMode = _chunk7RXDQFGRcjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
|
|
81
81
|
const themeVariables = {
|
|
82
82
|
"--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
|
|
83
83
|
};
|
|
@@ -94,7 +94,7 @@ function setAppKitTheme(appKit, theme) {
|
|
|
94
94
|
|
|
95
95
|
// src/core/reown.tsx
|
|
96
96
|
var _jsxruntime = require('react/jsx-runtime');
|
|
97
|
-
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] =
|
|
97
|
+
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkOTULTMYGcjs.getReownDependencies.call(void 0, );
|
|
98
98
|
var {
|
|
99
99
|
createAppKit,
|
|
100
100
|
useAppKit,
|
|
@@ -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, _chunk7RXDQFGRcjs.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(_chunk7RXDQFGRcjs.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 = _chunk7RXDQFGRcjs.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 = _chunk7RXDQFGRcjs.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 = _chunk7RXDQFGRcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
209
209
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
210
|
-
|
|
210
|
+
_chunk7RXDQFGRcjs.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(appKitReact.modal, theme);
|
|
219
|
-
return
|
|
219
|
+
return _chunk7RXDQFGRcjs.followSystemAppearance.call(void 0,
|
|
220
220
|
_optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
|
|
221
221
|
() => setAppKitTheme(appKitReact.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 (_chunk7RXDQFGRcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
284
284
|
throw new Error(
|
|
285
285
|
`Switch to ${chainDisplayName(chainId)} in your wallet to continue`
|
|
286
286
|
);
|
|
@@ -293,7 +293,7 @@ function useReownWalletSession() {
|
|
|
293
293
|
|
|
294
294
|
// src/DepositModalReown.tsx
|
|
295
295
|
|
|
296
|
-
var [appKitReact2, , , , solanaAdapterReact] =
|
|
296
|
+
var [appKitReact2, , , , solanaAdapterReact] = _chunkOTULTMYGcjs.getReownDependencies.call(void 0, );
|
|
297
297
|
var { useAppKitProvider } = appKitReact2;
|
|
298
298
|
var { useAppKitConnection } = solanaAdapterReact;
|
|
299
299
|
function DepositModalWithReown(props) {
|
|
@@ -315,7 +315,7 @@ function DepositModalWithReown(props) {
|
|
|
315
315
|
reown.disconnect();
|
|
316
316
|
}, [reown.disconnect]);
|
|
317
317
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
318
|
-
|
|
318
|
+
_chunkOTULTMYGcjs.DepositModalInner,
|
|
319
319
|
{
|
|
320
320
|
...props,
|
|
321
321
|
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-KU2SGJIS.mjs";
|
|
5
|
+
import "./chunk-IBX3EYLV.mjs";
|
|
6
|
+
import "./chunk-VME7YMLI.mjs";
|
|
7
|
+
import "./chunk-33BA2DC4.mjs";
|
|
8
8
|
import "./chunk-EAGMY3QE.mjs";
|
|
9
9
|
export {
|
|
10
10
|
WithdrawModal,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkW6ZE7BKLcjs = require('./chunk-W6ZE7BKL.cjs');
|
|
5
|
+
require('./chunk-IU7FW2EF.cjs');
|
|
6
|
+
require('./chunk-7RXDQFGR.cjs');
|
|
7
|
+
require('./chunk-YNVSHUSV.cjs');
|
|
8
|
+
require('./chunk-OY5N3E6L.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.WithdrawModal = _chunkW6ZE7BKLcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunkW6ZE7BKLcjs.buildWithdrawAnalyticsSessionProperties;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunk7RXDQFGRcjs = require('./chunk-7RXDQFGR.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -55,13 +55,13 @@ function evmChainIdFromCaip2(chain) {
|
|
|
55
55
|
return Number.isFinite(id) ? id : null;
|
|
56
56
|
}
|
|
57
57
|
function isEligible(row) {
|
|
58
|
-
return
|
|
58
|
+
return _chunk7RXDQFGRcjs.toRecoverableDeposit.call(void 0, row) !== null;
|
|
59
59
|
}
|
|
60
60
|
function describeDeposit(row) {
|
|
61
61
|
const chainId = _nullishCoalesce(evmChainIdFromCaip2(row.chain), () => ( 0));
|
|
62
62
|
return {
|
|
63
63
|
chainId,
|
|
64
|
-
...
|
|
64
|
+
..._chunk7RXDQFGRcjs.describeRecoveryDeposit.call(void 0, {
|
|
65
65
|
chainId,
|
|
66
66
|
token: row.token,
|
|
67
67
|
amountRaw: _nullishCoalesce(row.sourceAmount, () => ( row.amount))
|
|
@@ -177,17 +177,17 @@ function ClaimModal({
|
|
|
177
177
|
debug,
|
|
178
178
|
onUiState
|
|
179
179
|
}) {
|
|
180
|
-
|
|
180
|
+
_chunk7RXDQFGRcjs.checkBackendUrl.call(void 0, "ClaimModal", backendUrl);
|
|
181
181
|
const modalRef = _react.useRef.call(void 0, null);
|
|
182
|
-
const onReadyRef =
|
|
183
|
-
const onLifecycleRef =
|
|
184
|
-
const onErrorRef =
|
|
182
|
+
const onReadyRef = _chunk7RXDQFGRcjs.useLatestRef.call(void 0, onReady);
|
|
183
|
+
const onLifecycleRef = _chunk7RXDQFGRcjs.useLatestRef.call(void 0, onLifecycle);
|
|
184
|
+
const onErrorRef = _chunk7RXDQFGRcjs.useLatestRef.call(void 0, onError);
|
|
185
185
|
const analyticsControllerRef = _react.useRef.call(void 0, null);
|
|
186
186
|
const lastSubmitFailureRef = _react.useRef.call(void 0, null);
|
|
187
187
|
const previousOpenRef = _react.useRef.call(void 0, isOpen);
|
|
188
|
-
const rpcUrls =
|
|
188
|
+
const rpcUrls = _chunk7RXDQFGRcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
189
189
|
const service = _react.useMemo.call(void 0,
|
|
190
|
-
() =>
|
|
190
|
+
() => _chunk7RXDQFGRcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:claim" }),
|
|
191
191
|
[backendUrl, debug]
|
|
192
192
|
);
|
|
193
193
|
const [state, dispatch] = _react.useReducer.call(void 0, claimReducer, INITIAL_STATE);
|
|
@@ -196,7 +196,7 @@ function ClaimModal({
|
|
|
196
196
|
isOpenRef.current = isOpen;
|
|
197
197
|
_react.useEffect.call(void 0, () => {
|
|
198
198
|
if (!isOpen || !modalRef.current) return;
|
|
199
|
-
return
|
|
199
|
+
return _chunk7RXDQFGRcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
200
200
|
}, [isOpen, theme]);
|
|
201
201
|
_react.useEffect.call(void 0, () => {
|
|
202
202
|
if (isOpen) {
|
|
@@ -255,7 +255,7 @@ function ClaimModal({
|
|
|
255
255
|
dispatch({ type: "back" });
|
|
256
256
|
}, [state.step]);
|
|
257
257
|
const canGoBack = state.step === "select" || state.step === "review" || state.step === "failed";
|
|
258
|
-
const onUiStateRef =
|
|
258
|
+
const onUiStateRef = _chunk7RXDQFGRcjs.useLatestRef.call(void 0, onUiState);
|
|
259
259
|
_react.useEffect.call(void 0, () => {
|
|
260
260
|
_optionalChain([onUiStateRef, 'access', _22 => _22.current, 'optionalCall', _23 => _23({
|
|
261
261
|
screen: state.step,
|
|
@@ -264,8 +264,8 @@ function ClaimModal({
|
|
|
264
264
|
})]);
|
|
265
265
|
}, [state.step, canGoBack, goBack, onUiStateRef]);
|
|
266
266
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _24 => _24.showBackButton]), () => ( true));
|
|
267
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
268
|
-
|
|
267
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
268
|
+
_chunk7RXDQFGRcjs.Modal,
|
|
269
269
|
{
|
|
270
270
|
isOpen,
|
|
271
271
|
onClose: handleModalDismiss,
|
|
@@ -274,7 +274,7 @@ function ClaimModal({
|
|
|
274
274
|
closeOnOverlayClick,
|
|
275
275
|
ariaLabel: "Claim your deposit",
|
|
276
276
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
277
|
-
|
|
277
|
+
_chunk7RXDQFGRcjs.AnalyticsSession,
|
|
278
278
|
{
|
|
279
279
|
modal: "claim",
|
|
280
280
|
sessionProperties: buildClaimAnalyticsSessionProperties({
|
|
@@ -288,7 +288,7 @@ function ClaimModal({
|
|
|
288
288
|
enableIngest: enableAnalyticsIngest,
|
|
289
289
|
ingestUrl: analyticsIngestUrl,
|
|
290
290
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
291
|
-
|
|
291
|
+
_chunk7RXDQFGRcjs.ClaimAnalyticsControllerProvider,
|
|
292
292
|
{
|
|
293
293
|
controllerRef: analyticsControllerRef,
|
|
294
294
|
correlation: STANDALONE_CORRELATION,
|
|
@@ -301,7 +301,7 @@ function ClaimModal({
|
|
|
301
301
|
className: "rs-modal-header-back",
|
|
302
302
|
"aria-label": "Go back",
|
|
303
303
|
onClick: goBack,
|
|
304
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
304
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.ChevronLeftIcon, {})
|
|
305
305
|
}
|
|
306
306
|
) }),
|
|
307
307
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -312,7 +312,7 @@ function ClaimModal({
|
|
|
312
312
|
disabled: state.step === "processing",
|
|
313
313
|
className: "rs-modal-close",
|
|
314
314
|
"aria-label": "Close",
|
|
315
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
315
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.CloseIcon, {})
|
|
316
316
|
}
|
|
317
317
|
) })
|
|
318
318
|
] }),
|
|
@@ -361,7 +361,7 @@ function ClaimBody({
|
|
|
361
361
|
onLifecycleRef,
|
|
362
362
|
onErrorRef
|
|
363
363
|
}) {
|
|
364
|
-
const analytics =
|
|
364
|
+
const analytics = _chunk7RXDQFGRcjs.useClaimAnalyticsController.call(void 0, );
|
|
365
365
|
_react.useEffect.call(void 0, () => {
|
|
366
366
|
analytics.openSession();
|
|
367
367
|
analytics.openStep(analyticsStepForClaimStep(state.step));
|
|
@@ -445,7 +445,7 @@ function ClaimBody({
|
|
|
445
445
|
const deposit = state.selected;
|
|
446
446
|
if (!deposit) return;
|
|
447
447
|
const sourceChainId = evmChainIdFromCaip2(deposit.chain);
|
|
448
|
-
const signingChainId =
|
|
448
|
+
const signingChainId = _chunk7RXDQFGRcjs.recoverySigningChainId.call(void 0, deposit);
|
|
449
449
|
if (sourceChainId == null || signingChainId == null || !deposit.id || !deposit.recipient || !deposit.depositAddress || !deposit.token || !deposit.chain) {
|
|
450
450
|
analytics.failure("recovery_deposit_data_incomplete", false, "review");
|
|
451
451
|
analytics.outcome("failed");
|
|
@@ -474,7 +474,7 @@ function ClaimBody({
|
|
|
474
474
|
chain: sourceChainId
|
|
475
475
|
})]);
|
|
476
476
|
try {
|
|
477
|
-
const result = await
|
|
477
|
+
const result = await _chunk7RXDQFGRcjs.submitSignedRecovery.call(void 0, {
|
|
478
478
|
backendUrl,
|
|
479
479
|
chainId: signingChainId,
|
|
480
480
|
depositId: deposit.id,
|
|
@@ -490,7 +490,7 @@ function ClaimBody({
|
|
|
490
490
|
const refundedRaw = BigInt(
|
|
491
491
|
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(result.amount, () => ( deposit.sourceAmount)), () => ( deposit.amount)), () => ( "0"))
|
|
492
492
|
);
|
|
493
|
-
const amountDisplay = _nullishCoalesce(
|
|
493
|
+
const amountDisplay = _nullishCoalesce(_chunk7RXDQFGRcjs.formatTokenAmount.call(void 0, Number(_viem.formatUnits.call(void 0, refundedRaw, decimals)), symbol), () => ( _viem.formatUnits.call(void 0, refundedRaw, decimals)));
|
|
494
494
|
dispatch({
|
|
495
495
|
type: "complete",
|
|
496
496
|
txHash: result.transactionHash,
|
|
@@ -521,9 +521,9 @@ function ClaimBody({
|
|
|
521
521
|
})]);
|
|
522
522
|
} catch (err) {
|
|
523
523
|
if (!isCurrentOperation()) return;
|
|
524
|
-
const recoveryError = err instanceof
|
|
524
|
+
const recoveryError = err instanceof _chunk7RXDQFGRcjs.RecoveryError ? err : void 0;
|
|
525
525
|
const status = _optionalChain([recoveryError, 'optionalAccess', _29 => _29.status]);
|
|
526
|
-
const message = _nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess', _30 => _30.message]), () => (
|
|
526
|
+
const message = _nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess', _30 => _30.message]), () => ( _chunk7RXDQFGRcjs.formatUserError.call(void 0,
|
|
527
527
|
err instanceof Error ? err.message : "Recovery failed"
|
|
528
528
|
)));
|
|
529
529
|
const retryable = _nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess', _31 => _31.retryable]), () => ( true));
|
|
@@ -532,7 +532,7 @@ function ClaimBody({
|
|
|
532
532
|
error: message,
|
|
533
533
|
retryable
|
|
534
534
|
});
|
|
535
|
-
const reason =
|
|
535
|
+
const reason = _chunk7RXDQFGRcjs.claimFailureReasonForError.call(void 0, err);
|
|
536
536
|
lastSubmitFailureRef.current = { reason, retryable };
|
|
537
537
|
analytics.failure(reason, retryable, "submit");
|
|
538
538
|
analytics.outcome("failed");
|
|
@@ -550,7 +550,7 @@ function LookupStep({
|
|
|
550
550
|
onLifecycleRef,
|
|
551
551
|
onErrorRef
|
|
552
552
|
}) {
|
|
553
|
-
const analytics =
|
|
553
|
+
const analytics = _chunk7RXDQFGRcjs.useClaimAnalyticsController.call(void 0, );
|
|
554
554
|
const [loading, setLoading] = _react.useState.call(void 0, false);
|
|
555
555
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
556
556
|
const handleLookup = _react.useCallback.call(void 0,
|
|
@@ -568,20 +568,20 @@ function LookupStep({
|
|
|
568
568
|
txHash,
|
|
569
569
|
matches: deposits.length
|
|
570
570
|
})]);
|
|
571
|
-
const { eligible, miss } =
|
|
571
|
+
const { eligible, miss } = _chunk7RXDQFGRcjs.classifyRecoveryLookup.call(void 0, deposits);
|
|
572
572
|
analytics.lookupResult(deposits.length, eligible.length);
|
|
573
573
|
if (miss) {
|
|
574
574
|
analytics.friction(
|
|
575
575
|
miss === "not_found" ? "lookup_no_deposits_found" : "lookup_no_eligible_deposits",
|
|
576
576
|
"lookup"
|
|
577
577
|
);
|
|
578
|
-
setError(
|
|
578
|
+
setError(_chunk7RXDQFGRcjs.RECOVERY_LOOKUP_MISS_COPY[miss]);
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
581
|
onResults(deposits);
|
|
582
582
|
} catch (err) {
|
|
583
583
|
if (!isCurrentOperation()) return;
|
|
584
|
-
const message =
|
|
584
|
+
const message = _chunk7RXDQFGRcjs.formatUserError.call(void 0,
|
|
585
585
|
err instanceof Error ? err.message : "Lookup failed"
|
|
586
586
|
);
|
|
587
587
|
analytics.failure("lookup_failed", true, "lookup");
|
|
@@ -602,7 +602,7 @@ function LookupStep({
|
|
|
602
602
|
]
|
|
603
603
|
);
|
|
604
604
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
605
|
-
|
|
605
|
+
_chunk7RXDQFGRcjs.RecoveryLookupScreen,
|
|
606
606
|
{
|
|
607
607
|
title: "Claim a deposit",
|
|
608
608
|
subtitle: "Get funds from a failed deposit sent back to you on the source chain.",
|
|
@@ -621,9 +621,9 @@ function SelectStep({
|
|
|
621
621
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
622
622
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
623
623
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
624
|
-
|
|
624
|
+
_chunk7RXDQFGRcjs.BodyHeader,
|
|
625
625
|
{
|
|
626
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
626
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.CoinsIcon, {}),
|
|
627
627
|
title: "Select a deposit",
|
|
628
628
|
subtitle: "This transaction produced multiple deposits. Choose the one to claim."
|
|
629
629
|
}
|
|
@@ -632,7 +632,7 @@ function SelectStep({
|
|
|
632
632
|
const { symbol, amount, chainName } = describeDeposit(row);
|
|
633
633
|
const eligible = isEligible(row);
|
|
634
634
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
635
|
-
|
|
635
|
+
_chunk7RXDQFGRcjs.ListRow,
|
|
636
636
|
{
|
|
637
637
|
leadingMedia: _chunkOY5N3E6Lcjs.tokenIconUrl.call(void 0, symbol),
|
|
638
638
|
title: `${amount} ${symbol}`,
|
|
@@ -645,7 +645,7 @@ function SelectStep({
|
|
|
645
645
|
);
|
|
646
646
|
}) })
|
|
647
647
|
] }),
|
|
648
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
648
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.PoweredBy, {})
|
|
649
649
|
] });
|
|
650
650
|
}
|
|
651
651
|
function ReviewStep({
|
|
@@ -654,14 +654,14 @@ function ReviewStep({
|
|
|
654
654
|
defaultRefundDestination,
|
|
655
655
|
onSubmit
|
|
656
656
|
}) {
|
|
657
|
-
const analytics =
|
|
657
|
+
const analytics = _chunk7RXDQFGRcjs.useClaimAnalyticsController.call(void 0, );
|
|
658
658
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
659
|
-
|
|
659
|
+
_chunk7RXDQFGRcjs.RecoveryReviewScreen,
|
|
660
660
|
{
|
|
661
661
|
chainId: _nullishCoalesce(evmChainIdFromCaip2(deposit.chain), () => ( 0)),
|
|
662
662
|
token: deposit.token,
|
|
663
663
|
amountRaw: _nullishCoalesce(deposit.sourceAmount, () => ( deposit.amount)),
|
|
664
|
-
txHash:
|
|
664
|
+
txHash: _chunk7RXDQFGRcjs.sourceDepositTxHash.call(void 0, deposit),
|
|
665
665
|
defaultDestination: defaultRefundDestination,
|
|
666
666
|
submitting,
|
|
667
667
|
onSubmit,
|
|
@@ -677,7 +677,7 @@ function ResultStep({
|
|
|
677
677
|
onRetry
|
|
678
678
|
}) {
|
|
679
679
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
680
|
-
|
|
680
|
+
_chunk7RXDQFGRcjs.RecoveryOutcomeScreen,
|
|
681
681
|
{
|
|
682
682
|
result: result ? {
|
|
683
683
|
amountDisplay: result.amountDisplay,
|
|
@@ -688,11 +688,11 @@ function ResultStep({
|
|
|
688
688
|
} : null,
|
|
689
689
|
error,
|
|
690
690
|
children: result ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
691
|
-
onReset && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
692
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
691
|
+
onReset && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.Button, { variant: "outline", onClick: onReset, fullWidth: true, children: "Claim another deposit" }),
|
|
692
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
693
693
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
694
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
695
|
-
onRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
694
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
|
|
695
|
+
onRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7RXDQFGRcjs.Button, { onClick: onRetry, fullWidth: true, children: "Try again" })
|
|
696
696
|
] })
|
|
697
697
|
}
|
|
698
698
|
);
|