@rhinestone/deposit-modal 0.0.0-dev-20260824102421 → 0.0.0-dev-20260824103554
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-67RRFPT6.mjs +11 -0
- package/dist/ClaimModal-BQY6FNSR.cjs +11 -0
- package/dist/{DepositModalReown-NLX5RI5H.cjs → DepositModalReown-JJC37VCL.cjs} +13 -13
- package/dist/{DepositModalReown-H256XXZT.mjs → DepositModalReown-TNWNENGT.mjs} +5 -5
- package/dist/WithdrawModal-NZ2UIRL4.mjs +10 -0
- package/dist/WithdrawModal-X5KJ7D3B.cjs +10 -0
- package/dist/{chunk-7T7A3HXD.mjs → chunk-2EEULN4S.mjs} +1 -1
- package/dist/{chunk-SKWJXO3D.mjs → chunk-3MKUEORL.mjs} +1 -1
- package/dist/{chunk-L34PO37U.cjs → chunk-7ED22CNI.cjs} +1 -1
- package/dist/{chunk-VM2L2V3I.mjs → chunk-AWHML72E.mjs} +34 -2
- package/dist/{chunk-XQK6YFM3.cjs → chunk-DYZHRL5G.cjs} +59 -27
- package/dist/{chunk-JCPXPKQF.mjs → chunk-GB42DI7E.mjs} +4 -7
- package/dist/{chunk-TC4A43XZ.mjs → chunk-HCIREEDB.mjs} +4 -4
- package/dist/{chunk-K3G2ZE6R.mjs → chunk-HNBS5S5Y.mjs} +3 -3
- package/dist/{chunk-MJAZGEPN.mjs → chunk-IXZB2YKS.mjs} +2 -2
- package/dist/{chunk-454HYIJG.cjs → chunk-NXN7DD7N.cjs} +268 -268
- package/dist/{chunk-BGDYOQRX.cjs → chunk-OMFYDYOZ.cjs} +8 -8
- package/dist/{chunk-63UHZ7WR.cjs → chunk-RDFRXBJ5.cjs} +51 -51
- package/dist/{chunk-FWGLI5Z7.cjs → chunk-RLGIGVQV.cjs} +66 -66
- package/dist/{chunk-WRZRH2CI.mjs → chunk-RSZSFKN7.mjs} +1 -1
- package/dist/{chunk-XZVBHCCX.cjs → chunk-RUFL6U4N.cjs} +61 -64
- package/dist/{chunk-JTJGQPCC.cjs → chunk-SY2TMFSV.cjs} +3 -3
- package/dist/claim.cjs +6 -6
- 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.mjs +5 -5
- package/dist/embed.cjs +18 -18
- package/dist/embed.mjs +8 -8
- package/dist/index.cjs +9 -9
- package/dist/index.mjs +8 -8
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
- package/dist/ClaimModal-GCG6UVTW.cjs +0 -11
- package/dist/ClaimModal-I55QBNYP.mjs +0 -11
- package/dist/WithdrawModal-3CNKJNAK.cjs +0 -10
- package/dist/WithdrawModal-J2FQJWFS.mjs +0 -10
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkDYZHRL5Gcjs = require('./chunk-DYZHRL5G.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -226,7 +226,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
226
226
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-fees-accordion-summary", children: [
|
|
227
227
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-fees-accordion-label", children: [
|
|
228
228
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
229
|
-
tooltip && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: tooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fees info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
229
|
+
tooltip && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: tooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fees info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.InfoIcon, {}) }) })
|
|
230
230
|
] }),
|
|
231
231
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
232
232
|
"button",
|
|
@@ -244,7 +244,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
244
244
|
{
|
|
245
245
|
className: `rs-fees-accordion-chevron${open ? " rs-fees-accordion-chevron--open" : ""}`,
|
|
246
246
|
"aria-hidden": "true",
|
|
247
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
247
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.ChevronDownIcon, {})
|
|
248
248
|
}
|
|
249
249
|
)
|
|
250
250
|
]
|
|
@@ -266,7 +266,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
266
266
|
{
|
|
267
267
|
className: "rs-review-detail-info",
|
|
268
268
|
"aria-label": `${row.label} info`,
|
|
269
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
269
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.InfoIcon, {})
|
|
270
270
|
}
|
|
271
271
|
) })
|
|
272
272
|
] })
|
|
@@ -292,13 +292,13 @@ function SwappedReceipt({
|
|
|
292
292
|
}) {
|
|
293
293
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
294
294
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
295
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
295
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.CheckIcon, {}), title: "Deposit successful" }),
|
|
296
296
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
297
297
|
onrampMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
298
298
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Onramp method" }),
|
|
299
299
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
300
300
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: onrampMethod }),
|
|
301
|
-
onrampMethodIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon rs-review-detail-icon--square", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
301
|
+
onrampMethodIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon rs-review-detail-icon--square", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.CdnIcon, { src: onrampMethodIcon }) })
|
|
302
302
|
] })
|
|
303
303
|
] }),
|
|
304
304
|
amountPaid && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -309,7 +309,7 @@ function SwappedReceipt({
|
|
|
309
309
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Deposited amount" }),
|
|
310
310
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
311
311
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: depositedAmount }),
|
|
312
|
-
depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
312
|
+
depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.TokenIcon, { symbol: depositedSymbol }) })
|
|
313
313
|
] })
|
|
314
314
|
] }),
|
|
315
315
|
feesTotal != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -322,11 +322,11 @@ function SwappedReceipt({
|
|
|
322
322
|
)
|
|
323
323
|
] }),
|
|
324
324
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
325
|
-
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
326
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
325
|
+
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: newLabel }),
|
|
326
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
327
327
|
] })
|
|
328
328
|
] }),
|
|
329
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
329
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.PoweredBy, {})
|
|
330
330
|
] });
|
|
331
331
|
}
|
|
332
332
|
SwappedReceipt.displayName = "SwappedReceipt";
|
|
@@ -362,7 +362,7 @@ function getExchangeLogoSrc(name, connection) {
|
|
|
362
362
|
}
|
|
363
363
|
function getExchangeLogo(name, connection) {
|
|
364
364
|
const src = getExchangeLogoSrc(name, connection);
|
|
365
|
-
return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
365
|
+
return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.CdnIcon, { src }) : null;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// src/core/webhook.ts
|
|
@@ -671,14 +671,14 @@ function buildQuoteFeeRows(breakdown, sponsoredTooltip) {
|
|
|
671
671
|
if (!breakdown) return { rows: [], chargeableUsd: 0 };
|
|
672
672
|
const rows = [];
|
|
673
673
|
let chargeableUsd = 0;
|
|
674
|
-
for (const group of
|
|
674
|
+
for (const group of _chunkDYZHRL5Gcjs.quoteFeeGroups.call(void 0, breakdown)) {
|
|
675
675
|
if (group.chargedUsd > 0) {
|
|
676
676
|
chargeableUsd += group.chargedUsd;
|
|
677
|
-
rows.push({ label: group.label, value:
|
|
677
|
+
rows.push({ label: group.label, value: _chunkDYZHRL5Gcjs.formatFeeUsd.call(void 0, group.chargedUsd) });
|
|
678
678
|
} else if (group.sponsoredUsd > 0) {
|
|
679
679
|
rows.push({
|
|
680
680
|
label: group.label,
|
|
681
|
-
value:
|
|
681
|
+
value: _chunkDYZHRL5Gcjs.formatFeeUsd.call(void 0, group.sponsoredUsd),
|
|
682
682
|
strike: true,
|
|
683
683
|
tooltip: sponsoredTooltip
|
|
684
684
|
});
|
|
@@ -891,7 +891,7 @@ function ProcessingStep({
|
|
|
891
891
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
892
892
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
893
893
|
const escalatedDelayRef = _react.useRef.call(void 0, false);
|
|
894
|
-
const processingContextRef =
|
|
894
|
+
const processingContextRef = _chunkDYZHRL5Gcjs.useLatestRef.call(void 0, {
|
|
895
895
|
amount,
|
|
896
896
|
sourceChain,
|
|
897
897
|
sourceToken,
|
|
@@ -900,10 +900,10 @@ function ProcessingStep({
|
|
|
900
900
|
targetChain,
|
|
901
901
|
targetToken
|
|
902
902
|
});
|
|
903
|
-
const onDepositCompleteRef =
|
|
904
|
-
const onDepositFailedRef =
|
|
905
|
-
const onErrorRef =
|
|
906
|
-
const explorerTxUrl =
|
|
903
|
+
const onDepositCompleteRef = _chunkDYZHRL5Gcjs.useLatestRef.call(void 0, onDepositComplete);
|
|
904
|
+
const onDepositFailedRef = _chunkDYZHRL5Gcjs.useLatestRef.call(void 0, onDepositFailed);
|
|
905
|
+
const onErrorRef = _chunkDYZHRL5Gcjs.useLatestRef.call(void 0, onError);
|
|
906
|
+
const explorerTxUrl = _chunkDYZHRL5Gcjs.useExplorerTxUrl.call(void 0, );
|
|
907
907
|
const initialTerminalEventRef = _react.useRef.call(void 0, null);
|
|
908
908
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
909
909
|
if (directTransfer) return { type: "complete" };
|
|
@@ -947,7 +947,7 @@ function ProcessingStep({
|
|
|
947
947
|
completedAt,
|
|
948
948
|
endedAt: completedAt
|
|
949
949
|
}));
|
|
950
|
-
|
|
950
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "direct-transfer:complete", {
|
|
951
951
|
txHash,
|
|
952
952
|
flowLabel
|
|
953
953
|
});
|
|
@@ -979,7 +979,7 @@ function ProcessingStep({
|
|
|
979
979
|
if (outcome.type === "complete") {
|
|
980
980
|
const context = processingContextRef.current;
|
|
981
981
|
const sourceTxHash2 = getSettledSourceTxHash(event, txHash);
|
|
982
|
-
|
|
982
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "initial-event:complete", {
|
|
983
983
|
txHash,
|
|
984
984
|
sourceTxHash: sourceTxHash2,
|
|
985
985
|
destinationTxHash: outcome.destinationTxHash,
|
|
@@ -1000,7 +1000,7 @@ function ProcessingStep({
|
|
|
1000
1000
|
)]);
|
|
1001
1001
|
return;
|
|
1002
1002
|
}
|
|
1003
|
-
|
|
1003
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "initial-event:failed", {
|
|
1004
1004
|
txHash,
|
|
1005
1005
|
message: outcome.message,
|
|
1006
1006
|
event: event.type
|
|
@@ -1106,7 +1106,7 @@ function ProcessingStep({
|
|
|
1106
1106
|
async function pollStatus() {
|
|
1107
1107
|
try {
|
|
1108
1108
|
const account = sourceChain === "solana" && solanaDepositAddress ? solanaDepositAddress : smartAccount;
|
|
1109
|
-
|
|
1109
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "poll:request", {
|
|
1110
1110
|
account,
|
|
1111
1111
|
txHash,
|
|
1112
1112
|
intervalMs: pollIntervalRef.current
|
|
@@ -1117,7 +1117,7 @@ function ProcessingStep({
|
|
|
1117
1117
|
const eventForCurrentTx = eventMatchesTx ? lastEvent2 : void 0;
|
|
1118
1118
|
if (lastEvent2) {
|
|
1119
1119
|
const eventData = lastEvent2.data;
|
|
1120
|
-
|
|
1120
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "poll:event", {
|
|
1121
1121
|
type: lastEvent2.type,
|
|
1122
1122
|
matchesTx: eventMatchesTx,
|
|
1123
1123
|
intentId: _optionalChain([eventData, 'optionalAccess', _83 => _83.intentId])
|
|
@@ -1131,7 +1131,7 @@ function ProcessingStep({
|
|
|
1131
1131
|
txHash
|
|
1132
1132
|
);
|
|
1133
1133
|
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.destination, 'optionalAccess', _87 => _87.transactionHash]);
|
|
1134
|
-
|
|
1134
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "state:complete", {
|
|
1135
1135
|
txHash,
|
|
1136
1136
|
sourceTxHash: sourceTxHash2,
|
|
1137
1137
|
destinationTxHash: destinationTxHash2,
|
|
@@ -1156,7 +1156,7 @@ function ProcessingStep({
|
|
|
1156
1156
|
message: formatted.message,
|
|
1157
1157
|
lastEvent: eventForCurrentTx
|
|
1158
1158
|
});
|
|
1159
|
-
|
|
1159
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "state:failed", {
|
|
1160
1160
|
txHash,
|
|
1161
1161
|
message: formatted.message,
|
|
1162
1162
|
code: formatted.code
|
|
@@ -1171,7 +1171,7 @@ function ProcessingStep({
|
|
|
1171
1171
|
message: errorMessage,
|
|
1172
1172
|
lastEvent: eventForCurrentTx
|
|
1173
1173
|
});
|
|
1174
|
-
|
|
1174
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "state:error-event", {
|
|
1175
1175
|
txHash,
|
|
1176
1176
|
message: errorMessage
|
|
1177
1177
|
});
|
|
@@ -1184,7 +1184,7 @@ function ProcessingStep({
|
|
|
1184
1184
|
}));
|
|
1185
1185
|
scheduleNextPoll();
|
|
1186
1186
|
} catch (error) {
|
|
1187
|
-
|
|
1187
|
+
_chunkDYZHRL5Gcjs.debugError.call(void 0, debug, "processing", "poll:failure", error, {
|
|
1188
1188
|
smartAccount,
|
|
1189
1189
|
txHash,
|
|
1190
1190
|
intervalMs: pollIntervalRef.current
|
|
@@ -1199,7 +1199,7 @@ function ProcessingStep({
|
|
|
1199
1199
|
pollIntervalRef.current * BACKOFF_MULTIPLIER,
|
|
1200
1200
|
MAX_POLL_INTERVAL
|
|
1201
1201
|
);
|
|
1202
|
-
|
|
1202
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "poll:scheduled", {
|
|
1203
1203
|
nextIntervalMs: pollIntervalRef.current
|
|
1204
1204
|
});
|
|
1205
1205
|
pollStatus();
|
|
@@ -1232,7 +1232,7 @@ function ProcessingStep({
|
|
|
1232
1232
|
escalatedDelayRef.current = true;
|
|
1233
1233
|
setHasEscalatedDelay(true);
|
|
1234
1234
|
const message = "Transfer is taking longer than expected. Your funds are safe and processing will continue automatically.";
|
|
1235
|
-
|
|
1235
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "processing", "state:delay-escalated", {
|
|
1236
1236
|
txHash,
|
|
1237
1237
|
timeoutMs: ESCALATED_DELAY_MS
|
|
1238
1238
|
});
|
|
@@ -1260,7 +1260,7 @@ function ProcessingStep({
|
|
|
1260
1260
|
const sourceExplorerUrl = sourceExplorerHash ? explorerTxUrl(displaySourceChain, sourceExplorerHash) : null;
|
|
1261
1261
|
const destExplorerUrl = destinationTxHash ? explorerTxUrl(targetChainId, destinationTxHash) : null;
|
|
1262
1262
|
const sourceDisplay = (() => {
|
|
1263
|
-
const resolved =
|
|
1263
|
+
const resolved = _chunkDYZHRL5Gcjs.resolveTokenDisplay.call(void 0, displaySourceToken, displaySourceChain, {
|
|
1264
1264
|
symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
|
|
1265
1265
|
decimals: providedSourceDecimals
|
|
1266
1266
|
});
|
|
@@ -1270,10 +1270,10 @@ function ProcessingStep({
|
|
|
1270
1270
|
};
|
|
1271
1271
|
})();
|
|
1272
1272
|
const sourceSymbol = sourceDisplay.symbol;
|
|
1273
|
-
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(
|
|
1274
|
-
|
|
1273
|
+
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(_chunkDYZHRL5Gcjs.formatRawTokenAmount.call(void 0, displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
|
|
1274
|
+
_chunkDYZHRL5Gcjs.formatTokenAmount.call(void 0, Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
|
|
1275
1275
|
const eventDestination = getEventDestinationDetails(lastEvent);
|
|
1276
|
-
const targetDisplay =
|
|
1276
|
+
const targetDisplay = _chunkDYZHRL5Gcjs.resolveTokenDisplay.call(void 0,
|
|
1277
1277
|
_nullishCoalesce(eventDestination.token, () => ( targetToken)),
|
|
1278
1278
|
_nullishCoalesce(eventDestination.chainId, () => ( targetChainId)),
|
|
1279
1279
|
// Dapp deposits default to USDC targets; mirror the source symbol last so
|
|
@@ -1281,7 +1281,7 @@ function ProcessingStep({
|
|
|
1281
1281
|
{ symbol: _nullishCoalesce(providedSourceSymbol, () => ( "USDC")) }
|
|
1282
1282
|
);
|
|
1283
1283
|
const targetSymbol = targetDisplay.symbol;
|
|
1284
|
-
const formattedDestinationAmount = eventDestination.amount !== void 0 ?
|
|
1284
|
+
const formattedDestinationAmount = eventDestination.amount !== void 0 ? _chunkDYZHRL5Gcjs.formatRawTokenAmount.call(void 0, eventDestination.amount, targetDisplay) : void 0;
|
|
1285
1285
|
const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
|
|
1286
1286
|
const prices = useTokenPrices(service, [
|
|
1287
1287
|
{
|
|
@@ -1296,17 +1296,17 @@ function ProcessingStep({
|
|
|
1296
1296
|
}
|
|
1297
1297
|
]);
|
|
1298
1298
|
const estimatedReceiveAmount = (() => {
|
|
1299
|
-
const estimate =
|
|
1300
|
-
sourceAmount:
|
|
1299
|
+
const estimate = _chunkDYZHRL5Gcjs.estimateReceiveAmount.call(void 0, {
|
|
1300
|
+
sourceAmount: _chunkDYZHRL5Gcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals),
|
|
1301
1301
|
sourceSymbol: sourceDisplay.symbol,
|
|
1302
1302
|
targetSymbol: targetDisplay.symbol,
|
|
1303
1303
|
sourceAmountUsd: amountUsdNumber,
|
|
1304
|
-
sourceTrusted:
|
|
1304
|
+
sourceTrusted: _chunkDYZHRL5Gcjs.isRecognizedToken.call(void 0, displaySourceToken, displaySourceChain),
|
|
1305
1305
|
prices
|
|
1306
1306
|
});
|
|
1307
|
-
return estimate !== void 0 ?
|
|
1307
|
+
return estimate !== void 0 ? _chunkDYZHRL5Gcjs.formatTokenAmount.call(void 0, estimate, targetDisplay.symbol) : void 0;
|
|
1308
1308
|
})();
|
|
1309
|
-
const quotedReceive = quote ?
|
|
1309
|
+
const quotedReceive = quote ? _chunkDYZHRL5Gcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol) : void 0;
|
|
1310
1310
|
const receiveDisplay = formattedDestinationAmount ? (
|
|
1311
1311
|
// The delivered amount, once the bridge reports it — actual, not an
|
|
1312
1312
|
// estimate, so it wins over the quote and carries no "~".
|
|
@@ -1320,12 +1320,12 @@ function ProcessingStep({
|
|
|
1320
1320
|
if (sourceSymbol.toUpperCase() !== targetSymbol.toUpperCase()) {
|
|
1321
1321
|
return void 0;
|
|
1322
1322
|
}
|
|
1323
|
-
const sentValue =
|
|
1324
|
-
const receivedValue = eventDestination.amount !== void 0 ?
|
|
1323
|
+
const sentValue = _chunkDYZHRL5Gcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals);
|
|
1324
|
+
const receivedValue = eventDestination.amount !== void 0 ? _chunkDYZHRL5Gcjs.tokenAmountToNumber.call(void 0, eventDestination.amount, targetDisplay.decimals) : void 0;
|
|
1325
1325
|
if (sentValue === void 0 || receivedValue === void 0 || sentValue <= receivedValue) {
|
|
1326
1326
|
return void 0;
|
|
1327
1327
|
}
|
|
1328
|
-
const formatted =
|
|
1328
|
+
const formatted = _chunkDYZHRL5Gcjs.formatTokenAmount.call(void 0, sentValue - receivedValue, sourceSymbol);
|
|
1329
1329
|
if (formatted === void 0 || Number(formatted.replace(/,/g, "")) === 0) {
|
|
1330
1330
|
return void 0;
|
|
1331
1331
|
}
|
|
@@ -1352,7 +1352,7 @@ function ProcessingStep({
|
|
|
1352
1352
|
] }) : isFailed ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
1353
1353
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FailedBadge, {}),
|
|
1354
1354
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: stateTitle }) })
|
|
1355
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1355
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.WalletIcon, {}), title: stateTitle });
|
|
1356
1356
|
if (isComplete && isSwappedOrder) {
|
|
1357
1357
|
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _108 => _108.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _109 => _109.paymentMethod]))), () => ( null));
|
|
1358
1358
|
const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
|
|
@@ -1374,7 +1374,7 @@ function ProcessingStep({
|
|
|
1374
1374
|
if (onrampFeeUsd != null) {
|
|
1375
1375
|
feeRows.push({
|
|
1376
1376
|
label: "On-ramp fee",
|
|
1377
|
-
value:
|
|
1377
|
+
value: _chunkDYZHRL5Gcjs.formatFeeUsd.call(void 0, onrampFeeUsd)
|
|
1378
1378
|
});
|
|
1379
1379
|
}
|
|
1380
1380
|
const hasFallbackFee = quoteFeeRows.length === 0 && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount));
|
|
@@ -1383,13 +1383,13 @@ function ProcessingStep({
|
|
|
1383
1383
|
} else if (hasFallbackFee) {
|
|
1384
1384
|
feeRows.push({
|
|
1385
1385
|
label: "Network fee",
|
|
1386
|
-
value:
|
|
1386
|
+
value: _chunkDYZHRL5Gcjs.formatFeeUsd.call(void 0, Number(quotedFeeAmount)),
|
|
1387
1387
|
strike: feeSponsored,
|
|
1388
1388
|
tooltip: feeSponsored ? sponsoredFeeTooltip : void 0
|
|
1389
1389
|
});
|
|
1390
1390
|
}
|
|
1391
1391
|
const fallbackChargeableUsd = hasFallbackFee && !feeSponsored ? Number(quotedFeeAmount) : 0;
|
|
1392
|
-
const feesTotal = feeRows.length > 0 ?
|
|
1392
|
+
const feesTotal = feeRows.length > 0 ? _chunkDYZHRL5Gcjs.formatFeeUsd.call(void 0,
|
|
1393
1393
|
(_nullishCoalesce(onrampFeeUsd, () => ( 0))) + chargeableUsd + fallbackChargeableUsd
|
|
1394
1394
|
) : null;
|
|
1395
1395
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1417,7 +1417,7 @@ function ProcessingStep({
|
|
|
1417
1417
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
1418
1418
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1419
1419
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
1420
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1420
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.CdnIcon, { src: sourceChainIcon }) }),
|
|
1421
1421
|
sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1422
1422
|
"a",
|
|
1423
1423
|
{
|
|
@@ -1426,7 +1426,7 @@ function ProcessingStep({
|
|
|
1426
1426
|
rel: "noopener noreferrer",
|
|
1427
1427
|
className: "rs-review-detail-link",
|
|
1428
1428
|
"aria-label": "View source transaction",
|
|
1429
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1429
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.ExternalLinkIcon, {})
|
|
1430
1430
|
}
|
|
1431
1431
|
)
|
|
1432
1432
|
] })
|
|
@@ -1435,7 +1435,7 @@ function ProcessingStep({
|
|
|
1435
1435
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
1436
1436
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1437
1437
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
1438
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1438
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.CdnIcon, { src: targetChainIcon }) }),
|
|
1439
1439
|
destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1440
1440
|
"a",
|
|
1441
1441
|
{
|
|
@@ -1444,7 +1444,7 @@ function ProcessingStep({
|
|
|
1444
1444
|
rel: "noopener noreferrer",
|
|
1445
1445
|
className: "rs-review-detail-link",
|
|
1446
1446
|
"aria-label": "View destination transaction",
|
|
1447
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1447
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.ExternalLinkIcon, {})
|
|
1448
1448
|
}
|
|
1449
1449
|
)
|
|
1450
1450
|
] })
|
|
@@ -1481,7 +1481,7 @@ function ProcessingStep({
|
|
|
1481
1481
|
" ",
|
|
1482
1482
|
sourceSymbol
|
|
1483
1483
|
] }),
|
|
1484
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1484
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
1485
1485
|
] })
|
|
1486
1486
|
] })
|
|
1487
1487
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1492,14 +1492,14 @@ function ProcessingStep({
|
|
|
1492
1492
|
" ",
|
|
1493
1493
|
sourceSymbol
|
|
1494
1494
|
] }),
|
|
1495
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1495
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
1496
1496
|
] })
|
|
1497
1497
|
] }),
|
|
1498
1498
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1499
1499
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
|
|
1500
1500
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1501
1501
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
1502
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1502
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
1503
1503
|
] })
|
|
1504
1504
|
] }),
|
|
1505
1505
|
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1528,12 +1528,12 @@ function ProcessingStep({
|
|
|
1528
1528
|
{
|
|
1529
1529
|
className: "rs-review-detail-info",
|
|
1530
1530
|
"aria-label": "Fee info",
|
|
1531
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1531
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.InfoIcon, {})
|
|
1532
1532
|
}
|
|
1533
1533
|
) })
|
|
1534
1534
|
] })
|
|
1535
1535
|
] }) : (() => {
|
|
1536
|
-
const { display, struck } =
|
|
1536
|
+
const { display, struck } = _chunkDYZHRL5Gcjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'optionalAccess', _118 => _118.fees]));
|
|
1537
1537
|
if (display !== null) {
|
|
1538
1538
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1539
1539
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
@@ -1564,9 +1564,9 @@ function ProcessingStep({
|
|
|
1564
1564
|
] });
|
|
1565
1565
|
})()
|
|
1566
1566
|
] }),
|
|
1567
|
-
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1567
|
+
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.Callout, { variant: "error", children: failureMessage }),
|
|
1568
1568
|
isProcessing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1569
|
-
|
|
1569
|
+
_chunkDYZHRL5Gcjs.Button,
|
|
1570
1570
|
{
|
|
1571
1571
|
fullWidth: true,
|
|
1572
1572
|
disabled: true,
|
|
@@ -1576,18 +1576,18 @@ function ProcessingStep({
|
|
|
1576
1576
|
}
|
|
1577
1577
|
),
|
|
1578
1578
|
isComplete && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
1579
|
-
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1579
|
+
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDYZHRL5Gcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
|
|
1580
1580
|
"New ",
|
|
1581
1581
|
flowNoun
|
|
1582
1582
|
] }),
|
|
1583
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1583
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
1584
1584
|
] }),
|
|
1585
1585
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
1586
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1587
|
-
handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1586
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
|
|
1587
|
+
handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
|
|
1588
1588
|
] })
|
|
1589
1589
|
] }),
|
|
1590
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1590
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDYZHRL5Gcjs.PoweredBy, {})
|
|
1591
1591
|
] });
|
|
1592
1592
|
}
|
|
1593
1593
|
|
|
@@ -1678,7 +1678,7 @@ async function runAccountSetup(input, deps) {
|
|
|
1678
1678
|
}
|
|
1679
1679
|
try {
|
|
1680
1680
|
const salt = deriveAccountSalt(input);
|
|
1681
|
-
|
|
1681
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
|
|
1682
1682
|
salt,
|
|
1683
1683
|
recipient: input.recipient,
|
|
1684
1684
|
targetChain: input.targetChain,
|
|
@@ -1704,7 +1704,7 @@ async function runAccountSetup(input, deps) {
|
|
|
1704
1704
|
cacheKey
|
|
1705
1705
|
};
|
|
1706
1706
|
} catch (error) {
|
|
1707
|
-
|
|
1707
|
+
_chunkDYZHRL5Gcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
|
|
1708
1708
|
recipient: input.recipient
|
|
1709
1709
|
});
|
|
1710
1710
|
if (error instanceof SetupError) throw error;
|
|
@@ -1715,7 +1715,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
|
|
|
1715
1715
|
const now = Date.now();
|
|
1716
1716
|
const existing = setupRequestDedupe.get(requestKey);
|
|
1717
1717
|
if (existing && (!existing.settled || existing.expiresAt > now)) {
|
|
1718
|
-
|
|
1718
|
+
_chunkDYZHRL5Gcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
|
|
1719
1719
|
recipient: input.recipient,
|
|
1720
1720
|
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
|
|
1721
1721
|
});
|