@rhinestone/deposit-modal 0.0.0-dev-20260901122116 → 0.0.0-dev-20260901125921
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bridge-transcript.json +4 -0
- package/dist/{ClaimModal-ZENIKF76.mjs → ClaimModal-GECPNVYW.mjs} +5 -5
- package/dist/ClaimModal-TUIJ2FXZ.cjs +13 -0
- package/dist/{DepositModalReown-ZIBJO2TW.cjs → DepositModalReown-7X2P4Q3U.cjs} +18 -18
- package/dist/{DepositModalReown-V542CVWK.mjs → DepositModalReown-J5677AO3.mjs} +5 -5
- package/dist/{WithdrawModal-IHVS7J3J.mjs → WithdrawModal-EGUXJGKC.mjs} +4 -4
- package/dist/WithdrawModal-ZRO4GPL5.cjs +12 -0
- package/dist/{chunk-JFJVDYFA.mjs → chunk-5VTLHOWL.mjs} +1 -1
- package/dist/{chunk-2NHV6ABY.cjs → chunk-6NMICTMH.cjs} +8 -8
- package/dist/{chunk-WIFTLAUQ.cjs → chunk-76SNGRJ4.cjs} +272 -272
- package/dist/{chunk-2KQKBLBS.cjs → chunk-BBHL7Y6Q.cjs} +65 -65
- package/dist/{chunk-Y2Q3MQFT.cjs → chunk-E26VPCQS.cjs} +3 -3
- package/dist/{chunk-G3LYFVOJ.cjs → chunk-GGEX3J6J.cjs} +67 -67
- package/dist/{chunk-OEZXPT7N.cjs → chunk-H4GKLXX7.cjs} +53 -53
- package/dist/{chunk-CH4T2HVC.mjs → chunk-HEBZWISE.mjs} +3 -3
- package/dist/{chunk-A5NXC4QY.cjs → chunk-LHVHW2FC.cjs} +1 -1
- package/dist/{chunk-WLH3JNI7.mjs → chunk-QO63RXOH.mjs} +1 -1
- package/dist/{chunk-A4KC3HRU.mjs → chunk-SSODFKQC.mjs} +1 -1
- package/dist/{chunk-IMIQE4KF.mjs → chunk-UIMR4O7B.mjs} +2 -2
- package/dist/{chunk-F2VZYM7X.mjs → chunk-ULDG2NFL.mjs} +1 -1
- package/dist/{chunk-G4GS424X.cjs → chunk-UMHZX3KX.cjs} +32 -32
- package/dist/{chunk-JJT3B35F.mjs → chunk-URYV6A2L.mjs} +2 -2
- package/dist/{chunk-JUCH73GK.mjs → chunk-V35JXQDL.mjs} +4 -4
- 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 +113 -32
- package/dist/embed.mjs +94 -13
- 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 +2 -2
- package/dist/ClaimModal-YLSMYPAB.cjs +0 -13
- package/dist/WithdrawModal-HWKOCPLW.cjs +0 -12
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkUMHZX3KXcjs = require('./chunk-UMHZX3KX.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
@@ -253,7 +253,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
253
253
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-fees-accordion-summary", children: [
|
|
254
254
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-fees-accordion-label", children: [
|
|
255
255
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
256
|
-
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,
|
|
256
|
+
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, _chunkUMHZX3KXcjs.InfoIcon, {}) }) })
|
|
257
257
|
] }),
|
|
258
258
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
259
259
|
"button",
|
|
@@ -271,7 +271,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
271
271
|
{
|
|
272
272
|
className: `rs-fees-accordion-chevron${open ? " rs-fees-accordion-chevron--open" : ""}`,
|
|
273
273
|
"aria-hidden": "true",
|
|
274
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
274
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.ChevronDownIcon, {})
|
|
275
275
|
}
|
|
276
276
|
)
|
|
277
277
|
]
|
|
@@ -293,7 +293,7 @@ function FeesAccordion({ total, rows, tooltip }) {
|
|
|
293
293
|
{
|
|
294
294
|
className: "rs-review-detail-info",
|
|
295
295
|
"aria-label": `${row.label} info`,
|
|
296
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
296
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.InfoIcon, {})
|
|
297
297
|
}
|
|
298
298
|
) })
|
|
299
299
|
] })
|
|
@@ -319,13 +319,13 @@ function SwappedReceipt({
|
|
|
319
319
|
}) {
|
|
320
320
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
321
321
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
322
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
322
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.CheckIcon, {}), title: "Deposit successful" }),
|
|
323
323
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
324
324
|
onrampMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
325
325
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Onramp method" }),
|
|
326
326
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
327
327
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: onrampMethod }),
|
|
328
|
-
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,
|
|
328
|
+
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, _chunkUMHZX3KXcjs.CdnIcon, { src: onrampMethodIcon }) })
|
|
329
329
|
] })
|
|
330
330
|
] }),
|
|
331
331
|
amountPaid && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -336,7 +336,7 @@ function SwappedReceipt({
|
|
|
336
336
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Deposited amount" }),
|
|
337
337
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
338
338
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: depositedAmount }),
|
|
339
|
-
depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
339
|
+
depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.TokenIcon, { symbol: depositedSymbol }) })
|
|
340
340
|
] })
|
|
341
341
|
] }),
|
|
342
342
|
feesTotal != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -349,11 +349,11 @@ function SwappedReceipt({
|
|
|
349
349
|
)
|
|
350
350
|
] }),
|
|
351
351
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
352
|
-
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
353
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
352
|
+
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: newLabel }),
|
|
353
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
354
354
|
] })
|
|
355
355
|
] }),
|
|
356
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
356
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.PoweredBy, {})
|
|
357
357
|
] });
|
|
358
358
|
}
|
|
359
359
|
SwappedReceipt.displayName = "SwappedReceipt";
|
|
@@ -389,7 +389,7 @@ function getExchangeLogoSrc(name, connection) {
|
|
|
389
389
|
}
|
|
390
390
|
function getExchangeLogo(name, connection) {
|
|
391
391
|
const src = getExchangeLogoSrc(name, connection);
|
|
392
|
-
return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
392
|
+
return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.CdnIcon, { src }) : null;
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
// src/core/webhook.ts
|
|
@@ -698,14 +698,14 @@ function buildQuoteFeeRows(breakdown, sponsoredTooltip) {
|
|
|
698
698
|
if (!breakdown) return { rows: [], chargeableUsd: 0 };
|
|
699
699
|
const rows = [];
|
|
700
700
|
let chargeableUsd = 0;
|
|
701
|
-
for (const group of
|
|
701
|
+
for (const group of _chunkUMHZX3KXcjs.quoteFeeGroups.call(void 0, breakdown)) {
|
|
702
702
|
if (group.chargedUsd > 0) {
|
|
703
703
|
chargeableUsd += group.chargedUsd;
|
|
704
|
-
rows.push({ label: group.label, value:
|
|
704
|
+
rows.push({ label: group.label, value: _chunkUMHZX3KXcjs.formatFeeUsd.call(void 0, group.chargedUsd) });
|
|
705
705
|
} else if (group.sponsoredUsd > 0) {
|
|
706
706
|
rows.push({
|
|
707
707
|
label: group.label,
|
|
708
|
-
value:
|
|
708
|
+
value: _chunkUMHZX3KXcjs.formatFeeUsd.call(void 0, group.sponsoredUsd),
|
|
709
709
|
strike: true,
|
|
710
710
|
tooltip: sponsoredTooltip
|
|
711
711
|
});
|
|
@@ -920,7 +920,7 @@ function ProcessingStep({
|
|
|
920
920
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
921
921
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
922
922
|
const escalatedDelayRef = _react.useRef.call(void 0, false);
|
|
923
|
-
const processingContextRef =
|
|
923
|
+
const processingContextRef = _chunkUMHZX3KXcjs.useLatestRef.call(void 0, {
|
|
924
924
|
amount,
|
|
925
925
|
sourceChain,
|
|
926
926
|
sourceToken,
|
|
@@ -929,10 +929,10 @@ function ProcessingStep({
|
|
|
929
929
|
targetChain,
|
|
930
930
|
targetToken
|
|
931
931
|
});
|
|
932
|
-
const onDepositCompleteRef =
|
|
933
|
-
const onDepositFailedRef =
|
|
934
|
-
const onErrorRef =
|
|
935
|
-
const explorerTxUrl =
|
|
932
|
+
const onDepositCompleteRef = _chunkUMHZX3KXcjs.useLatestRef.call(void 0, onDepositComplete);
|
|
933
|
+
const onDepositFailedRef = _chunkUMHZX3KXcjs.useLatestRef.call(void 0, onDepositFailed);
|
|
934
|
+
const onErrorRef = _chunkUMHZX3KXcjs.useLatestRef.call(void 0, onError);
|
|
935
|
+
const explorerTxUrl = _chunkUMHZX3KXcjs.useExplorerTxUrl.call(void 0, );
|
|
936
936
|
const initialTerminalEventRef = _react.useRef.call(void 0, null);
|
|
937
937
|
const completedDirectTransferTxHashRef = _react.useRef.call(void 0, null);
|
|
938
938
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
@@ -980,7 +980,7 @@ function ProcessingStep({
|
|
|
980
980
|
completedAt,
|
|
981
981
|
endedAt: completedAt
|
|
982
982
|
}));
|
|
983
|
-
|
|
983
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "direct-transfer:complete", {
|
|
984
984
|
txHash,
|
|
985
985
|
flowLabel
|
|
986
986
|
});
|
|
@@ -1012,7 +1012,7 @@ function ProcessingStep({
|
|
|
1012
1012
|
if (outcome.type === "complete") {
|
|
1013
1013
|
const context = processingContextRef.current;
|
|
1014
1014
|
const sourceTxHash2 = getSettledSourceTxHash(event, txHash);
|
|
1015
|
-
|
|
1015
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "initial-event:complete", {
|
|
1016
1016
|
txHash,
|
|
1017
1017
|
sourceTxHash: sourceTxHash2,
|
|
1018
1018
|
destinationTxHash: outcome.destinationTxHash,
|
|
@@ -1033,7 +1033,7 @@ function ProcessingStep({
|
|
|
1033
1033
|
)]);
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
1036
|
-
|
|
1036
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "initial-event:failed", {
|
|
1037
1037
|
txHash,
|
|
1038
1038
|
message: outcome.message,
|
|
1039
1039
|
event: event.type
|
|
@@ -1145,7 +1145,7 @@ function ProcessingStep({
|
|
|
1145
1145
|
async function pollStatus() {
|
|
1146
1146
|
try {
|
|
1147
1147
|
const account = sourceChain === "solana" && solanaDepositAddress ? solanaDepositAddress : smartAccount;
|
|
1148
|
-
|
|
1148
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "poll:request", {
|
|
1149
1149
|
account,
|
|
1150
1150
|
txHash,
|
|
1151
1151
|
intervalMs: pollIntervalRef.current
|
|
@@ -1156,7 +1156,7 @@ function ProcessingStep({
|
|
|
1156
1156
|
const eventForCurrentTx = eventMatchesTx ? lastEvent2 : void 0;
|
|
1157
1157
|
if (lastEvent2) {
|
|
1158
1158
|
const eventData = lastEvent2.data;
|
|
1159
|
-
|
|
1159
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "poll:event", {
|
|
1160
1160
|
type: lastEvent2.type,
|
|
1161
1161
|
matchesTx: eventMatchesTx,
|
|
1162
1162
|
intentId: _optionalChain([eventData, 'optionalAccess', _89 => _89.intentId])
|
|
@@ -1170,7 +1170,7 @@ function ProcessingStep({
|
|
|
1170
1170
|
txHash
|
|
1171
1171
|
);
|
|
1172
1172
|
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _91 => _91.data, 'optionalAccess', _92 => _92.destination, 'optionalAccess', _93 => _93.transactionHash]);
|
|
1173
|
-
|
|
1173
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "state:complete", {
|
|
1174
1174
|
txHash,
|
|
1175
1175
|
sourceTxHash: sourceTxHash2,
|
|
1176
1176
|
destinationTxHash: destinationTxHash2,
|
|
@@ -1195,7 +1195,7 @@ function ProcessingStep({
|
|
|
1195
1195
|
message: formatted.message,
|
|
1196
1196
|
lastEvent: eventForCurrentTx
|
|
1197
1197
|
});
|
|
1198
|
-
|
|
1198
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "state:failed", {
|
|
1199
1199
|
txHash,
|
|
1200
1200
|
message: formatted.message,
|
|
1201
1201
|
code: formatted.code
|
|
@@ -1210,7 +1210,7 @@ function ProcessingStep({
|
|
|
1210
1210
|
message: errorMessage,
|
|
1211
1211
|
lastEvent: eventForCurrentTx
|
|
1212
1212
|
});
|
|
1213
|
-
|
|
1213
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "state:error-event", {
|
|
1214
1214
|
txHash,
|
|
1215
1215
|
message: errorMessage
|
|
1216
1216
|
});
|
|
@@ -1223,7 +1223,7 @@ function ProcessingStep({
|
|
|
1223
1223
|
}));
|
|
1224
1224
|
scheduleNextPoll();
|
|
1225
1225
|
} catch (error) {
|
|
1226
|
-
|
|
1226
|
+
_chunkUMHZX3KXcjs.debugError.call(void 0, debug, "processing", "poll:failure", error, {
|
|
1227
1227
|
smartAccount,
|
|
1228
1228
|
txHash,
|
|
1229
1229
|
intervalMs: pollIntervalRef.current
|
|
@@ -1238,7 +1238,7 @@ function ProcessingStep({
|
|
|
1238
1238
|
pollIntervalRef.current * BACKOFF_MULTIPLIER,
|
|
1239
1239
|
MAX_POLL_INTERVAL
|
|
1240
1240
|
);
|
|
1241
|
-
|
|
1241
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "poll:scheduled", {
|
|
1242
1242
|
nextIntervalMs: pollIntervalRef.current
|
|
1243
1243
|
});
|
|
1244
1244
|
pollStatus();
|
|
@@ -1271,7 +1271,7 @@ function ProcessingStep({
|
|
|
1271
1271
|
escalatedDelayRef.current = true;
|
|
1272
1272
|
setHasEscalatedDelay(true);
|
|
1273
1273
|
const message = "Transfer is taking longer than expected. Your funds are safe and processing will continue automatically.";
|
|
1274
|
-
|
|
1274
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "processing", "state:delay-escalated", {
|
|
1275
1275
|
txHash,
|
|
1276
1276
|
timeoutMs: ESCALATED_DELAY_MS
|
|
1277
1277
|
});
|
|
@@ -1304,7 +1304,7 @@ function ProcessingStep({
|
|
|
1304
1304
|
const sourceExplorerUrl = sourceExplorerHash ? explorerTxUrl(displaySourceChain, sourceExplorerHash) : null;
|
|
1305
1305
|
const destExplorerUrl = destinationTxHash ? explorerTxUrl(targetChainId, destinationTxHash) : null;
|
|
1306
1306
|
const sourceDisplay = (() => {
|
|
1307
|
-
const resolved =
|
|
1307
|
+
const resolved = _chunkUMHZX3KXcjs.resolveTokenDisplay.call(void 0, displaySourceToken, displaySourceChain, {
|
|
1308
1308
|
symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
|
|
1309
1309
|
decimals: providedSourceDecimals
|
|
1310
1310
|
});
|
|
@@ -1314,10 +1314,10 @@ function ProcessingStep({
|
|
|
1314
1314
|
};
|
|
1315
1315
|
})();
|
|
1316
1316
|
const sourceSymbol = sourceDisplay.symbol;
|
|
1317
|
-
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(
|
|
1318
|
-
|
|
1317
|
+
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(_chunkUMHZX3KXcjs.formatRawTokenAmount.call(void 0, displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
|
|
1318
|
+
_chunkUMHZX3KXcjs.formatTokenAmount.call(void 0, Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
|
|
1319
1319
|
const eventDestination = getEventDestinationDetails(lastEvent);
|
|
1320
|
-
const targetDisplay =
|
|
1320
|
+
const targetDisplay = _chunkUMHZX3KXcjs.resolveTokenDisplay.call(void 0,
|
|
1321
1321
|
_nullishCoalesce(eventDestination.token, () => ( targetToken)),
|
|
1322
1322
|
_nullishCoalesce(eventDestination.chainId, () => ( targetChainId)),
|
|
1323
1323
|
// Dapp deposits default to USDC targets; mirror the source symbol last so
|
|
@@ -1325,7 +1325,7 @@ function ProcessingStep({
|
|
|
1325
1325
|
{ symbol: _nullishCoalesce(providedSourceSymbol, () => ( "USDC")) }
|
|
1326
1326
|
);
|
|
1327
1327
|
const targetSymbol = targetDisplay.symbol;
|
|
1328
|
-
const formattedDestinationAmount = eventDestination.amount !== void 0 ?
|
|
1328
|
+
const formattedDestinationAmount = eventDestination.amount !== void 0 ? _chunkUMHZX3KXcjs.formatRawTokenAmount.call(void 0, eventDestination.amount, targetDisplay) : void 0;
|
|
1329
1329
|
const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
|
|
1330
1330
|
const prices = useTokenPrices(service, [
|
|
1331
1331
|
{
|
|
@@ -1340,17 +1340,17 @@ function ProcessingStep({
|
|
|
1340
1340
|
}
|
|
1341
1341
|
]);
|
|
1342
1342
|
const estimatedReceiveAmount = (() => {
|
|
1343
|
-
const estimate =
|
|
1344
|
-
sourceAmount:
|
|
1343
|
+
const estimate = _chunkUMHZX3KXcjs.estimateReceiveAmount.call(void 0, {
|
|
1344
|
+
sourceAmount: _chunkUMHZX3KXcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals),
|
|
1345
1345
|
sourceSymbol: sourceDisplay.symbol,
|
|
1346
1346
|
targetSymbol: targetDisplay.symbol,
|
|
1347
1347
|
sourceAmountUsd: amountUsdNumber,
|
|
1348
|
-
sourceTrusted:
|
|
1348
|
+
sourceTrusted: _chunkUMHZX3KXcjs.isRecognizedToken.call(void 0, displaySourceToken, displaySourceChain),
|
|
1349
1349
|
prices
|
|
1350
1350
|
});
|
|
1351
|
-
return estimate !== void 0 ?
|
|
1351
|
+
return estimate !== void 0 ? _chunkUMHZX3KXcjs.formatTokenAmount.call(void 0, estimate, targetDisplay.symbol) : void 0;
|
|
1352
1352
|
})();
|
|
1353
|
-
const quotedReceive = quote ?
|
|
1353
|
+
const quotedReceive = quote ? _chunkUMHZX3KXcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol) : void 0;
|
|
1354
1354
|
const receiveDisplay = formattedDestinationAmount ? (
|
|
1355
1355
|
// The delivered amount, once the bridge reports it — actual, not an
|
|
1356
1356
|
// estimate, so it wins over the quote and carries no "~".
|
|
@@ -1364,12 +1364,12 @@ function ProcessingStep({
|
|
|
1364
1364
|
if (sourceSymbol.toUpperCase() !== targetSymbol.toUpperCase()) {
|
|
1365
1365
|
return void 0;
|
|
1366
1366
|
}
|
|
1367
|
-
const sentValue =
|
|
1368
|
-
const receivedValue = eventDestination.amount !== void 0 ?
|
|
1367
|
+
const sentValue = _chunkUMHZX3KXcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals);
|
|
1368
|
+
const receivedValue = eventDestination.amount !== void 0 ? _chunkUMHZX3KXcjs.tokenAmountToNumber.call(void 0, eventDestination.amount, targetDisplay.decimals) : void 0;
|
|
1369
1369
|
if (sentValue === void 0 || receivedValue === void 0 || sentValue <= receivedValue) {
|
|
1370
1370
|
return void 0;
|
|
1371
1371
|
}
|
|
1372
|
-
const formatted =
|
|
1372
|
+
const formatted = _chunkUMHZX3KXcjs.formatTokenAmount.call(void 0, sentValue - receivedValue, sourceSymbol);
|
|
1373
1373
|
if (formatted === void 0 || Number(formatted.replace(/,/g, "")) === 0) {
|
|
1374
1374
|
return void 0;
|
|
1375
1375
|
}
|
|
@@ -1396,7 +1396,7 @@ function ProcessingStep({
|
|
|
1396
1396
|
] }) : isFailed ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
1397
1397
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FailedBadge, {}),
|
|
1398
1398
|
/* @__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 }) })
|
|
1399
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1399
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.WalletIcon, {}), title: stateTitle });
|
|
1400
1400
|
if (isComplete && isSwappedOrder) {
|
|
1401
1401
|
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _115 => _115.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _116 => _116.paymentMethod]))), () => ( null));
|
|
1402
1402
|
const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
|
|
@@ -1418,7 +1418,7 @@ function ProcessingStep({
|
|
|
1418
1418
|
if (onrampFeeUsd != null) {
|
|
1419
1419
|
feeRows.push({
|
|
1420
1420
|
label: "On-ramp fee",
|
|
1421
|
-
value:
|
|
1421
|
+
value: _chunkUMHZX3KXcjs.formatFeeUsd.call(void 0, onrampFeeUsd)
|
|
1422
1422
|
});
|
|
1423
1423
|
}
|
|
1424
1424
|
const hasFallbackFee = quoteFeeRows.length === 0 && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount));
|
|
@@ -1427,13 +1427,13 @@ function ProcessingStep({
|
|
|
1427
1427
|
} else if (hasFallbackFee) {
|
|
1428
1428
|
feeRows.push({
|
|
1429
1429
|
label: "Network fee",
|
|
1430
|
-
value:
|
|
1430
|
+
value: _chunkUMHZX3KXcjs.formatFeeUsd.call(void 0, Number(quotedFeeAmount)),
|
|
1431
1431
|
strike: feeSponsored,
|
|
1432
1432
|
tooltip: feeSponsored ? sponsoredFeeTooltip : void 0
|
|
1433
1433
|
});
|
|
1434
1434
|
}
|
|
1435
1435
|
const fallbackChargeableUsd = hasFallbackFee && !feeSponsored ? Number(quotedFeeAmount) : 0;
|
|
1436
|
-
const feesTotal = feeRows.length > 0 ?
|
|
1436
|
+
const feesTotal = feeRows.length > 0 ? _chunkUMHZX3KXcjs.formatFeeUsd.call(void 0,
|
|
1437
1437
|
(_nullishCoalesce(onrampFeeUsd, () => ( 0))) + chargeableUsd + fallbackChargeableUsd
|
|
1438
1438
|
) : null;
|
|
1439
1439
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1461,7 +1461,7 @@ function ProcessingStep({
|
|
|
1461
1461
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
1462
1462
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1463
1463
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
1464
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1464
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.CdnIcon, { src: sourceChainIcon }) }),
|
|
1465
1465
|
sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1466
1466
|
"a",
|
|
1467
1467
|
{
|
|
@@ -1470,7 +1470,7 @@ function ProcessingStep({
|
|
|
1470
1470
|
rel: "noopener noreferrer",
|
|
1471
1471
|
className: "rs-review-detail-link",
|
|
1472
1472
|
"aria-label": "View source transaction",
|
|
1473
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1473
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.ExternalLinkIcon, {})
|
|
1474
1474
|
}
|
|
1475
1475
|
)
|
|
1476
1476
|
] })
|
|
@@ -1479,7 +1479,7 @@ function ProcessingStep({
|
|
|
1479
1479
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
1480
1480
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1481
1481
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
1482
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1482
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.CdnIcon, { src: targetChainIcon }) }),
|
|
1483
1483
|
destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1484
1484
|
"a",
|
|
1485
1485
|
{
|
|
@@ -1488,7 +1488,7 @@ function ProcessingStep({
|
|
|
1488
1488
|
rel: "noopener noreferrer",
|
|
1489
1489
|
className: "rs-review-detail-link",
|
|
1490
1490
|
"aria-label": "View destination transaction",
|
|
1491
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1491
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.ExternalLinkIcon, {})
|
|
1492
1492
|
}
|
|
1493
1493
|
)
|
|
1494
1494
|
] })
|
|
@@ -1525,7 +1525,7 @@ function ProcessingStep({
|
|
|
1525
1525
|
" ",
|
|
1526
1526
|
sourceSymbol
|
|
1527
1527
|
] }),
|
|
1528
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1528
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
1529
1529
|
] })
|
|
1530
1530
|
] })
|
|
1531
1531
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1536,14 +1536,14 @@ function ProcessingStep({
|
|
|
1536
1536
|
" ",
|
|
1537
1537
|
sourceSymbol
|
|
1538
1538
|
] }),
|
|
1539
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1539
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
1540
1540
|
] })
|
|
1541
1541
|
] }),
|
|
1542
1542
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1543
1543
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
|
|
1544
1544
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1545
1545
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
1546
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1546
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
1547
1547
|
] })
|
|
1548
1548
|
] }),
|
|
1549
1549
|
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1572,12 +1572,12 @@ function ProcessingStep({
|
|
|
1572
1572
|
{
|
|
1573
1573
|
className: "rs-review-detail-info",
|
|
1574
1574
|
"aria-label": "Fee info",
|
|
1575
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1575
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.InfoIcon, {})
|
|
1576
1576
|
}
|
|
1577
1577
|
) })
|
|
1578
1578
|
] })
|
|
1579
1579
|
] }) : (() => {
|
|
1580
|
-
const { display, struck } =
|
|
1580
|
+
const { display, struck } = _chunkUMHZX3KXcjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'optionalAccess', _125 => _125.fees]));
|
|
1581
1581
|
if (display !== null) {
|
|
1582
1582
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1583
1583
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
@@ -1608,9 +1608,9 @@ function ProcessingStep({
|
|
|
1608
1608
|
] });
|
|
1609
1609
|
})()
|
|
1610
1610
|
] }),
|
|
1611
|
-
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1611
|
+
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.Callout, { variant: "error", children: failureMessage }),
|
|
1612
1612
|
isProcessing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1613
|
-
|
|
1613
|
+
_chunkUMHZX3KXcjs.Button,
|
|
1614
1614
|
{
|
|
1615
1615
|
fullWidth: true,
|
|
1616
1616
|
disabled: true,
|
|
@@ -1620,15 +1620,15 @@ function ProcessingStep({
|
|
|
1620
1620
|
}
|
|
1621
1621
|
),
|
|
1622
1622
|
isComplete && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
1623
|
-
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1623
|
+
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUMHZX3KXcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
|
|
1624
1624
|
"New ",
|
|
1625
1625
|
flowNoun
|
|
1626
1626
|
] }),
|
|
1627
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1627
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.Button, { onClick: () => onClose("success_done"), fullWidth: true, children: "Done" })
|
|
1628
1628
|
] }),
|
|
1629
1629
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
1630
1630
|
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
|
-
|
|
1631
|
+
_chunkUMHZX3KXcjs.Button,
|
|
1632
1632
|
{
|
|
1633
1633
|
variant: "outline",
|
|
1634
1634
|
onClick: () => onClose("failure_cancel"),
|
|
@@ -1636,10 +1636,10 @@ function ProcessingStep({
|
|
|
1636
1636
|
children: "Cancel"
|
|
1637
1637
|
}
|
|
1638
1638
|
),
|
|
1639
|
-
handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1639
|
+
handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
|
|
1640
1640
|
] })
|
|
1641
1641
|
] }),
|
|
1642
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1642
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUMHZX3KXcjs.PoweredBy, {})
|
|
1643
1643
|
] });
|
|
1644
1644
|
}
|
|
1645
1645
|
|
|
@@ -1730,7 +1730,7 @@ async function runAccountSetup(input, deps) {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
try {
|
|
1732
1732
|
const salt = deriveAccountSalt(input);
|
|
1733
|
-
|
|
1733
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
|
|
1734
1734
|
salt,
|
|
1735
1735
|
recipient: input.recipient,
|
|
1736
1736
|
targetChain: input.targetChain,
|
|
@@ -1756,7 +1756,7 @@ async function runAccountSetup(input, deps) {
|
|
|
1756
1756
|
cacheKey
|
|
1757
1757
|
};
|
|
1758
1758
|
} catch (error) {
|
|
1759
|
-
|
|
1759
|
+
_chunkUMHZX3KXcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
|
|
1760
1760
|
recipient: input.recipient
|
|
1761
1761
|
});
|
|
1762
1762
|
if (error instanceof SetupError) throw error;
|
|
@@ -1767,7 +1767,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
|
|
|
1767
1767
|
const now = Date.now();
|
|
1768
1768
|
const existing = setupRequestDedupe.get(requestKey);
|
|
1769
1769
|
if (existing && (!existing.settled || existing.expiresAt > now)) {
|
|
1770
|
-
|
|
1770
|
+
_chunkUMHZX3KXcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
|
|
1771
1771
|
recipient: input.recipient,
|
|
1772
1772
|
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
|
|
1773
1773
|
});
|
|
@@ -1806,7 +1806,7 @@ function mapError(error) {
|
|
|
1806
1806
|
"network"
|
|
1807
1807
|
);
|
|
1808
1808
|
}
|
|
1809
|
-
if (error instanceof
|
|
1809
|
+
if (error instanceof _chunkUMHZX3KXcjs.RegistrationError) {
|
|
1810
1810
|
if (error.status >= 500) {
|
|
1811
1811
|
return new SetupError(
|
|
1812
1812
|
"Deposit service is temporarily unavailable. Please try again shortly.",
|