@rhinestone/deposit-modal 0.12.1 → 0.12.2
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-SXAXHYTN.mjs → DepositModalReown-TEC3MEZ4.mjs} +5 -5
- package/dist/{DepositModalReown-CH6FUTCR.cjs → DepositModalReown-VG66OTIU.cjs} +13 -13
- package/dist/{chunk-O4AXBFHU.mjs → chunk-2TPSF77V.mjs} +3 -3
- package/dist/{chunk-65MLWUQD.cjs → chunk-BRYNGLDM.cjs} +24 -24
- package/dist/{chunk-TQWEGW3A.mjs → chunk-FLVLYO64.mjs} +2 -2
- package/dist/{chunk-2K44IE3V.mjs → chunk-FXXUIK4E.mjs} +1 -1
- package/dist/{chunk-TYBMAUGH.cjs → chunk-HL5NUKZW.cjs} +3 -3
- package/dist/{chunk-O2TQLD4I.mjs → chunk-IAGFDSNC.mjs} +1 -1
- package/dist/{chunk-PVWZN66D.mjs → chunk-J46WDSRD.mjs} +1 -1
- package/dist/{chunk-NHGFU3WC.mjs → chunk-JE4R5VA3.mjs} +1 -1
- package/dist/{chunk-DMYA7U53.cjs → chunk-L32UI7LA.cjs} +1 -1
- package/dist/{chunk-2BOEUV6B.cjs → chunk-OIN4CXCP.cjs} +266 -266
- package/dist/{chunk-FKHPVLJY.cjs → chunk-PWLEBV5V.cjs} +66 -66
- package/dist/{chunk-KPWB2JAX.mjs → chunk-SDSKIJC7.mjs} +4 -4
- package/dist/{chunk-UGK4JRK6.cjs → chunk-TM7VGHAG.cjs} +54 -54
- package/dist/{chunk-ZLCY33FQ.cjs → chunk-UQIJU6HV.cjs} +59 -59
- 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 +9 -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 _chunkBRYNGLDMcjs = require('./chunk-BRYNGLDM.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, _chunkBRYNGLDMcjs.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, _chunkBRYNGLDMcjs.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, _chunkBRYNGLDMcjs.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, _chunkBRYNGLDMcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.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, _chunkBRYNGLDMcjs.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, _chunkBRYNGLDMcjs.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, _chunkBRYNGLDMcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: newLabel }),
|
|
375
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.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, _chunkBRYNGLDMcjs.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, _chunkBRYNGLDMcjs.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 _chunkBRYNGLDMcjs.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: _chunkBRYNGLDMcjs.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: _chunkBRYNGLDMcjs.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 = _chunkBRYNGLDMcjs.useLatestRef.call(void 0, {
|
|
876
876
|
amount,
|
|
877
877
|
sourceChain,
|
|
878
878
|
sourceToken,
|
|
@@ -881,10 +881,10 @@ function ProcessingStep({
|
|
|
881
881
|
targetChain,
|
|
882
882
|
targetToken
|
|
883
883
|
});
|
|
884
|
-
const onDepositCompleteRef =
|
|
885
|
-
const onDepositFailedRef =
|
|
886
|
-
const onErrorRef =
|
|
887
|
-
const explorerTxUrl =
|
|
884
|
+
const onDepositCompleteRef = _chunkBRYNGLDMcjs.useLatestRef.call(void 0, onDepositComplete);
|
|
885
|
+
const onDepositFailedRef = _chunkBRYNGLDMcjs.useLatestRef.call(void 0, onDepositFailed);
|
|
886
|
+
const onErrorRef = _chunkBRYNGLDMcjs.useLatestRef.call(void 0, onError);
|
|
887
|
+
const explorerTxUrl = _chunkBRYNGLDMcjs.useExplorerTxUrl.call(void 0, );
|
|
888
888
|
const initialTerminalEventRef = _react.useRef.call(void 0, null);
|
|
889
889
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
890
890
|
if (directTransfer) return { type: "complete" };
|
|
@@ -928,7 +928,7 @@ function ProcessingStep({
|
|
|
928
928
|
completedAt,
|
|
929
929
|
endedAt: completedAt
|
|
930
930
|
}));
|
|
931
|
-
|
|
931
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "direct-transfer:complete", {
|
|
932
932
|
txHash,
|
|
933
933
|
flowLabel
|
|
934
934
|
});
|
|
@@ -959,7 +959,7 @@ function ProcessingStep({
|
|
|
959
959
|
if (!outcome) return;
|
|
960
960
|
if (outcome.type === "complete") {
|
|
961
961
|
const context = processingContextRef.current;
|
|
962
|
-
|
|
962
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "initial-event:complete", {
|
|
963
963
|
txHash,
|
|
964
964
|
destinationTxHash: outcome.destinationTxHash,
|
|
965
965
|
event: event.type
|
|
@@ -975,7 +975,7 @@ function ProcessingStep({
|
|
|
975
975
|
})]);
|
|
976
976
|
return;
|
|
977
977
|
}
|
|
978
|
-
|
|
978
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "initial-event:failed", {
|
|
979
979
|
txHash,
|
|
980
980
|
message: outcome.message,
|
|
981
981
|
event: event.type
|
|
@@ -1081,7 +1081,7 @@ function ProcessingStep({
|
|
|
1081
1081
|
async function pollStatus() {
|
|
1082
1082
|
try {
|
|
1083
1083
|
const account = sourceChain === "solana" && solanaDepositAddress ? solanaDepositAddress : smartAccount;
|
|
1084
|
-
|
|
1084
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "poll:request", {
|
|
1085
1085
|
account,
|
|
1086
1086
|
txHash,
|
|
1087
1087
|
intervalMs: pollIntervalRef.current
|
|
@@ -1092,7 +1092,7 @@ function ProcessingStep({
|
|
|
1092
1092
|
const eventForCurrentTx = eventMatchesTx ? lastEvent2 : void 0;
|
|
1093
1093
|
if (lastEvent2) {
|
|
1094
1094
|
const eventData = lastEvent2.data;
|
|
1095
|
-
|
|
1095
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "poll:event", {
|
|
1096
1096
|
type: lastEvent2.type,
|
|
1097
1097
|
matchesTx: eventMatchesTx,
|
|
1098
1098
|
intentId: _optionalChain([eventData, 'optionalAccess', _80 => _80.intentId])
|
|
@@ -1102,7 +1102,7 @@ function ProcessingStep({
|
|
|
1102
1102
|
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _81 => _81.type]) === "bridge-complete") {
|
|
1103
1103
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
1104
1104
|
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _82 => _82.data, 'optionalAccess', _83 => _83.destination, 'optionalAccess', _84 => _84.transactionHash]);
|
|
1105
|
-
|
|
1105
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "state:complete", {
|
|
1106
1106
|
txHash,
|
|
1107
1107
|
destinationTxHash: destinationTxHash2,
|
|
1108
1108
|
event: eventForCurrentTx.type
|
|
@@ -1126,7 +1126,7 @@ function ProcessingStep({
|
|
|
1126
1126
|
message: formatted.message,
|
|
1127
1127
|
lastEvent: eventForCurrentTx
|
|
1128
1128
|
});
|
|
1129
|
-
|
|
1129
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "state:failed", {
|
|
1130
1130
|
txHash,
|
|
1131
1131
|
message: formatted.message,
|
|
1132
1132
|
code: formatted.code
|
|
@@ -1141,7 +1141,7 @@ function ProcessingStep({
|
|
|
1141
1141
|
message: errorMessage,
|
|
1142
1142
|
lastEvent: eventForCurrentTx
|
|
1143
1143
|
});
|
|
1144
|
-
|
|
1144
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "state:error-event", {
|
|
1145
1145
|
txHash,
|
|
1146
1146
|
message: errorMessage
|
|
1147
1147
|
});
|
|
@@ -1154,7 +1154,7 @@ function ProcessingStep({
|
|
|
1154
1154
|
}));
|
|
1155
1155
|
scheduleNextPoll();
|
|
1156
1156
|
} catch (error) {
|
|
1157
|
-
|
|
1157
|
+
_chunkBRYNGLDMcjs.debugError.call(void 0, debug, "processing", "poll:failure", error, {
|
|
1158
1158
|
smartAccount,
|
|
1159
1159
|
txHash,
|
|
1160
1160
|
intervalMs: pollIntervalRef.current
|
|
@@ -1169,7 +1169,7 @@ function ProcessingStep({
|
|
|
1169
1169
|
pollIntervalRef.current * BACKOFF_MULTIPLIER,
|
|
1170
1170
|
MAX_POLL_INTERVAL
|
|
1171
1171
|
);
|
|
1172
|
-
|
|
1172
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "poll:scheduled", {
|
|
1173
1173
|
nextIntervalMs: pollIntervalRef.current
|
|
1174
1174
|
});
|
|
1175
1175
|
pollStatus();
|
|
@@ -1202,7 +1202,7 @@ function ProcessingStep({
|
|
|
1202
1202
|
escalatedDelayRef.current = true;
|
|
1203
1203
|
setHasEscalatedDelay(true);
|
|
1204
1204
|
const message = "Transfer is taking longer than expected. Your funds are safe and processing will continue automatically.";
|
|
1205
|
-
|
|
1205
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "processing", "state:delay-escalated", {
|
|
1206
1206
|
txHash,
|
|
1207
1207
|
timeoutMs: ESCALATED_DELAY_MS
|
|
1208
1208
|
});
|
|
@@ -1227,7 +1227,7 @@ function ProcessingStep({
|
|
|
1227
1227
|
const sourceExplorerUrl = explorerTxUrl(displaySourceChain, txHash);
|
|
1228
1228
|
const destExplorerUrl = destinationTxHash ? explorerTxUrl(targetChainId, destinationTxHash) : null;
|
|
1229
1229
|
const sourceDisplay = (() => {
|
|
1230
|
-
const resolved =
|
|
1230
|
+
const resolved = _chunkBRYNGLDMcjs.resolveTokenDisplay.call(void 0, displaySourceToken, displaySourceChain, {
|
|
1231
1231
|
symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
|
|
1232
1232
|
decimals: providedSourceDecimals
|
|
1233
1233
|
});
|
|
@@ -1237,10 +1237,10 @@ function ProcessingStep({
|
|
|
1237
1237
|
};
|
|
1238
1238
|
})();
|
|
1239
1239
|
const sourceSymbol = sourceDisplay.symbol;
|
|
1240
|
-
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(
|
|
1241
|
-
|
|
1240
|
+
const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(_chunkBRYNGLDMcjs.formatRawTokenAmount.call(void 0, displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
|
|
1241
|
+
_chunkBRYNGLDMcjs.formatTokenAmount.call(void 0, Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
|
|
1242
1242
|
const eventDestination = getEventDestinationDetails(lastEvent);
|
|
1243
|
-
const targetDisplay =
|
|
1243
|
+
const targetDisplay = _chunkBRYNGLDMcjs.resolveTokenDisplay.call(void 0,
|
|
1244
1244
|
_nullishCoalesce(eventDestination.token, () => ( targetToken)),
|
|
1245
1245
|
_nullishCoalesce(eventDestination.chainId, () => ( targetChainId)),
|
|
1246
1246
|
// Dapp deposits default to USDC targets; mirror the source symbol last so
|
|
@@ -1248,7 +1248,7 @@ function ProcessingStep({
|
|
|
1248
1248
|
{ symbol: _nullishCoalesce(providedSourceSymbol, () => ( "USDC")) }
|
|
1249
1249
|
);
|
|
1250
1250
|
const targetSymbol = targetDisplay.symbol;
|
|
1251
|
-
const formattedDestinationAmount = eventDestination.amount !== void 0 ?
|
|
1251
|
+
const formattedDestinationAmount = eventDestination.amount !== void 0 ? _chunkBRYNGLDMcjs.formatRawTokenAmount.call(void 0, eventDestination.amount, targetDisplay) : void 0;
|
|
1252
1252
|
const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
|
|
1253
1253
|
const prices = useTokenPrices(service, [
|
|
1254
1254
|
{
|
|
@@ -1263,17 +1263,17 @@ function ProcessingStep({
|
|
|
1263
1263
|
}
|
|
1264
1264
|
]);
|
|
1265
1265
|
const estimatedReceiveAmount = (() => {
|
|
1266
|
-
const estimate =
|
|
1267
|
-
sourceAmount:
|
|
1266
|
+
const estimate = _chunkBRYNGLDMcjs.estimateReceiveAmount.call(void 0, {
|
|
1267
|
+
sourceAmount: _chunkBRYNGLDMcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals),
|
|
1268
1268
|
sourceSymbol: sourceDisplay.symbol,
|
|
1269
1269
|
targetSymbol: targetDisplay.symbol,
|
|
1270
1270
|
sourceAmountUsd: amountUsdNumber,
|
|
1271
|
-
sourceTrusted:
|
|
1271
|
+
sourceTrusted: _chunkBRYNGLDMcjs.isRecognizedToken.call(void 0, displaySourceToken, displaySourceChain),
|
|
1272
1272
|
prices
|
|
1273
1273
|
});
|
|
1274
|
-
return estimate !== void 0 ?
|
|
1274
|
+
return estimate !== void 0 ? _chunkBRYNGLDMcjs.formatTokenAmount.call(void 0, estimate, targetDisplay.symbol) : void 0;
|
|
1275
1275
|
})();
|
|
1276
|
-
const quotedReceive = quote ?
|
|
1276
|
+
const quotedReceive = quote ? _chunkBRYNGLDMcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol) : void 0;
|
|
1277
1277
|
const receiveDisplay = formattedDestinationAmount ? (
|
|
1278
1278
|
// The delivered amount, once the bridge reports it — actual, not an
|
|
1279
1279
|
// estimate, so it wins over the quote and carries no "~".
|
|
@@ -1287,12 +1287,12 @@ function ProcessingStep({
|
|
|
1287
1287
|
if (sourceSymbol.toUpperCase() !== targetSymbol.toUpperCase()) {
|
|
1288
1288
|
return void 0;
|
|
1289
1289
|
}
|
|
1290
|
-
const sentValue =
|
|
1291
|
-
const receivedValue = eventDestination.amount !== void 0 ?
|
|
1290
|
+
const sentValue = _chunkBRYNGLDMcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals);
|
|
1291
|
+
const receivedValue = eventDestination.amount !== void 0 ? _chunkBRYNGLDMcjs.tokenAmountToNumber.call(void 0, eventDestination.amount, targetDisplay.decimals) : void 0;
|
|
1292
1292
|
if (sentValue === void 0 || receivedValue === void 0 || sentValue <= receivedValue) {
|
|
1293
1293
|
return void 0;
|
|
1294
1294
|
}
|
|
1295
|
-
const formatted =
|
|
1295
|
+
const formatted = _chunkBRYNGLDMcjs.formatTokenAmount.call(void 0, sentValue - receivedValue, sourceSymbol);
|
|
1296
1296
|
if (formatted === void 0 || Number(formatted.replace(/,/g, "")) === 0) {
|
|
1297
1297
|
return void 0;
|
|
1298
1298
|
}
|
|
@@ -1319,7 +1319,7 @@ function ProcessingStep({
|
|
|
1319
1319
|
] }) : isFailed ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
1320
1320
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FailedBadge, {}),
|
|
1321
1321
|
/* @__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 }) })
|
|
1322
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1322
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.WalletIcon, {}), title: stateTitle });
|
|
1323
1323
|
if (isComplete && isSwappedOrder) {
|
|
1324
1324
|
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _102 => _102.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _103 => _103.paymentMethod]))), () => ( null));
|
|
1325
1325
|
const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
|
|
@@ -1341,7 +1341,7 @@ function ProcessingStep({
|
|
|
1341
1341
|
if (onrampFeeUsd != null) {
|
|
1342
1342
|
feeRows.push({
|
|
1343
1343
|
label: "On-ramp fee",
|
|
1344
|
-
value:
|
|
1344
|
+
value: _chunkBRYNGLDMcjs.formatFeeUsd.call(void 0, onrampFeeUsd)
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
1347
|
const hasFallbackFee = quoteFeeRows.length === 0 && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount));
|
|
@@ -1350,13 +1350,13 @@ function ProcessingStep({
|
|
|
1350
1350
|
} else if (hasFallbackFee) {
|
|
1351
1351
|
feeRows.push({
|
|
1352
1352
|
label: "Network fee",
|
|
1353
|
-
value:
|
|
1353
|
+
value: _chunkBRYNGLDMcjs.formatFeeUsd.call(void 0, Number(quotedFeeAmount)),
|
|
1354
1354
|
strike: feeSponsored,
|
|
1355
1355
|
tooltip: feeSponsored ? sponsoredFeeTooltip : void 0
|
|
1356
1356
|
});
|
|
1357
1357
|
}
|
|
1358
1358
|
const fallbackChargeableUsd = hasFallbackFee && !feeSponsored ? Number(quotedFeeAmount) : 0;
|
|
1359
|
-
const feesTotal = feeRows.length > 0 ?
|
|
1359
|
+
const feesTotal = feeRows.length > 0 ? _chunkBRYNGLDMcjs.formatFeeUsd.call(void 0,
|
|
1360
1360
|
(_nullishCoalesce(onrampFeeUsd, () => ( 0))) + chargeableUsd + fallbackChargeableUsd
|
|
1361
1361
|
) : null;
|
|
1362
1362
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1384,7 +1384,7 @@ function ProcessingStep({
|
|
|
1384
1384
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
1385
1385
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1386
1386
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
1387
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1387
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.CdnIcon, { src: sourceChainIcon }) }),
|
|
1388
1388
|
sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1389
1389
|
"a",
|
|
1390
1390
|
{
|
|
@@ -1393,7 +1393,7 @@ function ProcessingStep({
|
|
|
1393
1393
|
rel: "noopener noreferrer",
|
|
1394
1394
|
className: "rs-review-detail-link",
|
|
1395
1395
|
"aria-label": "View source transaction",
|
|
1396
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1396
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.ExternalLinkIcon, {})
|
|
1397
1397
|
}
|
|
1398
1398
|
)
|
|
1399
1399
|
] })
|
|
@@ -1402,7 +1402,7 @@ function ProcessingStep({
|
|
|
1402
1402
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
1403
1403
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1404
1404
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
1405
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1405
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.CdnIcon, { src: targetChainIcon }) }),
|
|
1406
1406
|
destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1407
1407
|
"a",
|
|
1408
1408
|
{
|
|
@@ -1411,7 +1411,7 @@ function ProcessingStep({
|
|
|
1411
1411
|
rel: "noopener noreferrer",
|
|
1412
1412
|
className: "rs-review-detail-link",
|
|
1413
1413
|
"aria-label": "View destination transaction",
|
|
1414
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1414
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.ExternalLinkIcon, {})
|
|
1415
1415
|
}
|
|
1416
1416
|
)
|
|
1417
1417
|
] })
|
|
@@ -1448,7 +1448,7 @@ function ProcessingStep({
|
|
|
1448
1448
|
" ",
|
|
1449
1449
|
sourceSymbol
|
|
1450
1450
|
] }),
|
|
1451
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1451
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
1452
1452
|
] })
|
|
1453
1453
|
] })
|
|
1454
1454
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1459,14 +1459,14 @@ function ProcessingStep({
|
|
|
1459
1459
|
" ",
|
|
1460
1460
|
sourceSymbol
|
|
1461
1461
|
] }),
|
|
1462
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1462
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.TokenIcon, { symbol: sourceSymbol }) })
|
|
1463
1463
|
] })
|
|
1464
1464
|
] }),
|
|
1465
1465
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1466
1466
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
|
|
1467
1467
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1468
1468
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
1469
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1469
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
1470
1470
|
] })
|
|
1471
1471
|
] }),
|
|
1472
1472
|
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1495,12 +1495,12 @@ function ProcessingStep({
|
|
|
1495
1495
|
{
|
|
1496
1496
|
className: "rs-review-detail-info",
|
|
1497
1497
|
"aria-label": "Fee info",
|
|
1498
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1498
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.InfoIcon, {})
|
|
1499
1499
|
}
|
|
1500
1500
|
) })
|
|
1501
1501
|
] })
|
|
1502
1502
|
] }) : (() => {
|
|
1503
|
-
const { display, struck } =
|
|
1503
|
+
const { display, struck } = _chunkBRYNGLDMcjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'optionalAccess', _112 => _112.fees]));
|
|
1504
1504
|
if (display !== null) {
|
|
1505
1505
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1506
1506
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
@@ -1531,9 +1531,9 @@ function ProcessingStep({
|
|
|
1531
1531
|
] });
|
|
1532
1532
|
})()
|
|
1533
1533
|
] }),
|
|
1534
|
-
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1534
|
+
isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.Callout, { variant: "error", children: failureMessage }),
|
|
1535
1535
|
isProcessing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1536
|
-
|
|
1536
|
+
_chunkBRYNGLDMcjs.Button,
|
|
1537
1537
|
{
|
|
1538
1538
|
fullWidth: true,
|
|
1539
1539
|
disabled: true,
|
|
@@ -1543,18 +1543,18 @@ function ProcessingStep({
|
|
|
1543
1543
|
}
|
|
1544
1544
|
),
|
|
1545
1545
|
isComplete && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
1546
|
-
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1546
|
+
onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBRYNGLDMcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
|
|
1547
1547
|
"New ",
|
|
1548
1548
|
flowNoun
|
|
1549
1549
|
] }),
|
|
1550
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1550
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
1551
1551
|
] }),
|
|
1552
1552
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
|
|
1553
|
-
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1554
|
-
handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1553
|
+
onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
|
|
1554
|
+
handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
|
|
1555
1555
|
] })
|
|
1556
1556
|
] }),
|
|
1557
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1557
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBRYNGLDMcjs.PoweredBy, {})
|
|
1558
1558
|
] });
|
|
1559
1559
|
}
|
|
1560
1560
|
|
|
@@ -1645,7 +1645,7 @@ async function runAccountSetup(input, deps) {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
try {
|
|
1647
1647
|
const salt = deriveAccountSalt(input);
|
|
1648
|
-
|
|
1648
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
|
|
1649
1649
|
salt,
|
|
1650
1650
|
recipient: input.recipient,
|
|
1651
1651
|
targetChain: input.targetChain,
|
|
@@ -1671,7 +1671,7 @@ async function runAccountSetup(input, deps) {
|
|
|
1671
1671
|
cacheKey
|
|
1672
1672
|
};
|
|
1673
1673
|
} catch (error) {
|
|
1674
|
-
|
|
1674
|
+
_chunkBRYNGLDMcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
|
|
1675
1675
|
recipient: input.recipient
|
|
1676
1676
|
});
|
|
1677
1677
|
if (error instanceof SetupError) throw error;
|
|
@@ -1682,7 +1682,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
|
|
|
1682
1682
|
const now = Date.now();
|
|
1683
1683
|
const existing = setupRequestDedupe.get(requestKey);
|
|
1684
1684
|
if (existing && (!existing.settled || existing.expiresAt > now)) {
|
|
1685
|
-
|
|
1685
|
+
_chunkBRYNGLDMcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
|
|
1686
1686
|
recipient: input.recipient,
|
|
1687
1687
|
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
|
|
1688
1688
|
});
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
runAccountSetupDeduped,
|
|
18
18
|
txRefsMatch,
|
|
19
19
|
warnRemovedProps
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-J46WDSRD.mjs";
|
|
21
21
|
import {
|
|
22
22
|
ListRow
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JE4R5VA3.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AlertTriangleIcon,
|
|
26
26
|
AppleIcon,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
useLatestRef,
|
|
87
87
|
useRpcUrls,
|
|
88
88
|
useStableRpcUrls
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-FXXUIK4E.mjs";
|
|
90
90
|
import {
|
|
91
91
|
POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
|
|
92
92
|
POLYMARKET_ICON_URL,
|
|
@@ -8756,7 +8756,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
8756
8756
|
// src/DepositModal.tsx
|
|
8757
8757
|
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8758
8758
|
var ReownDepositInner = lazy2(
|
|
8759
|
-
() => import("./DepositModalReown-
|
|
8759
|
+
() => import("./DepositModalReown-TEC3MEZ4.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
8760
8760
|
);
|
|
8761
8761
|
function sortByCreatedAtDesc(items) {
|
|
8762
8762
|
return [...items].sort((a, b) => {
|