@rhinestone/deposit-modal 0.0.0-dev-20260904132032 → 0.0.0-dev-20260907094837
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-PCPNIMQK.cjs → DepositModalReown-F722R2AY.cjs} +16 -16
- package/dist/{DepositModalReown-LDQBHN6I.mjs → DepositModalReown-X63OG2VW.mjs} +3 -3
- package/dist/{WithdrawModal-476TF3UU.mjs → WithdrawModal-3PVTYOBK.mjs} +3 -3
- package/dist/WithdrawModal-N5ELQFJG.cjs +11 -0
- package/dist/{chunk-QEFORQRD.mjs → chunk-FXN3WQSG.mjs} +1 -1
- package/dist/{chunk-JOK4G4CS.mjs → chunk-HEOO64YL.mjs} +2 -2
- package/dist/{chunk-G333CKD7.mjs → chunk-HWIWQPW5.mjs} +38 -19
- package/dist/{chunk-3FJB5LVI.cjs → chunk-KXNQLIQ4.cjs} +70 -51
- package/dist/{chunk-PATQHZJX.cjs → chunk-Q7EMR7LH.cjs} +1 -1
- package/dist/{chunk-HM7CTZ6C.cjs → chunk-RIAZY53A.cjs} +262 -262
- package/dist/{chunk-SIEVO2DP.cjs → chunk-RNVS63WN.cjs} +71 -71
- package/dist/{chunk-INVEUP7A.mjs → chunk-TYO3HW3A.mjs} +1 -1
- 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 +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/embed.cjs +14 -14
- package/dist/embed.d.cts +1 -1
- package/dist/embed.d.ts +1 -1
- package/dist/embed.mjs +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{types-B9SbZQIG.d.ts → types-CZYypODQ.d.ts} +3 -2
- package/dist/{types-SwGGf0eH.d.cts → types-CbUs4boj.d.cts} +3 -2
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +1 -1
- package/dist/WithdrawModal-IZCZMDQJ.cjs +0 -11
|
@@ -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 _chunkRIAZY53Acjs = require('./chunk-RIAZY53A.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -10,8 +10,8 @@ var _chunkHM7CTZ6Ccjs = require('./chunk-HM7CTZ6C.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
13
|
+
var _chunkKXNQLIQ4cjs = require('./chunk-KXNQLIQ4.cjs');
|
|
14
|
+
require('./chunk-Q7EMR7LH.cjs');
|
|
15
15
|
require('./chunk-LVCD6RHF.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
@@ -44,7 +44,7 @@ var {
|
|
|
44
44
|
unichain,
|
|
45
45
|
katana,
|
|
46
46
|
hyperEvm
|
|
47
|
-
} =
|
|
47
|
+
} = _chunkRIAZY53Acjs.getReownDependencies.call(void 0, )[1];
|
|
48
48
|
var APPKIT_NETWORK_BY_ID = {
|
|
49
49
|
[mainnet.id]: mainnet,
|
|
50
50
|
[optimism.id]: optimism,
|
|
@@ -76,7 +76,7 @@ function getAppKitNetwork(chainId) {
|
|
|
76
76
|
|
|
77
77
|
// src/core/reown-theme.ts
|
|
78
78
|
function mapTheme(theme) {
|
|
79
|
-
const themeMode =
|
|
79
|
+
const themeMode = _chunkKXNQLIQ4cjs.resolveThemeMode.call(void 0, _optionalChain([theme, 'optionalAccess', _ => _.mode])) === "light" ? "light" : "dark";
|
|
80
80
|
const themeVariables = {
|
|
81
81
|
"--apkt-accent": _optionalChain([theme, 'optionalAccess', _2 => _2.ctaColor])
|
|
82
82
|
};
|
|
@@ -93,7 +93,7 @@ function setAppKitTheme(appKit, theme) {
|
|
|
93
93
|
|
|
94
94
|
// src/core/reown.tsx
|
|
95
95
|
var _jsxruntime = require('react/jsx-runtime');
|
|
96
|
-
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] =
|
|
96
|
+
var [appKitReact, appKitNetworks, wagmiAdapter, solanaAdapter] = _chunkRIAZY53Acjs.getReownDependencies.call(void 0, );
|
|
97
97
|
var {
|
|
98
98
|
createAppKit,
|
|
99
99
|
useAppKit,
|
|
@@ -109,14 +109,14 @@ function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
|
|
|
109
109
|
const transports = {};
|
|
110
110
|
for (const network of networks) {
|
|
111
111
|
const id = Number(network.id);
|
|
112
|
-
transports[id] = _viem.http.call(void 0,
|
|
112
|
+
transports[id] = _viem.http.call(void 0, _chunkKXNQLIQ4cjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
113
113
|
}
|
|
114
114
|
return transports;
|
|
115
115
|
}
|
|
116
116
|
function getEvmRpcFingerprint(rpcUrls, networks) {
|
|
117
117
|
return networks.map((network) => {
|
|
118
118
|
const id = Number(network.id);
|
|
119
|
-
return `${id}=${_nullishCoalesce(
|
|
119
|
+
return `${id}=${_nullishCoalesce(_chunkKXNQLIQ4cjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
120
120
|
}).join("|");
|
|
121
121
|
}
|
|
122
122
|
var cachedAdapter = null;
|
|
@@ -187,7 +187,7 @@ function ReownWalletProvider({
|
|
|
187
187
|
backendUrl,
|
|
188
188
|
children
|
|
189
189
|
}) {
|
|
190
|
-
const rpcUrls =
|
|
190
|
+
const rpcUrls = _chunkKXNQLIQ4cjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
191
191
|
const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
|
|
192
192
|
const overrides = _react.useMemo.call(void 0, () => {
|
|
193
193
|
if (!rpcUrls) return void 0;
|
|
@@ -199,14 +199,14 @@ function ReownWalletProvider({
|
|
|
199
199
|
return out;
|
|
200
200
|
}, [rpcUrls]);
|
|
201
201
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
202
|
-
const primed =
|
|
202
|
+
const primed = _chunkKXNQLIQ4cjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
203
203
|
return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
|
|
204
204
|
});
|
|
205
205
|
_react.useEffect.call(void 0, () => {
|
|
206
206
|
let active = true;
|
|
207
|
-
const primed =
|
|
207
|
+
const primed = _chunkKXNQLIQ4cjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
208
208
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
209
|
-
|
|
209
|
+
_chunkKXNQLIQ4cjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
|
|
210
210
|
if (active) setState({ ready: true, chains });
|
|
211
211
|
});
|
|
212
212
|
return () => {
|
|
@@ -215,7 +215,7 @@ function ReownWalletProvider({
|
|
|
215
215
|
}, [backendUrl, overrides]);
|
|
216
216
|
_react.useEffect.call(void 0, () => {
|
|
217
217
|
setAppKitTheme(appKitReact.modal, theme);
|
|
218
|
-
return
|
|
218
|
+
return _chunkKXNQLIQ4cjs.followSystemAppearance.call(void 0,
|
|
219
219
|
_optionalChain([theme, 'optionalAccess', _7 => _7.mode]),
|
|
220
220
|
() => setAppKitTheme(appKitReact.modal, theme)
|
|
221
221
|
);
|
|
@@ -279,7 +279,7 @@ function useReownWalletSession() {
|
|
|
279
279
|
await switchChainAsync({ chainId });
|
|
280
280
|
}
|
|
281
281
|
} catch (err) {
|
|
282
|
-
if (
|
|
282
|
+
if (_chunkKXNQLIQ4cjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
283
283
|
throw new Error(
|
|
284
284
|
`Switch to ${chainDisplayName(chainId)} in your wallet to continue`
|
|
285
285
|
);
|
|
@@ -292,7 +292,7 @@ function useReownWalletSession() {
|
|
|
292
292
|
|
|
293
293
|
// src/DepositModalReown.tsx
|
|
294
294
|
|
|
295
|
-
var [appKitReact2, , , , solanaAdapterReact] =
|
|
295
|
+
var [appKitReact2, , , , solanaAdapterReact] = _chunkRIAZY53Acjs.getReownDependencies.call(void 0, );
|
|
296
296
|
var { useAppKitProvider } = appKitReact2;
|
|
297
297
|
var { useAppKitConnection } = solanaAdapterReact;
|
|
298
298
|
function DepositModalWithReown(props) {
|
|
@@ -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
|
+
_chunkRIAZY53Acjs.DepositModalInner,
|
|
318
318
|
{
|
|
319
319
|
...props,
|
|
320
320
|
walletSession: reownWithSolana,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner,
|
|
3
3
|
getReownDependencies
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HEOO64YL.mjs";
|
|
5
5
|
import {
|
|
6
6
|
followSystemAppearance,
|
|
7
7
|
isUnsupportedChainSwitchError,
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
resolveThemeMode,
|
|
11
11
|
rpcUrlFor,
|
|
12
12
|
useStableRpcUrls
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-HWIWQPW5.mjs";
|
|
14
|
+
import "./chunk-TYO3HW3A.mjs";
|
|
15
15
|
import "./chunk-FTWKAJGN.mjs";
|
|
16
16
|
import {
|
|
17
17
|
SUPPORTED_CHAIN_IDS,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal,
|
|
3
3
|
buildWithdrawAnalyticsSessionProperties
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-FXN3WQSG.mjs";
|
|
5
|
+
import "./chunk-HWIWQPW5.mjs";
|
|
6
|
+
import "./chunk-TYO3HW3A.mjs";
|
|
7
7
|
import "./chunk-EAGMY3QE.mjs";
|
|
8
8
|
export {
|
|
9
9
|
WithdrawModal,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkRNVS63WNcjs = require('./chunk-RNVS63WN.cjs');
|
|
5
|
+
require('./chunk-KXNQLIQ4.cjs');
|
|
6
|
+
require('./chunk-Q7EMR7LH.cjs');
|
|
7
|
+
require('./chunk-OY5N3E6L.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.WithdrawModal = _chunkRNVS63WNcjs.WithdrawModal; exports.buildWithdrawAnalyticsSessionProperties = _chunkRNVS63WNcjs.buildWithdrawAnalyticsSessionProperties;
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
useRpcUrls,
|
|
88
88
|
useStableRpcUrls,
|
|
89
89
|
warnRemovedProps
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-HWIWQPW5.mjs";
|
|
91
91
|
import {
|
|
92
92
|
MULTICALL3_ADDRESS,
|
|
93
93
|
POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
|
|
@@ -9646,7 +9646,7 @@ function DepositFlow({
|
|
|
9646
9646
|
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
9647
9647
|
var ReownDepositInner = lazy2(async () => {
|
|
9648
9648
|
await loadReownDependencies();
|
|
9649
|
-
const module = await import("./DepositModalReown-
|
|
9649
|
+
const module = await import("./DepositModalReown-X63OG2VW.mjs");
|
|
9650
9650
|
return { default: module.DepositModalReown };
|
|
9651
9651
|
});
|
|
9652
9652
|
function buildDepositAnalyticsSessionProperties({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MODAL_VERSION,
|
|
3
3
|
serviceHeaders
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TYO3HW3A.mjs";
|
|
5
5
|
import {
|
|
6
6
|
CHAIN_DISPLAY_ORDER,
|
|
7
7
|
HYPERCORE_CHAIN_ID,
|
|
@@ -3011,17 +3011,38 @@ function recoveryFailureCause(sourceChainName) {
|
|
|
3011
3011
|
}
|
|
3012
3012
|
|
|
3013
3013
|
// src/core/history-status.ts
|
|
3014
|
-
|
|
3014
|
+
var UNKNOWN = ["pending", false, []];
|
|
3015
|
+
var STATUS_FACTS = [
|
|
3016
|
+
// `delayed` is held up but still coming on the corridor's schedule.
|
|
3017
|
+
["pending", true, ["pending", "delayed"]],
|
|
3018
|
+
// Nothing emits `submitted` or `bridging`; they are here so the badge and
|
|
3019
|
+
// the arrival line cannot diverge should a row ever carry them.
|
|
3020
|
+
["processing", true, ["processing", "submitted", "bridging"]],
|
|
3021
|
+
["completed", false, ["completed", "complete", "bridge-complete", "processed"]],
|
|
3022
|
+
// `rejected` is recoverable upstream exactly like `failed`, so it must not
|
|
3023
|
+
// read as Pending — a row offering recovery would otherwise claim to still
|
|
3024
|
+
// be on its way.
|
|
3025
|
+
["failed", false, ["failed", "error", "bridge-failed", "rejected"]],
|
|
3026
|
+
// Where a recovered deposit lands. Terminal and not recoverable again.
|
|
3027
|
+
["refunded", false, ["refunded"]],
|
|
3028
|
+
// These read Pending but are not arriving: the deposit is bound for a refund
|
|
3029
|
+
// or for manual reconciliation rather than for the recipient, so an arrival
|
|
3030
|
+
// expectation would be a claim about a corridor it never enters.
|
|
3031
|
+
["pending", false, ["ignored", "expecting_refund", "reconciliation_required"]]
|
|
3032
|
+
];
|
|
3033
|
+
function lookup(raw) {
|
|
3015
3034
|
const lower = raw.toLowerCase();
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3035
|
+
return STATUS_FACTS.find((facts) => facts[2].includes(lower)) ?? UNKNOWN;
|
|
3036
|
+
}
|
|
3037
|
+
function normalizeStatus(raw, isSpam) {
|
|
3038
|
+
const [badge] = lookup(raw);
|
|
3039
|
+
return isSpam && badge === "failed" ? "spam" : badge;
|
|
3040
|
+
}
|
|
3041
|
+
function isInFlight(status) {
|
|
3042
|
+
return status === "pending" || status === "processing";
|
|
3043
|
+
}
|
|
3044
|
+
function expectsArrival(raw) {
|
|
3045
|
+
return lookup(raw)[1];
|
|
3025
3046
|
}
|
|
3026
3047
|
var STATUS_LABEL = {
|
|
3027
3048
|
pending: "Pending",
|
|
@@ -3049,10 +3070,9 @@ function deriveHistoryBadge(deposits, { recipient, canRecover }) {
|
|
|
3049
3070
|
).length;
|
|
3050
3071
|
if (needsYou > 0) return { state: "needs-you", count: needsYou };
|
|
3051
3072
|
}
|
|
3052
|
-
const inProgress = visible.filter(
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
}).length;
|
|
3073
|
+
const inProgress = visible.filter(
|
|
3074
|
+
(row) => isInFlight(normalizeStatus(row.status, row.isSpam))
|
|
3075
|
+
).length;
|
|
3056
3076
|
if (inProgress > 0) return { state: "progress", count: inProgress };
|
|
3057
3077
|
return null;
|
|
3058
3078
|
}
|
|
@@ -3428,14 +3448,13 @@ function advancePendingTimingState(previous, next) {
|
|
|
3428
3448
|
}
|
|
3429
3449
|
|
|
3430
3450
|
// src/core/history-timing.ts
|
|
3431
|
-
var TIMED_HISTORY_STATUSES = /* @__PURE__ */ new Set(["pending", "processing", "delayed"]);
|
|
3432
3451
|
function resolveHistoryTiming({
|
|
3433
3452
|
status,
|
|
3434
3453
|
timing,
|
|
3435
3454
|
createdAt,
|
|
3436
3455
|
nowMs
|
|
3437
3456
|
}) {
|
|
3438
|
-
if (!
|
|
3457
|
+
if (!expectsArrival(status) || !timing || !createdAt) {
|
|
3439
3458
|
return void 0;
|
|
3440
3459
|
}
|
|
3441
3460
|
const createdAtMs = Date.parse(createdAt);
|
|
@@ -4707,7 +4726,7 @@ function HistoryFallbackFlow({
|
|
|
4707
4726
|
},
|
|
4708
4727
|
[analytics]
|
|
4709
4728
|
);
|
|
4710
|
-
const
|
|
4729
|
+
const lookup2 = useCallback4(
|
|
4711
4730
|
async (txHash) => {
|
|
4712
4731
|
const epoch = epochRef.current;
|
|
4713
4732
|
const isCurrentLookup = () => epochRef.current === epoch;
|
|
@@ -4837,7 +4856,7 @@ function HistoryFallbackFlow({
|
|
|
4837
4856
|
hint: "The transaction hash from the wallet or exchange you sent from.",
|
|
4838
4857
|
loading,
|
|
4839
4858
|
error,
|
|
4840
|
-
onSubmit:
|
|
4859
|
+
onSubmit: lookup2,
|
|
4841
4860
|
onInvalid: () => analytics.friction("lookup_transaction_hash_invalid", "lookup")
|
|
4842
4861
|
}
|
|
4843
4862
|
)
|