@rhinestone/deposit-modal 0.9.0 → 0.10.0
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-6KUAO5ZC.mjs → DepositModalReown-MTWT6Y66.mjs} +5 -5
- package/dist/{DepositModalReown-XC5RIU7Z.cjs → DepositModalReown-S3DSFXTX.cjs} +9 -9
- package/dist/{chunk-4WB2FHGC.mjs → chunk-5NJYW5FT.mjs} +3 -3
- package/dist/{chunk-OSI2CFGL.mjs → chunk-5OEWGJR4.mjs} +1 -1
- package/dist/{chunk-VOGZAZB2.mjs → chunk-7TV7GLJB.mjs} +62 -1
- package/dist/{chunk-NMIMRASD.cjs → chunk-A42XAHIB.cjs} +66 -66
- package/dist/{chunk-PAGMU4RQ.cjs → chunk-DEF767BA.cjs} +52 -52
- package/dist/{chunk-LGVJWVSS.mjs → chunk-KW32UBUQ.mjs} +2 -2
- package/dist/{chunk-E4G5BOZP.mjs → chunk-LR7MKHYV.mjs} +2 -2
- package/dist/{chunk-KKHLNFSA.mjs → chunk-MHIOMTMM.mjs} +281 -119
- package/dist/{chunk-NEXUCY4B.cjs → chunk-NF4NBRUP.cjs} +1 -1
- package/dist/{chunk-VN4BLZYC.cjs → chunk-PUJHXHRA.cjs} +108 -47
- package/dist/{chunk-DIX7M3SP.cjs → chunk-UMCDZJMG.cjs} +57 -57
- package/dist/{chunk-WYXBY2MQ.mjs → chunk-VDGT6NZQ.mjs} +1 -1
- package/dist/{chunk-T7LGQFP3.cjs → chunk-VTVOHNXM.cjs} +3 -3
- package/dist/{chunk-22RV33LK.cjs → chunk-W4YAOJPG.cjs} +621 -459
- package/dist/claim.cjs +5 -5
- package/dist/claim.mjs +4 -4
- 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/index.cjs +8 -8
- package/dist/index.mjs +7 -7
- package/dist/styles.css +14 -0
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkPUJHXHRAcjs = require('./chunk-PUJHXHRA.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
@@ -275,7 +275,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
275
275
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-fees-accordion-summary", children: [
|
|
276
276
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-fees-accordion-label", children: [
|
|
277
277
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
278
|
-
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,
|
|
278
|
+
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, _chunkPUJHXHRAcjs.InfoIcon, {}) }) })
|
|
279
279
|
] }),
|
|
280
280
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
281
281
|
"button",
|
|
@@ -293,7 +293,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
293
293
|
{
|
|
294
294
|
className: `rs-fees-accordion-chevron${open ? " rs-fees-accordion-chevron--open" : ""}`,
|
|
295
295
|
"aria-hidden": "true",
|
|
296
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
296
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.ChevronDownIcon, {})
|
|
297
297
|
}
|
|
298
298
|
)
|
|
299
299
|
]
|
|
@@ -315,7 +315,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
315
315
|
{
|
|
316
316
|
className: "rs-review-detail-info",
|
|
317
317
|
"aria-label": `${row.label} info`,
|
|
318
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
318
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.InfoIcon, {})
|
|
319
319
|
}
|
|
320
320
|
) })
|
|
321
321
|
] })
|
|
@@ -341,13 +341,13 @@ function SwappedReceipt({
|
|
|
341
341
|
}) {
|
|
342
342
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
343
343
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
344
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
344
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CheckIcon, {}), title: "Deposit successful" }),
|
|
345
345
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
346
346
|
onrampMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
347
347
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Onramp method" }),
|
|
348
348
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
349
349
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: onrampMethod }),
|
|
350
|
-
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,
|
|
350
|
+
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, _chunkPUJHXHRAcjs.CdnIcon, { src: onrampMethodIcon }) })
|
|
351
351
|
] })
|
|
352
352
|
] }),
|
|
353
353
|
amountPaid && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -358,7 +358,7 @@ function SwappedReceipt({
|
|
|
358
358
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Deposited amount" }),
|
|
359
359
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
360
360
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: depositedAmount }),
|
|
361
|
-
depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
361
|
+
depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.TokenIcon, { symbol: depositedSymbol }) })
|
|
362
362
|
] })
|
|
363
363
|
] }),
|
|
364
364
|
feesTotal != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -371,11 +371,11 @@ function SwappedReceipt({
|
|
|
371
371
|
)
|
|
372
372
|
] }),
|
|
373
373
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
374
|
-
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
375
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
374
|
+
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: newLabel }),
|
|
375
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
376
376
|
] })
|
|
377
377
|
] }),
|
|
378
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
378
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.PoweredBy, {})
|
|
379
379
|
] });
|
|
380
380
|
}
|
|
381
381
|
SwappedReceipt.displayName = "SwappedReceipt";
|
|
@@ -411,7 +411,7 @@ function getExchangeLogoSrc(name, connection) {
|
|
|
411
411
|
}
|
|
412
412
|
function getExchangeLogo(name, connection) {
|
|
413
413
|
const src = getExchangeLogoSrc(name, connection);
|
|
414
|
-
return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
414
|
+
return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CdnIcon, { src }) : null;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
417
|
// src/core/webhook.ts
|
|
@@ -656,14 +656,14 @@ function buildQuoteFeeRows(breakdown, sponsoredTooltip) {
|
|
|
656
656
|
if (!breakdown) return { rows: [], chargeableUsd: 0 };
|
|
657
657
|
const rows = [];
|
|
658
658
|
let chargeableUsd = 0;
|
|
659
|
-
for (const group of
|
|
659
|
+
for (const group of _chunkPUJHXHRAcjs.quoteFeeGroups.call(void 0, breakdown)) {
|
|
660
660
|
if (group.chargedUsd > 0) {
|
|
661
661
|
chargeableUsd += group.chargedUsd;
|
|
662
|
-
rows.push({ label: group.label, value:
|
|
662
|
+
rows.push({ label: group.label, value: _chunkPUJHXHRAcjs.formatFeeUsd.call(void 0, group.chargedUsd) });
|
|
663
663
|
} else if (group.sponsoredUsd > 0) {
|
|
664
664
|
rows.push({
|
|
665
665
|
label: group.label,
|
|
666
|
-
value:
|
|
666
|
+
value: _chunkPUJHXHRAcjs.formatFeeUsd.call(void 0, group.sponsoredUsd),
|
|
667
667
|
strike: true,
|
|
668
668
|
tooltip: sponsoredTooltip
|
|
669
669
|
});
|
|
@@ -872,7 +872,7 @@ function ProcessingStep({
|
|
|
872
872
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
873
873
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
874
874
|
const escalatedDelayRef = _react.useRef.call(void 0, false);
|
|
875
|
-
const processingContextRef =
|
|
875
|
+
const processingContextRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, {
|
|
876
876
|
amount,
|
|
877
877
|
sourceChain,
|
|
878
878
|
sourceToken,
|
|
@@ -881,9 +881,9 @@ function ProcessingStep({
|
|
|
881
881
|
targetChain,
|
|
882
882
|
targetToken
|
|
883
883
|
});
|
|
884
|
-
const onDepositCompleteRef =
|
|
885
|
-
const onDepositFailedRef =
|
|
886
|
-
const onErrorRef =
|
|
884
|
+
const onDepositCompleteRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onDepositComplete);
|
|
885
|
+
const onDepositFailedRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onDepositFailed);
|
|
886
|
+
const onErrorRef = _chunkPUJHXHRAcjs.useLatestRef.call(void 0, onError);
|
|
887
887
|
const initialTerminalEventRef = _react.useRef.call(void 0, null);
|
|
888
888
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
889
889
|
if (directTransfer) return { type: "complete" };
|
|
@@ -927,7 +927,7 @@ function ProcessingStep({
|
|
|
927
927
|
completedAt,
|
|
928
928
|
endedAt: completedAt
|
|
929
929
|
}));
|
|
930
|
-
|
|
930
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "direct-transfer:complete", {
|
|
931
931
|
txHash,
|
|
932
932
|
flowLabel
|
|
933
933
|
});
|
|
@@ -958,7 +958,7 @@ function ProcessingStep({
|
|
|
958
958
|
if (!outcome) return;
|
|
959
959
|
if (outcome.type === "complete") {
|
|
960
960
|
const context = processingContextRef.current;
|
|
961
|
-
|
|
961
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "initial-event:complete", {
|
|
962
962
|
txHash,
|
|
963
963
|
destinationTxHash: outcome.destinationTxHash,
|
|
964
964
|
event: event.type
|
|
@@ -974,7 +974,7 @@ function ProcessingStep({
|
|
|
974
974
|
})]);
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
977
|
-
|
|
977
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "initial-event:failed", {
|
|
978
978
|
txHash,
|
|
979
979
|
message: outcome.message,
|
|
980
980
|
event: event.type
|
|
@@ -1080,7 +1080,7 @@ function ProcessingStep({
|
|
|
1080
1080
|
async function pollStatus() {
|
|
1081
1081
|
try {
|
|
1082
1082
|
const account = sourceChain === "solana" && solanaDepositAddress ? solanaDepositAddress : smartAccount;
|
|
1083
|
-
|
|
1083
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "poll:request", {
|
|
1084
1084
|
account,
|
|
1085
1085
|
txHash,
|
|
1086
1086
|
intervalMs: pollIntervalRef.current
|
|
@@ -1091,7 +1091,7 @@ function ProcessingStep({
|
|
|
1091
1091
|
const eventForCurrentTx = eventMatchesTx ? lastEvent2 : void 0;
|
|
1092
1092
|
if (lastEvent2) {
|
|
1093
1093
|
const eventData = lastEvent2.data;
|
|
1094
|
-
|
|
1094
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "poll:event", {
|
|
1095
1095
|
type: lastEvent2.type,
|
|
1096
1096
|
matchesTx: eventMatchesTx,
|
|
1097
1097
|
intentId: _optionalChain([eventData, 'optionalAccess', _80 => _80.intentId])
|
|
@@ -1101,7 +1101,7 @@ function ProcessingStep({
|
|
|
1101
1101
|
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _81 => _81.type]) === "bridge-complete") {
|
|
1102
1102
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
1103
1103
|
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _82 => _82.data, 'optionalAccess', _83 => _83.destination, 'optionalAccess', _84 => _84.transactionHash]);
|
|
1104
|
-
|
|
1104
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "state:complete", {
|
|
1105
1105
|
txHash,
|
|
1106
1106
|
destinationTxHash: destinationTxHash2,
|
|
1107
1107
|
event: eventForCurrentTx.type
|
|
@@ -1125,7 +1125,7 @@ function ProcessingStep({
|
|
|
1125
1125
|
message: formatted.message,
|
|
1126
1126
|
lastEvent: eventForCurrentTx
|
|
1127
1127
|
});
|
|
1128
|
-
|
|
1128
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "state:failed", {
|
|
1129
1129
|
txHash,
|
|
1130
1130
|
message: formatted.message,
|
|
1131
1131
|
code: formatted.code
|
|
@@ -1140,7 +1140,7 @@ function ProcessingStep({
|
|
|
1140
1140
|
message: errorMessage,
|
|
1141
1141
|
lastEvent: eventForCurrentTx
|
|
1142
1142
|
});
|
|
1143
|
-
|
|
1143
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "state:error-event", {
|
|
1144
1144
|
txHash,
|
|
1145
1145
|
message: errorMessage
|
|
1146
1146
|
});
|
|
@@ -1153,7 +1153,7 @@ function ProcessingStep({
|
|
|
1153
1153
|
}));
|
|
1154
1154
|
scheduleNextPoll();
|
|
1155
1155
|
} catch (error) {
|
|
1156
|
-
|
|
1156
|
+
_chunkPUJHXHRAcjs.debugError.call(void 0, debug, "processing", "poll:failure", error, {
|
|
1157
1157
|
smartAccount,
|
|
1158
1158
|
txHash,
|
|
1159
1159
|
intervalMs: pollIntervalRef.current
|
|
@@ -1168,7 +1168,7 @@ function ProcessingStep({
|
|
|
1168
1168
|
pollIntervalRef.current * BACKOFF_MULTIPLIER,
|
|
1169
1169
|
MAX_POLL_INTERVAL
|
|
1170
1170
|
);
|
|
1171
|
-
|
|
1171
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "poll:scheduled", {
|
|
1172
1172
|
nextIntervalMs: pollIntervalRef.current
|
|
1173
1173
|
});
|
|
1174
1174
|
pollStatus();
|
|
@@ -1201,7 +1201,7 @@ function ProcessingStep({
|
|
|
1201
1201
|
escalatedDelayRef.current = true;
|
|
1202
1202
|
setHasEscalatedDelay(true);
|
|
1203
1203
|
const message = "Transfer is taking longer than expected. Your funds are safe and processing will continue automatically.";
|
|
1204
|
-
|
|
1204
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "processing", "state:delay-escalated", {
|
|
1205
1205
|
txHash,
|
|
1206
1206
|
timeoutMs: ESCALATED_DELAY_MS
|
|
1207
1207
|
});
|
|
@@ -1225,7 +1225,7 @@ function ProcessingStep({
|
|
|
1225
1225
|
const sourceExplorerUrl = _chunkH577RJN5cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
1226
1226
|
const destExplorerUrl = destinationTxHash ? _chunkH577RJN5cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
1227
1227
|
const sourceDisplay = (() => {
|
|
1228
|
-
const resolved =
|
|
1228
|
+
const resolved = _chunkPUJHXHRAcjs.resolveTokenDisplay.call(void 0, displaySourceToken, displaySourceChain, {
|
|
1229
1229
|
symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
|
|
1230
1230
|
decimals: providedSourceDecimals
|
|
1231
1231
|
});
|
|
@@ -1235,10 +1235,10 @@ function ProcessingStep({
|
|
|
1235
1235
|
};
|
|
1236
1236
|
})();
|
|
1237
1237
|
const sourceSymbol = sourceDisplay.symbol;
|
|
1238
|
-
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(
|
|
1239
|
-
|
|
1238
|
+
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(_chunkPUJHXHRAcjs.formatRawTokenAmount.call(void 0, displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
|
|
1239
|
+
_chunkPUJHXHRAcjs.formatTokenAmount.call(void 0, Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
|
|
1240
1240
|
const eventDestination = getEventDestinationDetails(lastEvent);
|
|
1241
|
-
const targetDisplay =
|
|
1241
|
+
const targetDisplay = _chunkPUJHXHRAcjs.resolveTokenDisplay.call(void 0,
|
|
1242
1242
|
_nullishCoalesce(eventDestination.token, () => ( targetToken)),
|
|
1243
1243
|
_nullishCoalesce(eventDestination.chainId, () => ( targetChain)),
|
|
1244
1244
|
// Dapp deposits default to USDC targets; mirror the source symbol last so
|
|
@@ -1246,7 +1246,7 @@ function ProcessingStep({
|
|
|
1246
1246
|
{ symbol: _nullishCoalesce(providedSourceSymbol, () => ( "USDC")) }
|
|
1247
1247
|
);
|
|
1248
1248
|
const targetSymbol = targetDisplay.symbol;
|
|
1249
|
-
const formattedDestinationAmount = eventDestination.amount !== void 0 ?
|
|
1249
|
+
const formattedDestinationAmount = eventDestination.amount !== void 0 ? _chunkPUJHXHRAcjs.formatRawTokenAmount.call(void 0, eventDestination.amount, targetDisplay) : void 0;
|
|
1250
1250
|
const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
|
|
1251
1251
|
const prices = useTokenPrices(service, [
|
|
1252
1252
|
{
|
|
@@ -1261,17 +1261,17 @@ function ProcessingStep({
|
|
|
1261
1261
|
}
|
|
1262
1262
|
]);
|
|
1263
1263
|
const estimatedReceiveAmount = (() => {
|
|
1264
|
-
const estimate =
|
|
1265
|
-
sourceAmount:
|
|
1264
|
+
const estimate = _chunkPUJHXHRAcjs.estimateReceiveAmount.call(void 0, {
|
|
1265
|
+
sourceAmount: _chunkPUJHXHRAcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals),
|
|
1266
1266
|
sourceSymbol: sourceDisplay.symbol,
|
|
1267
1267
|
targetSymbol: targetDisplay.symbol,
|
|
1268
1268
|
sourceAmountUsd: amountUsdNumber,
|
|
1269
|
-
sourceTrusted:
|
|
1269
|
+
sourceTrusted: _chunkPUJHXHRAcjs.isRecognizedToken.call(void 0, displaySourceToken, displaySourceChain),
|
|
1270
1270
|
prices
|
|
1271
1271
|
});
|
|
1272
|
-
return estimate !== void 0 ?
|
|
1272
|
+
return estimate !== void 0 ? _chunkPUJHXHRAcjs.formatTokenAmount.call(void 0, estimate, targetDisplay.symbol) : void 0;
|
|
1273
1273
|
})();
|
|
1274
|
-
const quotedReceive = quote ?
|
|
1274
|
+
const quotedReceive = quote ? _chunkPUJHXHRAcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol) : void 0;
|
|
1275
1275
|
const receiveDisplay = formattedDestinationAmount ? (
|
|
1276
1276
|
// The delivered amount, once the bridge reports it — actual, not an
|
|
1277
1277
|
// estimate, so it wins over the quote and carries no "~".
|
|
@@ -1285,12 +1285,12 @@ function ProcessingStep({
|
|
|
1285
1285
|
if (sourceSymbol.toUpperCase() !== targetSymbol.toUpperCase()) {
|
|
1286
1286
|
return void 0;
|
|
1287
1287
|
}
|
|
1288
|
-
const sentValue =
|
|
1289
|
-
const receivedValue = eventDestination.amount !== void 0 ?
|
|
1288
|
+
const sentValue = _chunkPUJHXHRAcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals);
|
|
1289
|
+
const receivedValue = eventDestination.amount !== void 0 ? _chunkPUJHXHRAcjs.tokenAmountToNumber.call(void 0, eventDestination.amount, targetDisplay.decimals) : void 0;
|
|
1290
1290
|
if (sentValue === void 0 || receivedValue === void 0 || sentValue <= receivedValue) {
|
|
1291
1291
|
return void 0;
|
|
1292
1292
|
}
|
|
1293
|
-
const formatted =
|
|
1293
|
+
const formatted = _chunkPUJHXHRAcjs.formatTokenAmount.call(void 0, sentValue - receivedValue, sourceSymbol);
|
|
1294
1294
|
if (formatted === void 0 || Number(formatted.replace(/,/g, "")) === 0) {
|
|
1295
1295
|
return void 0;
|
|
1296
1296
|
}
|
|
@@ -1317,7 +1317,7 @@ function ProcessingStep({
|
|
|
1317
1317
|
] }) : isFailed ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
1318
1318
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FailedBadge, {}),
|
|
1319
1319
|
/* @__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 }) })
|
|
1320
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1320
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.WalletIcon, {}), title: stateTitle });
|
|
1321
1321
|
if (isComplete && isSwappedOrder) {
|
|
1322
1322
|
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _102 => _102.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _103 => _103.paymentMethod]))), () => ( null));
|
|
1323
1323
|
const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
|
|
@@ -1339,7 +1339,7 @@ function ProcessingStep({
|
|
|
1339
1339
|
if (onrampFeeUsd != null) {
|
|
1340
1340
|
feeRows.push({
|
|
1341
1341
|
label: "On-ramp fee",
|
|
1342
|
-
value:
|
|
1342
|
+
value: _chunkPUJHXHRAcjs.formatFeeUsd.call(void 0, onrampFeeUsd)
|
|
1343
1343
|
});
|
|
1344
1344
|
}
|
|
1345
1345
|
const hasFallbackFee = quoteFeeRows.length === 0 && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount));
|
|
@@ -1348,13 +1348,13 @@ function ProcessingStep({
|
|
|
1348
1348
|
} else if (hasFallbackFee) {
|
|
1349
1349
|
feeRows.push({
|
|
1350
1350
|
label: "Network fee",
|
|
1351
|
-
value:
|
|
1351
|
+
value: _chunkPUJHXHRAcjs.formatFeeUsd.call(void 0, Number(quotedFeeAmount)),
|
|
1352
1352
|
strike: feeSponsored,
|
|
1353
1353
|
tooltip: feeSponsored ? sponsoredFeeTooltip : void 0
|
|
1354
1354
|
});
|
|
1355
1355
|
}
|
|
1356
1356
|
const fallbackChargeableUsd = hasFallbackFee && !feeSponsored ? Number(quotedFeeAmount) : 0;
|
|
1357
|
-
const feesTotal = feeRows.length > 0 ?
|
|
1357
|
+
const feesTotal = feeRows.length > 0 ? _chunkPUJHXHRAcjs.formatFeeUsd.call(void 0,
|
|
1358
1358
|
(_nullishCoalesce(onrampFeeUsd, () => ( 0))) + chargeableUsd + fallbackChargeableUsd
|
|
1359
1359
|
) : null;
|
|
1360
1360
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1382,7 +1382,7 @@ function ProcessingStep({
|
|
|
1382
1382
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
1383
1383
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1384
1384
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
1385
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1385
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CdnIcon, { src: sourceChainIcon }) }),
|
|
1386
1386
|
sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1387
1387
|
"a",
|
|
1388
1388
|
{
|
|
@@ -1391,7 +1391,7 @@ function ProcessingStep({
|
|
|
1391
1391
|
rel: "noopener noreferrer",
|
|
1392
1392
|
className: "rs-review-detail-link",
|
|
1393
1393
|
"aria-label": "View source transaction",
|
|
1394
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1394
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.ExternalLinkIcon, {})
|
|
1395
1395
|
}
|
|
1396
1396
|
)
|
|
1397
1397
|
] })
|
|
@@ -1400,7 +1400,7 @@ function ProcessingStep({
|
|
|
1400
1400
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
1401
1401
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1402
1402
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
1403
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1403
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.CdnIcon, { src: targetChainIcon }) }),
|
|
1404
1404
|
destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1405
1405
|
"a",
|
|
1406
1406
|
{
|
|
@@ -1409,7 +1409,7 @@ function ProcessingStep({
|
|
|
1409
1409
|
rel: "noopener noreferrer",
|
|
1410
1410
|
className: "rs-review-detail-link",
|
|
1411
1411
|
"aria-label": "View destination transaction",
|
|
1412
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1412
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.ExternalLinkIcon, {})
|
|
1413
1413
|
}
|
|
1414
1414
|
)
|
|
1415
1415
|
] })
|
|
@@ -1446,7 +1446,7 @@ function ProcessingStep({
|
|
|
1446
1446
|
" ",
|
|
1447
1447
|
sourceSymbol
|
|
1448
1448
|
] }),
|
|
1449
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1449
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
1450
1450
|
] })
|
|
1451
1451
|
] })
|
|
1452
1452
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1457,14 +1457,14 @@ function ProcessingStep({
|
|
|
1457
1457
|
" ",
|
|
1458
1458
|
sourceSymbol
|
|
1459
1459
|
] }),
|
|
1460
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1460
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
1461
1461
|
] })
|
|
1462
1462
|
] }),
|
|
1463
1463
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1464
1464
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
|
|
1465
1465
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1466
1466
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
1467
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1467
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
1468
1468
|
] })
|
|
1469
1469
|
] }),
|
|
1470
1470
|
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1493,12 +1493,12 @@ function ProcessingStep({
|
|
|
1493
1493
|
{
|
|
1494
1494
|
className: "rs-review-detail-info",
|
|
1495
1495
|
"aria-label": "Fee info",
|
|
1496
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1496
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.InfoIcon, {})
|
|
1497
1497
|
}
|
|
1498
1498
|
) })
|
|
1499
1499
|
] })
|
|
1500
1500
|
] }) : (() => {
|
|
1501
|
-
const { display, struck } =
|
|
1501
|
+
const { display, struck } = _chunkPUJHXHRAcjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'optionalAccess', _112 => _112.fees]));
|
|
1502
1502
|
if (display !== null) {
|
|
1503
1503
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1504
1504
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
@@ -1529,9 +1529,9 @@ function ProcessingStep({
|
|
|
1529
1529
|
] });
|
|
1530
1530
|
})()
|
|
1531
1531
|
] }),
|
|
1532
|
-
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1532
|
+
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Callout, { variant: "error", children: failureMessage }),
|
|
1533
1533
|
isProcessing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1534
|
-
|
|
1534
|
+
_chunkPUJHXHRAcjs.Button,
|
|
1535
1535
|
{
|
|
1536
1536
|
fullWidth: true,
|
|
1537
1537
|
disabled: true,
|
|
@@ -1541,18 +1541,18 @@ function ProcessingStep({
|
|
|
1541
1541
|
}
|
|
1542
1542
|
),
|
|
1543
1543
|
isComplete && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
1544
|
-
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1544
|
+
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkPUJHXHRAcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
|
|
1545
1545
|
"New ",
|
|
1546
1546
|
flowNoun
|
|
1547
1547
|
] }),
|
|
1548
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1548
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
1549
1549
|
] }),
|
|
1550
1550
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
1551
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1552
|
-
handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1551
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
|
|
1552
|
+
handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
|
|
1553
1553
|
] })
|
|
1554
1554
|
] }),
|
|
1555
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1555
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPUJHXHRAcjs.PoweredBy, {})
|
|
1556
1556
|
] });
|
|
1557
1557
|
}
|
|
1558
1558
|
|
|
@@ -1560,7 +1560,7 @@ function ProcessingStep({
|
|
|
1560
1560
|
var _viem = require('viem');
|
|
1561
1561
|
var clientCache = /* @__PURE__ */ new Map();
|
|
1562
1562
|
function getPublicClient(chainId, rpcUrls) {
|
|
1563
|
-
const url =
|
|
1563
|
+
const url = _chunkPUJHXHRAcjs.rpcUrlFor.call(void 0, rpcUrls, chainId);
|
|
1564
1564
|
const cacheKey = `${chainId}|${_nullishCoalesce(url, () => ( ""))}`;
|
|
1565
1565
|
let client = clientCache.get(cacheKey);
|
|
1566
1566
|
if (!client) {
|
|
@@ -1661,7 +1661,7 @@ async function runAccountSetup(input, deps) {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
try {
|
|
1663
1663
|
const salt = deriveAccountSalt(input);
|
|
1664
|
-
|
|
1664
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
|
|
1665
1665
|
salt,
|
|
1666
1666
|
recipient: input.recipient,
|
|
1667
1667
|
targetChain: input.targetChain,
|
|
@@ -1687,7 +1687,7 @@ async function runAccountSetup(input, deps) {
|
|
|
1687
1687
|
cacheKey
|
|
1688
1688
|
};
|
|
1689
1689
|
} catch (error) {
|
|
1690
|
-
|
|
1690
|
+
_chunkPUJHXHRAcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
|
|
1691
1691
|
recipient: input.recipient
|
|
1692
1692
|
});
|
|
1693
1693
|
if (error instanceof SetupError) throw error;
|
|
@@ -1698,7 +1698,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
|
|
|
1698
1698
|
const now = Date.now();
|
|
1699
1699
|
const existing = setupRequestDedupe.get(requestKey);
|
|
1700
1700
|
if (existing && (!existing.settled || existing.expiresAt > now)) {
|
|
1701
|
-
|
|
1701
|
+
_chunkPUJHXHRAcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
|
|
1702
1702
|
recipient: input.recipient,
|
|
1703
1703
|
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
|
|
1704
1704
|
});
|