@rhinestone/deposit-modal 0.18.0 → 0.19.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/README.md +49 -8
- package/dist/{DepositModalReown-TVO3ZQQK.cjs → DepositModalReown-UITYXJ6W.cjs} +16 -16
- package/dist/{DepositModalReown-VCY65DJX.mjs → DepositModalReown-XBNY6QCI.mjs} +3 -3
- package/dist/{WithdrawModal-RMCYJJ4S.mjs → WithdrawModal-DY6A55OA.mjs} +3 -3
- package/dist/WithdrawModal-V42OK7L3.cjs +11 -0
- package/dist/{chunk-AIZKGFVA.mjs → chunk-5NWLS5BQ.mjs} +69 -19
- package/dist/{chunk-R2B6VD4E.mjs → chunk-BIL4ENC3.mjs} +1 -1
- package/dist/{chunk-34JVJZEZ.cjs → chunk-EG4H7OMC.cjs} +71 -71
- package/dist/{chunk-N3AAT6BS.cjs → chunk-HMUGY66O.cjs} +226 -176
- package/dist/{chunk-O4JZKKCZ.cjs → chunk-ISLVD5HQ.cjs} +2 -2
- package/dist/{chunk-EKC2IRQG.mjs → chunk-NITKDXHR.mjs} +211 -31
- package/dist/{chunk-JV5OGG53.cjs → chunk-OCWSMLOP.cjs} +724 -544
- package/dist/{chunk-N6JJG57R.cjs → chunk-PYOC6K24.cjs} +1 -1
- package/dist/{chunk-3TEVMP76.mjs → chunk-X6N2XPTO.mjs} +1 -1
- package/dist/{chunk-X4EUXBHJ.mjs → chunk-ZGHVJ2XM.mjs} +1 -1
- package/dist/compliance.cjs +4 -4
- package/dist/compliance.mjs +2 -2
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/embed.cjs +14 -14
- package/dist/embed.d.cts +1 -1
- package/dist/embed.d.ts +1 -1
- package/dist/embed.mjs +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/offramp.cjs +9 -9
- package/dist/offramp.mjs +7 -7
- package/dist/onramp.cjs +24 -11
- package/dist/onramp.d.cts +24 -6
- package/dist/onramp.d.ts +24 -6
- package/dist/onramp.mjs +22 -9
- package/dist/styles.css +25 -0
- package/dist/{types-CZYypODQ.d.ts → types-BOxa1DE-.d.ts} +37 -2
- package/dist/{types-CbUs4boj.d.cts → types-BShYNpvO.d.cts} +37 -2
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +5 -5
- package/dist/WithdrawModal-GR3HLYXU.cjs +0 -11
|
@@ -35,7 +35,7 @@ var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkPYOC6K24cjs = require('./chunk-PYOC6K24.cjs');
|
|
39
39
|
|
|
40
40
|
// src/components/ui/Modal.tsx
|
|
41
41
|
|
|
@@ -625,6 +625,8 @@ function parseQuotePreview(raw) {
|
|
|
625
625
|
}
|
|
626
626
|
const output = parseQuoteOutput(obj.output);
|
|
627
627
|
if (!output) return null;
|
|
628
|
+
const input = obj.input === void 0 ? void 0 : parseQuoteOutput(obj.input);
|
|
629
|
+
if (obj.input !== void 0 && !input) return null;
|
|
628
630
|
const fees = obj.fees;
|
|
629
631
|
if (typeof fees !== "object" || fees === null) return null;
|
|
630
632
|
const total = fees.total;
|
|
@@ -657,6 +659,7 @@ function parseQuotePreview(raw) {
|
|
|
657
659
|
estimatedFillTimeSeconds: obj.estimatedFillTimeSeconds,
|
|
658
660
|
fees: { total: { usd: totalUsd }, breakdown },
|
|
659
661
|
output,
|
|
662
|
+
...input ? { input } : {},
|
|
660
663
|
...timing ? { timing } : {}
|
|
661
664
|
};
|
|
662
665
|
}
|
|
@@ -846,7 +849,7 @@ function createDepositService(baseUrl, options) {
|
|
|
846
849
|
try {
|
|
847
850
|
const response = await fetch(apiUrl("/qr/tokens"), {
|
|
848
851
|
method: "GET",
|
|
849
|
-
headers:
|
|
852
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, )
|
|
850
853
|
});
|
|
851
854
|
if (!response.ok) {
|
|
852
855
|
debugLog(debug, scope, "getTopTokens:unavailable", {
|
|
@@ -873,7 +876,7 @@ function createDepositService(baseUrl, options) {
|
|
|
873
876
|
try {
|
|
874
877
|
const response = await fetch(apiUrl("/chains"), {
|
|
875
878
|
method: "GET",
|
|
876
|
-
headers:
|
|
879
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, )
|
|
877
880
|
});
|
|
878
881
|
if (!response.ok) {
|
|
879
882
|
debugLog(debug, scope, "getChains:unavailable", {
|
|
@@ -927,7 +930,7 @@ function createDepositService(baseUrl, options) {
|
|
|
927
930
|
});
|
|
928
931
|
const response = await fetch(url, {
|
|
929
932
|
method: "POST",
|
|
930
|
-
headers:
|
|
933
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
931
934
|
body: JSON.stringify({ account: params })
|
|
932
935
|
});
|
|
933
936
|
if (!response.ok) {
|
|
@@ -962,7 +965,7 @@ function createDepositService(baseUrl, options) {
|
|
|
962
965
|
debugLog(debug, scope, "fetchPortfolio:request", { url, address });
|
|
963
966
|
const response = await fetch(url, {
|
|
964
967
|
method: "GET",
|
|
965
|
-
headers:
|
|
968
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, )
|
|
966
969
|
});
|
|
967
970
|
if (!response.ok) {
|
|
968
971
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1013,7 +1016,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1013
1016
|
});
|
|
1014
1017
|
const response = await fetch(url, {
|
|
1015
1018
|
method: "GET",
|
|
1016
|
-
headers:
|
|
1019
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, )
|
|
1017
1020
|
});
|
|
1018
1021
|
if (!response.ok) {
|
|
1019
1022
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1042,7 +1045,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1042
1045
|
debugLog(debug, scope, "checkAccount:request", { url, address });
|
|
1043
1046
|
const response = await fetch(url, {
|
|
1044
1047
|
method: "GET",
|
|
1045
|
-
headers:
|
|
1048
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, )
|
|
1046
1049
|
});
|
|
1047
1050
|
if (!response.ok) {
|
|
1048
1051
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1078,7 +1081,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1078
1081
|
);
|
|
1079
1082
|
const response = await fetch(url, {
|
|
1080
1083
|
method: "GET",
|
|
1081
|
-
headers:
|
|
1084
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1082
1085
|
cache: "no-store"
|
|
1083
1086
|
});
|
|
1084
1087
|
if (!response.ok) {
|
|
@@ -1106,7 +1109,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1106
1109
|
);
|
|
1107
1110
|
const response = await fetch(url, {
|
|
1108
1111
|
method: "GET",
|
|
1109
|
-
headers:
|
|
1112
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1110
1113
|
cache: "no-store"
|
|
1111
1114
|
});
|
|
1112
1115
|
if (!response.ok) {
|
|
@@ -1130,7 +1133,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1130
1133
|
);
|
|
1131
1134
|
const response = await fetch(url, {
|
|
1132
1135
|
method: "GET",
|
|
1133
|
-
headers:
|
|
1136
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1134
1137
|
cache: "no-store"
|
|
1135
1138
|
});
|
|
1136
1139
|
if (!response.ok) {
|
|
@@ -1152,7 +1155,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1152
1155
|
async getPositions(address) {
|
|
1153
1156
|
const url = apiUrl(`/positions/${address}`);
|
|
1154
1157
|
debugLog(debug, scope, "getPositions:request", { url, address });
|
|
1155
|
-
const response = await fetch(url, { headers:
|
|
1158
|
+
const response = await fetch(url, { headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ) });
|
|
1156
1159
|
if (!response.ok) {
|
|
1157
1160
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
1158
1161
|
debugError(debug, scope, "getPositions:failed", error, {
|
|
@@ -1186,7 +1189,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1186
1189
|
});
|
|
1187
1190
|
const response = await fetch(url, {
|
|
1188
1191
|
method: "POST",
|
|
1189
|
-
headers:
|
|
1192
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1190
1193
|
body: JSON.stringify({ account, market, chainId, asset, amount })
|
|
1191
1194
|
});
|
|
1192
1195
|
if (!response.ok) {
|
|
@@ -1222,7 +1225,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1222
1225
|
});
|
|
1223
1226
|
const response = await fetch(url, {
|
|
1224
1227
|
method: "POST",
|
|
1225
|
-
headers:
|
|
1228
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1226
1229
|
body: JSON.stringify({
|
|
1227
1230
|
depositWallet,
|
|
1228
1231
|
owner,
|
|
@@ -1264,7 +1267,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1264
1267
|
});
|
|
1265
1268
|
const response = await fetch(url, {
|
|
1266
1269
|
method: "GET",
|
|
1267
|
-
headers:
|
|
1270
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1268
1271
|
cache: "no-store"
|
|
1269
1272
|
});
|
|
1270
1273
|
if (!response.ok) {
|
|
@@ -1314,7 +1317,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1314
1317
|
});
|
|
1315
1318
|
const response = await fetch(url, {
|
|
1316
1319
|
method: "GET",
|
|
1317
|
-
headers:
|
|
1320
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1318
1321
|
cache: "no-store"
|
|
1319
1322
|
});
|
|
1320
1323
|
if (!response.ok) {
|
|
@@ -1351,19 +1354,24 @@ function createDepositService(baseUrl, options) {
|
|
|
1351
1354
|
// chain, and a HyperCore source token is a 16-byte Core spot tokenId.
|
|
1352
1355
|
sourceChainId: params.sourceChainId === "hypercore" ? _chunkOY5N3E6Lcjs.HYPERCORE_SPOT_CAIP2 : `eip155:${params.sourceChainId}`,
|
|
1353
1356
|
sourceToken: params.sourceToken,
|
|
1354
|
-
amount
|
|
1357
|
+
// Each direction carries its own amount field and omits the other, which
|
|
1358
|
+
// is what the processor's "exactly one of" refinement checks. Sending
|
|
1359
|
+
// both is a 400, so spread rather than always emitting `amount`.
|
|
1360
|
+
...params.direction === "exactOut" ? { direction: "exactOut", amountOut: params.amountOut } : { amount: params.amount }
|
|
1355
1361
|
};
|
|
1356
1362
|
debugLog(debug, scope, "getQuotePreview:request", {
|
|
1357
1363
|
url,
|
|
1358
1364
|
sourceChainId: body.sourceChainId,
|
|
1359
1365
|
sourceToken: params.sourceToken,
|
|
1360
|
-
|
|
1366
|
+
direction: _nullishCoalesce(params.direction, () => ( "exactIn")),
|
|
1367
|
+
amount: params.amount,
|
|
1368
|
+
amountOut: params.amountOut
|
|
1361
1369
|
});
|
|
1362
1370
|
return withPreflightTimeout("getQuotePreview", null, async (signal) => {
|
|
1363
1371
|
try {
|
|
1364
1372
|
const response = await fetch(url, {
|
|
1365
1373
|
method: "POST",
|
|
1366
|
-
headers:
|
|
1374
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1367
1375
|
body: JSON.stringify(body),
|
|
1368
1376
|
cache: "no-store",
|
|
1369
1377
|
signal
|
|
@@ -1413,7 +1421,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1413
1421
|
try {
|
|
1414
1422
|
const response = await fetch(url, {
|
|
1415
1423
|
method: "POST",
|
|
1416
|
-
headers:
|
|
1424
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1417
1425
|
body: JSON.stringify({ ...params, kind: "auto" }),
|
|
1418
1426
|
cache: "no-store",
|
|
1419
1427
|
signal
|
|
@@ -1516,7 +1524,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1516
1524
|
try {
|
|
1517
1525
|
response = await fetch(url, {
|
|
1518
1526
|
method: "POST",
|
|
1519
|
-
headers:
|
|
1527
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1520
1528
|
body: JSON.stringify(params)
|
|
1521
1529
|
});
|
|
1522
1530
|
} catch (error) {
|
|
@@ -1567,7 +1575,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1567
1575
|
try {
|
|
1568
1576
|
const response = await fetch(url, {
|
|
1569
1577
|
method: "GET",
|
|
1570
|
-
headers:
|
|
1578
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1571
1579
|
cache: "no-store"
|
|
1572
1580
|
});
|
|
1573
1581
|
if (!response.ok) {
|
|
@@ -1599,7 +1607,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1599
1607
|
try {
|
|
1600
1608
|
const response = await fetch(url, {
|
|
1601
1609
|
method: "GET",
|
|
1602
|
-
headers:
|
|
1610
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1603
1611
|
cache: "no-store"
|
|
1604
1612
|
});
|
|
1605
1613
|
if (!response.ok) {
|
|
@@ -1624,7 +1632,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1624
1632
|
});
|
|
1625
1633
|
const response = await fetch(url, {
|
|
1626
1634
|
method: "POST",
|
|
1627
|
-
headers:
|
|
1635
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1628
1636
|
body: JSON.stringify(params)
|
|
1629
1637
|
});
|
|
1630
1638
|
if (!response.ok) {
|
|
@@ -1656,7 +1664,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1656
1664
|
});
|
|
1657
1665
|
const response = await fetch(url, {
|
|
1658
1666
|
method: "POST",
|
|
1659
|
-
headers:
|
|
1667
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1660
1668
|
body: JSON.stringify(params)
|
|
1661
1669
|
});
|
|
1662
1670
|
if (!response.ok) {
|
|
@@ -1693,7 +1701,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1693
1701
|
debugLog(debug, scope, "getSwappedConnectExchanges:request");
|
|
1694
1702
|
const response = await fetch(url, {
|
|
1695
1703
|
method: "GET",
|
|
1696
|
-
headers:
|
|
1704
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1697
1705
|
cache: "no-store"
|
|
1698
1706
|
});
|
|
1699
1707
|
if (!response.ok) {
|
|
@@ -1746,7 +1754,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1746
1754
|
try {
|
|
1747
1755
|
const response = await fetch(url, {
|
|
1748
1756
|
method: "GET",
|
|
1749
|
-
headers:
|
|
1757
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1750
1758
|
cache: "no-store"
|
|
1751
1759
|
});
|
|
1752
1760
|
if (!response.ok) {
|
|
@@ -1834,7 +1842,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1834
1842
|
try {
|
|
1835
1843
|
const response = await fetch(url, {
|
|
1836
1844
|
method: "GET",
|
|
1837
|
-
headers:
|
|
1845
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1838
1846
|
cache: "no-store"
|
|
1839
1847
|
});
|
|
1840
1848
|
if (!response.ok) {
|
|
@@ -1861,7 +1869,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1861
1869
|
);
|
|
1862
1870
|
const response = await fetch(url, {
|
|
1863
1871
|
method: "GET",
|
|
1864
|
-
headers:
|
|
1872
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
1865
1873
|
cache: "no-store"
|
|
1866
1874
|
});
|
|
1867
1875
|
if (!response.ok) return null;
|
|
@@ -2768,7 +2776,7 @@ function createIngestTransport(options) {
|
|
|
2768
2776
|
try {
|
|
2769
2777
|
response = await fetchImpl(mintUrl, {
|
|
2770
2778
|
method: "POST",
|
|
2771
|
-
headers:
|
|
2779
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
2772
2780
|
signal: _optionalChain([controller, 'optionalAccess', _126 => _126.signal])
|
|
2773
2781
|
});
|
|
2774
2782
|
} catch (e7) {
|
|
@@ -3029,7 +3037,7 @@ function AnalyticsSession(props) {
|
|
|
3029
3037
|
type: "analytics_ingest_failure",
|
|
3030
3038
|
session_id: sessionIdRef.current,
|
|
3031
3039
|
modal,
|
|
3032
|
-
widget_version:
|
|
3040
|
+
widget_version: _chunkPYOC6K24cjs.MODAL_VERSION,
|
|
3033
3041
|
timestamp: nowRef.current().toISOString(),
|
|
3034
3042
|
reason,
|
|
3035
3043
|
...status === void 0 ? {} : { status },
|
|
@@ -3057,7 +3065,7 @@ function AnalyticsSession(props) {
|
|
|
3057
3065
|
proxyOrigin,
|
|
3058
3066
|
sessionId: sessionIdRef.current,
|
|
3059
3067
|
modal,
|
|
3060
|
-
widgetVersion:
|
|
3068
|
+
widgetVersion: _chunkPYOC6K24cjs.MODAL_VERSION,
|
|
3061
3069
|
sessionProperties: sessionPropertiesRef.current,
|
|
3062
3070
|
onFailure: (failure) => emitFailure(failure),
|
|
3063
3071
|
fetchImpl: props.fetchImpl,
|
|
@@ -3113,7 +3121,7 @@ function AnalyticsSession(props) {
|
|
|
3113
3121
|
...payload,
|
|
3114
3122
|
session_id: sessionIdRef.current,
|
|
3115
3123
|
modal,
|
|
3116
|
-
widget_version:
|
|
3124
|
+
widget_version: _chunkPYOC6K24cjs.MODAL_VERSION,
|
|
3117
3125
|
timestamp: nowRef.current().toISOString(),
|
|
3118
3126
|
session_properties: sessionPropertiesRef.current,
|
|
3119
3127
|
funding_method: fundingMethod
|
|
@@ -3132,7 +3140,7 @@ function AnalyticsSession(props) {
|
|
|
3132
3140
|
...payload,
|
|
3133
3141
|
session_id: sessionIdRef.current,
|
|
3134
3142
|
modal,
|
|
3135
|
-
widget_version:
|
|
3143
|
+
widget_version: _chunkPYOC6K24cjs.MODAL_VERSION,
|
|
3136
3144
|
timestamp: nowRef.current().toISOString(),
|
|
3137
3145
|
session_properties: sessionPropertiesRef.current
|
|
3138
3146
|
};
|
|
@@ -3148,7 +3156,7 @@ function AnalyticsSession(props) {
|
|
|
3148
3156
|
...payload,
|
|
3149
3157
|
session_id: sessionIdRef.current,
|
|
3150
3158
|
modal,
|
|
3151
|
-
widget_version:
|
|
3159
|
+
widget_version: _chunkPYOC6K24cjs.MODAL_VERSION,
|
|
3152
3160
|
timestamp: nowRef.current().toISOString(),
|
|
3153
3161
|
session_properties: sessionPropertiesRef.current
|
|
3154
3162
|
};
|
|
@@ -3203,6 +3211,7 @@ function toRecoverableDeposit(row, options = {}) {
|
|
|
3203
3211
|
depositId: row.id,
|
|
3204
3212
|
signer,
|
|
3205
3213
|
destinationPrefill: signer,
|
|
3214
|
+
depositAddress: row.depositAddress,
|
|
3206
3215
|
sourceChainId,
|
|
3207
3216
|
targetChainId,
|
|
3208
3217
|
token: row.token,
|
|
@@ -3210,6 +3219,12 @@ function toRecoverableDeposit(row, options = {}) {
|
|
|
3210
3219
|
sourceTxHash: sourceDepositTxHash(row)
|
|
3211
3220
|
};
|
|
3212
3221
|
}
|
|
3222
|
+
function isDepositSelfDestination(row, destination) {
|
|
3223
|
+
const depositAddress = _optionalChain([row, 'access', _147 => _147.depositAddress, 'optionalAccess', _148 => _148.trim, 'call', _149 => _149()]);
|
|
3224
|
+
const candidate = destination.trim();
|
|
3225
|
+
if (!depositAddress || !candidate) return false;
|
|
3226
|
+
return depositAddress.toLowerCase() === candidate.toLowerCase();
|
|
3227
|
+
}
|
|
3213
3228
|
function recoveryFailureCause(sourceChainName) {
|
|
3214
3229
|
return sourceChainName ? `This deposit couldn't be completed. Your funds are still on ${sourceChainName}.` : "This deposit couldn't be completed and your funds were not moved.";
|
|
3215
3230
|
}
|
|
@@ -3258,7 +3273,7 @@ var STATUS_LABEL = {
|
|
|
3258
3273
|
};
|
|
3259
3274
|
function filterVisibleDeposits(deposits) {
|
|
3260
3275
|
const sourceHashes = new Set(
|
|
3261
|
-
deposits.map((d) => _optionalChain([d, 'access',
|
|
3276
|
+
deposits.map((d) => _optionalChain([d, 'access', _150 => _150.sourceTxHash, 'optionalAccess', _151 => _151.toLowerCase, 'call', _152 => _152()])).filter((h) => Boolean(h))
|
|
3262
3277
|
);
|
|
3263
3278
|
return deposits.filter(
|
|
3264
3279
|
(d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
|
|
@@ -3376,7 +3391,7 @@ function CdnIcon({
|
|
|
3376
3391
|
}
|
|
3377
3392
|
const isLoading = loadedSrc !== src;
|
|
3378
3393
|
const settleIfAlreadyComplete = (el) => {
|
|
3379
|
-
if (_optionalChain([el, 'optionalAccess',
|
|
3394
|
+
if (_optionalChain([el, 'optionalAccess', _153 => _153.complete])) setLoadedSrc(src);
|
|
3380
3395
|
};
|
|
3381
3396
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3382
3397
|
"img",
|
|
@@ -3798,7 +3813,7 @@ function DepositHistoryPanel({
|
|
|
3798
3813
|
}) {
|
|
3799
3814
|
const rootRef = _react.useRef.call(void 0, null);
|
|
3800
3815
|
_react.useEffect.call(void 0, () => {
|
|
3801
|
-
_optionalChain([rootRef, 'access',
|
|
3816
|
+
_optionalChain([rootRef, 'access', _154 => _154.current, 'optionalAccess', _155 => _155.toggleAttribute, 'call', _156 => _156("inert", Boolean(obscured))]);
|
|
3802
3817
|
}, [obscured]);
|
|
3803
3818
|
const handleKeyDown = _react.useCallback.call(void 0,
|
|
3804
3819
|
(e) => {
|
|
@@ -3832,7 +3847,7 @@ function DepositHistoryPanel({
|
|
|
3832
3847
|
_react.useEffect.call(void 0, () => {
|
|
3833
3848
|
const nextBoundary = timingPresentations.reduce(
|
|
3834
3849
|
(earliest, presentation) => {
|
|
3835
|
-
const next = _optionalChain([presentation, 'optionalAccess',
|
|
3850
|
+
const next = _optionalChain([presentation, 'optionalAccess', _157 => _157.nextTransitionAtMs]);
|
|
3836
3851
|
if (next === void 0) return earliest;
|
|
3837
3852
|
return earliest === void 0 || next < earliest ? next : earliest;
|
|
3838
3853
|
},
|
|
@@ -3994,7 +4009,7 @@ function HistoryCard({
|
|
|
3994
4009
|
setExpanded(next);
|
|
3995
4010
|
const depositId = _nullishCoalesce(deposit.id, () => ( deposit.txHash));
|
|
3996
4011
|
if (!next || !depositId) return;
|
|
3997
|
-
_optionalChain([onRowView, 'optionalCall',
|
|
4012
|
+
_optionalChain([onRowView, 'optionalCall', _158 => _158({
|
|
3998
4013
|
depositId,
|
|
3999
4014
|
status,
|
|
4000
4015
|
recoverable: eligible !== null,
|
|
@@ -4081,7 +4096,7 @@ function HistoryCard({
|
|
|
4081
4096
|
recoverable && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
4082
4097
|
Button,
|
|
4083
4098
|
{
|
|
4084
|
-
onClick: () => _optionalChain([onRecover, 'optionalCall',
|
|
4099
|
+
onClick: () => _optionalChain([onRecover, 'optionalCall', _159 => _159(recoverable)]),
|
|
4085
4100
|
fullWidth: true,
|
|
4086
4101
|
className: "rs-history-card-recover",
|
|
4087
4102
|
children: [
|
|
@@ -4146,7 +4161,7 @@ function ListRow({
|
|
|
4146
4161
|
if (disabled) return;
|
|
4147
4162
|
if (e.key === "Enter" || e.key === " ") {
|
|
4148
4163
|
e.preventDefault();
|
|
4149
|
-
_optionalChain([onClick, 'optionalCall',
|
|
4164
|
+
_optionalChain([onClick, 'optionalCall', _160 => _160(e)]);
|
|
4150
4165
|
}
|
|
4151
4166
|
};
|
|
4152
4167
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4156,7 +4171,7 @@ function ListRow({
|
|
|
4156
4171
|
role: "button",
|
|
4157
4172
|
tabIndex: disabled ? -1 : 0,
|
|
4158
4173
|
"aria-disabled": disabled || void 0,
|
|
4159
|
-
onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall',
|
|
4174
|
+
onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _161 => _161(e)]),
|
|
4160
4175
|
onKeyDown: handleKey,
|
|
4161
4176
|
children: inner
|
|
4162
4177
|
}
|
|
@@ -4214,7 +4229,7 @@ var RECOVERY_LOOKUP_MISS_COPY = {
|
|
|
4214
4229
|
};
|
|
4215
4230
|
function classifyRecoveryLookup(rows, options = {}) {
|
|
4216
4231
|
const inScope = options.recipient ? rows.filter(
|
|
4217
|
-
(row) => _optionalChain([row, 'access',
|
|
4232
|
+
(row) => _optionalChain([row, 'access', _162 => _162.recipient, 'optionalAccess', _163 => _163.toLowerCase, 'call', _164 => _164()]) === _optionalChain([options, 'access', _165 => _165.recipient, 'optionalAccess', _166 => _166.toLowerCase, 'call', _167 => _167()])
|
|
4218
4233
|
) : rows;
|
|
4219
4234
|
const eligible = inScope.map((row) => toRecoverableDeposit(row, options)).filter((deposit) => deposit !== null);
|
|
4220
4235
|
return {
|
|
@@ -4242,7 +4257,7 @@ function RecoveryLookupScreen({
|
|
|
4242
4257
|
const valid = isRecoveryTxHash(trimmed);
|
|
4243
4258
|
_react.useEffect.call(void 0, () => {
|
|
4244
4259
|
if (trimmed.length > 0 && !valid) {
|
|
4245
|
-
_optionalChain([onInvalidRef, 'access',
|
|
4260
|
+
_optionalChain([onInvalidRef, 'access', _168 => _168.current, 'optionalCall', _169 => _169()]);
|
|
4246
4261
|
}
|
|
4247
4262
|
}, [trimmed, valid, onInvalidRef]);
|
|
4248
4263
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
@@ -4327,15 +4342,15 @@ function resolveTokenDisplay(token, chain, fallback) {
|
|
|
4327
4342
|
const decimals = _chunkOY5N3E6Lcjs.findTokenDecimals.call(void 0, token, chain);
|
|
4328
4343
|
if (symbol !== "Token" || decimals !== void 0) {
|
|
4329
4344
|
return {
|
|
4330
|
-
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess',
|
|
4331
|
-
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess',
|
|
4345
|
+
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _170 => _170.symbol]), () => ( symbol)),
|
|
4346
|
+
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _171 => _171.decimals])))
|
|
4332
4347
|
};
|
|
4333
4348
|
}
|
|
4334
4349
|
}
|
|
4335
4350
|
}
|
|
4336
4351
|
return {
|
|
4337
|
-
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess',
|
|
4338
|
-
decimals: _optionalChain([fallback, 'optionalAccess',
|
|
4352
|
+
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _172 => _172.symbol]), () => ( "Token")),
|
|
4353
|
+
decimals: _optionalChain([fallback, 'optionalAccess', _173 => _173.decimals])
|
|
4339
4354
|
};
|
|
4340
4355
|
}
|
|
4341
4356
|
function maxFractionDigitsFor(symbol) {
|
|
@@ -4589,7 +4604,7 @@ async function submitSignedRecovery(params) {
|
|
|
4589
4604
|
// The shared const, so recovery carries `x-deposit-modal-version` like
|
|
4590
4605
|
// every other backend call. Without it this path would be invisible in the
|
|
4591
4606
|
// per-client version telemetry the processor records.
|
|
4592
|
-
headers:
|
|
4607
|
+
headers: _chunkPYOC6K24cjs.serviceHeaders.call(void 0, ),
|
|
4593
4608
|
// `depositId` as a string: it is a uint256 upstream and JSON numbers lose
|
|
4594
4609
|
// precision well before that range.
|
|
4595
4610
|
body: JSON.stringify({ depositId, destination, signature })
|
|
@@ -5168,9 +5183,11 @@ function RecoveryReviewScreen({
|
|
|
5168
5183
|
txHash,
|
|
5169
5184
|
defaultDestination,
|
|
5170
5185
|
destinationHint,
|
|
5186
|
+
depositAddress,
|
|
5171
5187
|
submitting,
|
|
5172
5188
|
onSubmit,
|
|
5173
|
-
onDestinationInvalid
|
|
5189
|
+
onDestinationInvalid,
|
|
5190
|
+
onDestinationIsDepositAddress
|
|
5174
5191
|
}) {
|
|
5175
5192
|
const { symbol, amount, chainName, chainIcon } = describeRecoveryDeposit({
|
|
5176
5193
|
chainId,
|
|
@@ -5181,13 +5198,30 @@ function RecoveryReviewScreen({
|
|
|
5181
5198
|
const [destination, setDestination] = _react.useState.call(void 0,
|
|
5182
5199
|
_nullishCoalesce(defaultDestination, () => ( ""))
|
|
5183
5200
|
);
|
|
5184
|
-
const
|
|
5201
|
+
const isSelfDestination = isDepositSelfDestination(
|
|
5202
|
+
{ depositAddress },
|
|
5203
|
+
destination
|
|
5204
|
+
);
|
|
5205
|
+
const destinationValid = _viem.isAddress.call(void 0, destination) && !isSelfDestination;
|
|
5185
5206
|
const onDestinationInvalidRef = useLatestRef(onDestinationInvalid);
|
|
5207
|
+
const onDestinationIsDepositAddressRef = useLatestRef(
|
|
5208
|
+
onDestinationIsDepositAddress
|
|
5209
|
+
);
|
|
5186
5210
|
_react.useEffect.call(void 0, () => {
|
|
5187
|
-
if (destination.length
|
|
5188
|
-
|
|
5211
|
+
if (destination.length === 0) return;
|
|
5212
|
+
if (isSelfDestination) {
|
|
5213
|
+
_optionalChain([onDestinationIsDepositAddressRef, 'access', _174 => _174.current, 'optionalCall', _175 => _175()]);
|
|
5214
|
+
} else if (!destinationValid) {
|
|
5215
|
+
_optionalChain([onDestinationInvalidRef, 'access', _176 => _176.current, 'optionalCall', _177 => _177()]);
|
|
5189
5216
|
}
|
|
5190
|
-
}, [
|
|
5217
|
+
}, [
|
|
5218
|
+
destination,
|
|
5219
|
+
destinationValid,
|
|
5220
|
+
isSelfDestination,
|
|
5221
|
+
onDestinationInvalidRef,
|
|
5222
|
+
onDestinationIsDepositAddressRef
|
|
5223
|
+
]);
|
|
5224
|
+
const selfDestinationError = `${shortenAddress(destination)} is this deposit's own address. Enter a different address.`;
|
|
5191
5225
|
const txUrl = txHash ? explorerTxUrl(chainId, txHash) : null;
|
|
5192
5226
|
const txShort = txHash ? shortenHash2(txHash) : "\u2014";
|
|
5193
5227
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
@@ -5244,7 +5278,7 @@ function RecoveryReviewScreen({
|
|
|
5244
5278
|
value: destination,
|
|
5245
5279
|
onChange: (e) => setDestination(e.target.value),
|
|
5246
5280
|
hint: destinationHint,
|
|
5247
|
-
error: destination.length > 0 && !destinationValid ? "Enter a valid address" : void 0
|
|
5281
|
+
error: isSelfDestination ? selfDestinationError : destination.length > 0 && !destinationValid ? "Enter a valid address" : void 0
|
|
5248
5282
|
}
|
|
5249
5283
|
),
|
|
5250
5284
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -5343,11 +5377,11 @@ function HistoryRecoveryFlow({
|
|
|
5343
5377
|
} catch (err) {
|
|
5344
5378
|
const recoveryError = err instanceof RecoveryError ? err : void 0;
|
|
5345
5379
|
setError(
|
|
5346
|
-
_nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess',
|
|
5380
|
+
_nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess', _178 => _178.message]), () => ( formatUserError(
|
|
5347
5381
|
err instanceof Error ? err.message : "Recovery failed"
|
|
5348
5382
|
)))
|
|
5349
5383
|
);
|
|
5350
|
-
const canRetry = _nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess',
|
|
5384
|
+
const canRetry = _nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess', _179 => _179.retryable]), () => ( true));
|
|
5351
5385
|
setRetryable(canRetry);
|
|
5352
5386
|
setPhase("failed");
|
|
5353
5387
|
const reason = claimFailureReasonForError(err);
|
|
@@ -5422,9 +5456,14 @@ function HistoryRecoveryFlow({
|
|
|
5422
5456
|
txHash: deposit.sourceTxHash,
|
|
5423
5457
|
defaultDestination: deposit.destinationPrefill,
|
|
5424
5458
|
destinationHint: "Prefilled with the account this deposit was for. Editable.",
|
|
5459
|
+
depositAddress: deposit.depositAddress,
|
|
5425
5460
|
submitting,
|
|
5426
5461
|
onSubmit: submit,
|
|
5427
|
-
onDestinationInvalid: () => analytics.friction("refund_destination_invalid", "review")
|
|
5462
|
+
onDestinationInvalid: () => analytics.friction("refund_destination_invalid", "review"),
|
|
5463
|
+
onDestinationIsDepositAddress: () => analytics.friction(
|
|
5464
|
+
"refund_destination_is_deposit_address",
|
|
5465
|
+
"review"
|
|
5466
|
+
)
|
|
5428
5467
|
}
|
|
5429
5468
|
),
|
|
5430
5469
|
phase === "success" && outcome && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -5488,8 +5527,8 @@ function HistoryOverlay({
|
|
|
5488
5527
|
const endAttempt = _react.useCallback.call(void 0,
|
|
5489
5528
|
(source, reason) => {
|
|
5490
5529
|
const claim = claimControllerRef.current;
|
|
5491
|
-
_optionalChain([claim, 'optionalAccess',
|
|
5492
|
-
_optionalChain([claim, 'optionalAccess',
|
|
5530
|
+
_optionalChain([claim, 'optionalAccess', _180 => _180.abandon, 'call', _181 => _181(reason)]);
|
|
5531
|
+
_optionalChain([claim, 'optionalAccess', _182 => _182.close, 'call', _183 => _183(source)]);
|
|
5493
5532
|
claimControllerRef.current = null;
|
|
5494
5533
|
setAttempt(null);
|
|
5495
5534
|
},
|
|
@@ -5547,8 +5586,8 @@ function HistoryOverlay({
|
|
|
5547
5586
|
if (!attempt) return;
|
|
5548
5587
|
return () => {
|
|
5549
5588
|
const claim = claimControllerRef.current;
|
|
5550
|
-
_optionalChain([claim, 'optionalAccess',
|
|
5551
|
-
_optionalChain([claim, 'optionalAccess',
|
|
5589
|
+
_optionalChain([claim, 'optionalAccess', _184 => _184.abandon, 'call', _185 => _185("modal_close")]);
|
|
5590
|
+
_optionalChain([claim, 'optionalAccess', _186 => _186.close, 'call', _187 => _187("host_controlled")]);
|
|
5552
5591
|
};
|
|
5553
5592
|
}, [attempt]);
|
|
5554
5593
|
const claimSessionProperties = _react.useMemo.call(void 0,
|
|
@@ -5574,7 +5613,7 @@ function HistoryOverlay({
|
|
|
5574
5613
|
HistoryRecoveryFlow,
|
|
5575
5614
|
{
|
|
5576
5615
|
deposit: recovering,
|
|
5577
|
-
entrySource: _nullishCoalesce(_optionalChain([attempt, 'optionalAccess',
|
|
5616
|
+
entrySource: _nullishCoalesce(_optionalChain([attempt, 'optionalAccess', _188 => _188.entrySource]), () => ( "history_row")),
|
|
5578
5617
|
backendUrl,
|
|
5579
5618
|
signRecovery,
|
|
5580
5619
|
debug,
|
|
@@ -5728,7 +5767,7 @@ function useHistoryPanel({
|
|
|
5728
5767
|
}, [isOpen, badgeState2.nextExpiryAt]);
|
|
5729
5768
|
const openPanel = _react.useCallback.call(void 0, () => {
|
|
5730
5769
|
setIsPanelOpen(true);
|
|
5731
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
5770
|
+
_optionalChain([analytics, 'optionalAccess', _189 => _189.visitOpened, 'call', _190 => _190(badge)]);
|
|
5732
5771
|
if (!loadedRef.current || staleRef.current) {
|
|
5733
5772
|
fetchHistory("initial");
|
|
5734
5773
|
}
|
|
@@ -5736,10 +5775,10 @@ function useHistoryPanel({
|
|
|
5736
5775
|
const closePanel = _react.useCallback.call(void 0, () => {
|
|
5737
5776
|
if (recovering) return;
|
|
5738
5777
|
setIsPanelOpen(false);
|
|
5739
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
5778
|
+
_optionalChain([analytics, 'optionalAccess', _191 => _191.visitEnded, 'call', _192 => _192()]);
|
|
5740
5779
|
}, [analytics, recovering]);
|
|
5741
5780
|
const loadMore = _react.useCallback.call(void 0, () => {
|
|
5742
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
5781
|
+
_optionalChain([analytics, 'optionalAccess', _193 => _193.loadMore, 'call', _194 => _194(filterVisibleDeposits(deposits).length)]);
|
|
5743
5782
|
fetchHistory("more");
|
|
5744
5783
|
}, [analytics, deposits, fetchHistory]);
|
|
5745
5784
|
const markStale = _react.useCallback.call(void 0, () => {
|
|
@@ -5767,7 +5806,7 @@ function useHistoryPanel({
|
|
|
5767
5806
|
_react.useEffect.call(void 0, () => {
|
|
5768
5807
|
if (isOpen) return;
|
|
5769
5808
|
setIsPanelOpen(false);
|
|
5770
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
5809
|
+
_optionalChain([analytics, 'optionalAccess', _195 => _195.visitEnded, 'call', _196 => _196()]);
|
|
5771
5810
|
setDeposits([]);
|
|
5772
5811
|
setHasMore(false);
|
|
5773
5812
|
setError(null);
|
|
@@ -5926,11 +5965,11 @@ var NOTHING_TO_STOP = () => {
|
|
|
5926
5965
|
};
|
|
5927
5966
|
function resolveThemeMode(mode) {
|
|
5928
5967
|
if (mode !== "system") return mode;
|
|
5929
|
-
return _optionalChain([globalThis, 'access',
|
|
5968
|
+
return _optionalChain([globalThis, 'access', _197 => _197.matchMedia, 'optionalCall', _198 => _198(DARK_SCHEME_QUERY), 'access', _199 => _199.matches]) ? "dark" : "light";
|
|
5930
5969
|
}
|
|
5931
5970
|
function followSystemAppearance(mode, onChange) {
|
|
5932
5971
|
if (mode !== "system") return NOTHING_TO_STOP;
|
|
5933
|
-
const query = _optionalChain([globalThis, 'access',
|
|
5972
|
+
const query = _optionalChain([globalThis, 'access', _200 => _200.matchMedia, 'optionalCall', _201 => _201(DARK_SCHEME_QUERY)]);
|
|
5934
5973
|
if (!query) return NOTHING_TO_STOP;
|
|
5935
5974
|
query.addEventListener("change", onChange);
|
|
5936
5975
|
return () => query.removeEventListener("change", onChange);
|
|
@@ -5938,22 +5977,22 @@ function followSystemAppearance(mode, onChange) {
|
|
|
5938
5977
|
function applyTheme(element, theme) {
|
|
5939
5978
|
if (!element) return NOTHING_TO_STOP;
|
|
5940
5979
|
const parent = element.parentElement;
|
|
5941
|
-
const targets = _optionalChain([parent, 'optionalAccess',
|
|
5980
|
+
const targets = _optionalChain([parent, 'optionalAccess', _202 => _202.classList, 'access', _203 => _203.contains, 'call', _204 => _204("rs-modal-content")]) ? [element, parent] : [element];
|
|
5942
5981
|
const paintMode = () => {
|
|
5943
|
-
const resolved = resolveThemeMode(_optionalChain([theme, 'optionalAccess',
|
|
5982
|
+
const resolved = resolveThemeMode(_optionalChain([theme, 'optionalAccess', _205 => _205.mode]));
|
|
5944
5983
|
for (const t of targets) {
|
|
5945
5984
|
if (resolved) t.setAttribute("data-theme", resolved);
|
|
5946
5985
|
else t.removeAttribute("data-theme");
|
|
5947
5986
|
}
|
|
5948
5987
|
};
|
|
5949
5988
|
paintMode();
|
|
5950
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
5989
|
+
if (_optionalChain([theme, 'optionalAccess', _206 => _206.fontColor])) {
|
|
5951
5990
|
setVar(targets, "--rs-foreground", theme.fontColor);
|
|
5952
5991
|
}
|
|
5953
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
5992
|
+
if (_optionalChain([theme, 'optionalAccess', _207 => _207.iconColor])) {
|
|
5954
5993
|
setVar(targets, "--rs-icon", theme.iconColor);
|
|
5955
5994
|
}
|
|
5956
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
5995
|
+
if (_optionalChain([theme, 'optionalAccess', _208 => _208.ctaColor])) {
|
|
5957
5996
|
const derived = deriveCustomPrimary(theme.ctaColor);
|
|
5958
5997
|
if (derived) {
|
|
5959
5998
|
setVar(targets, "--rs-primary", derived.base);
|
|
@@ -5978,25 +6017,25 @@ function applyTheme(element, theme) {
|
|
|
5978
6017
|
}
|
|
5979
6018
|
} else {
|
|
5980
6019
|
for (const v of CUSTOM_PRIMARY_VARS) clearVar(targets, v);
|
|
5981
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
6020
|
+
if (_optionalChain([theme, 'optionalAccess', _209 => _209.ctaHoverColor])) {
|
|
5982
6021
|
setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
|
|
5983
6022
|
}
|
|
5984
6023
|
}
|
|
5985
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
6024
|
+
if (_optionalChain([theme, 'optionalAccess', _210 => _210.borderColor])) {
|
|
5986
6025
|
setVar(targets, "--rs-border", theme.borderColor);
|
|
5987
6026
|
setVar(targets, "--rs-border-surface", theme.borderColor);
|
|
5988
6027
|
}
|
|
5989
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
6028
|
+
if (_optionalChain([theme, 'optionalAccess', _211 => _211.backgroundColor])) {
|
|
5990
6029
|
setVar(targets, "--rs-background", theme.backgroundColor);
|
|
5991
6030
|
}
|
|
5992
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
6031
|
+
if (_optionalChain([theme, 'optionalAccess', _212 => _212.radius])) {
|
|
5993
6032
|
const scale = RADIUS_SCALE[theme.radius];
|
|
5994
6033
|
setVar(targets, "--rs-radius-sm", scale.sm);
|
|
5995
6034
|
setVar(targets, "--rs-radius-md", scale.md);
|
|
5996
6035
|
setVar(targets, "--rs-radius-lg", scale.lg);
|
|
5997
6036
|
setVar(targets, "--rs-radius", scale.md);
|
|
5998
6037
|
}
|
|
5999
|
-
return followSystemAppearance(_optionalChain([theme, 'optionalAccess',
|
|
6038
|
+
return followSystemAppearance(_optionalChain([theme, 'optionalAccess', _213 => _213.mode]), paintMode);
|
|
6000
6039
|
}
|
|
6001
6040
|
|
|
6002
6041
|
// src/core/removed-props.ts
|
|
@@ -6085,20 +6124,20 @@ function sinkFor(source) {
|
|
|
6085
6124
|
if (source.modal === "deposit") {
|
|
6086
6125
|
const at2 = () => source.controllerRef.current;
|
|
6087
6126
|
return {
|
|
6088
|
-
opened: (detail) => _optionalChain([at2, 'call',
|
|
6089
|
-
rowViewed: (detail) => _optionalChain([at2, 'call',
|
|
6090
|
-
loadMore: (detail) => _optionalChain([at2, 'call',
|
|
6091
|
-
fallbackOpened: (detail) => _optionalChain([at2, 'call',
|
|
6092
|
-
recoveryStarted: (detail) => _optionalChain([at2, 'call',
|
|
6127
|
+
opened: (detail) => _optionalChain([at2, 'call', _214 => _214(), 'optionalAccess', _215 => _215.historyOpened, 'call', _216 => _216({ ...detail, step: _nullishCoalesce(_optionalChain([at2, 'call', _217 => _217(), 'optionalAccess', _218 => _218.step]), () => ( null)) })]),
|
|
6128
|
+
rowViewed: (detail) => _optionalChain([at2, 'call', _219 => _219(), 'optionalAccess', _220 => _220.historyRowViewed, 'call', _221 => _221(detail)]),
|
|
6129
|
+
loadMore: (detail) => _optionalChain([at2, 'call', _222 => _222(), 'optionalAccess', _223 => _223.historyLoadMore, 'call', _224 => _224(detail)]),
|
|
6130
|
+
fallbackOpened: (detail) => _optionalChain([at2, 'call', _225 => _225(), 'optionalAccess', _226 => _226.historyFallbackOpened, 'call', _227 => _227(detail)]),
|
|
6131
|
+
recoveryStarted: (detail) => _optionalChain([at2, 'call', _228 => _228(), 'optionalAccess', _229 => _229.historyRecoveryStarted, 'call', _230 => _230(detail)])
|
|
6093
6132
|
};
|
|
6094
6133
|
}
|
|
6095
6134
|
const at = () => source.controllerRef.current;
|
|
6096
6135
|
return {
|
|
6097
|
-
opened: (detail) => _optionalChain([at, 'call',
|
|
6098
|
-
rowViewed: (detail) => _optionalChain([at, 'call',
|
|
6099
|
-
loadMore: (detail) => _optionalChain([at, 'call',
|
|
6100
|
-
fallbackOpened: (detail) => _optionalChain([at, 'call',
|
|
6101
|
-
recoveryStarted: (detail) => _optionalChain([at, 'call',
|
|
6136
|
+
opened: (detail) => _optionalChain([at, 'call', _231 => _231(), 'optionalAccess', _232 => _232.historyOpened, 'call', _233 => _233({ ...detail, step: _nullishCoalesce(_optionalChain([at, 'call', _234 => _234(), 'optionalAccess', _235 => _235.step]), () => ( null)) })]),
|
|
6137
|
+
rowViewed: (detail) => _optionalChain([at, 'call', _236 => _236(), 'optionalAccess', _237 => _237.historyRowViewed, 'call', _238 => _238(detail)]),
|
|
6138
|
+
loadMore: (detail) => _optionalChain([at, 'call', _239 => _239(), 'optionalAccess', _240 => _240.historyLoadMore, 'call', _241 => _241(detail)]),
|
|
6139
|
+
fallbackOpened: (detail) => _optionalChain([at, 'call', _242 => _242(), 'optionalAccess', _243 => _243.historyFallbackOpened, 'call', _244 => _244(detail)]),
|
|
6140
|
+
recoveryStarted: (detail) => _optionalChain([at, 'call', _245 => _245(), 'optionalAccess', _246 => _246.historyRecoveryStarted, 'call', _247 => _247(detail)])
|
|
6102
6141
|
};
|
|
6103
6142
|
}
|
|
6104
6143
|
function badgeState(badge) {
|
|
@@ -6124,7 +6163,7 @@ function createHistoryAnalytics(source) {
|
|
|
6124
6163
|
sink.opened({
|
|
6125
6164
|
history_visit_id: visitId,
|
|
6126
6165
|
badge: badgeState(badge),
|
|
6127
|
-
badge_count: _nullishCoalesce(_optionalChain([badge, 'optionalAccess',
|
|
6166
|
+
badge_count: _nullishCoalesce(_optionalChain([badge, 'optionalAccess', _248 => _248.count]), () => ( 0))
|
|
6128
6167
|
});
|
|
6129
6168
|
},
|
|
6130
6169
|
visitEnded() {
|
|
@@ -6188,7 +6227,7 @@ function resolveChain(targetChain) {
|
|
|
6188
6227
|
return _chunkOY5N3E6Lcjs.targetChainToCaip2.call(void 0, targetChain);
|
|
6189
6228
|
}
|
|
6190
6229
|
function resolveToken(targetToken) {
|
|
6191
|
-
const raw = _optionalChain([targetToken, 'optionalAccess',
|
|
6230
|
+
const raw = _optionalChain([targetToken, 'optionalAccess', _249 => _249.trim, 'call', _250 => _250()]);
|
|
6192
6231
|
if (!raw) return void 0;
|
|
6193
6232
|
if (HEX_TOKEN.test(raw)) return raw.toLowerCase();
|
|
6194
6233
|
if (BASE58_TOKEN.test(raw)) return raw;
|
|
@@ -6246,8 +6285,8 @@ function Tooltip({ content, children, className }) {
|
|
|
6246
6285
|
function handleOutside(event) {
|
|
6247
6286
|
const target = event.target;
|
|
6248
6287
|
if (!target) return;
|
|
6249
|
-
if (_optionalChain([triggerRef, 'access',
|
|
6250
|
-
if (_optionalChain([bubbleRef, 'access',
|
|
6288
|
+
if (_optionalChain([triggerRef, 'access', _251 => _251.current, 'optionalAccess', _252 => _252.contains, 'call', _253 => _253(target)])) return;
|
|
6289
|
+
if (_optionalChain([bubbleRef, 'access', _254 => _254.current, 'optionalAccess', _255 => _255.contains, 'call', _256 => _256(target)])) return;
|
|
6251
6290
|
setOpen(false);
|
|
6252
6291
|
}
|
|
6253
6292
|
function handleKey(event) {
|
|
@@ -6476,7 +6515,7 @@ function asNumber(value) {
|
|
|
6476
6515
|
const trimmed = value.trim();
|
|
6477
6516
|
if (!trimmed) return void 0;
|
|
6478
6517
|
const caipMatch = trimmed.match(/^eip155:(\d+)$/);
|
|
6479
|
-
if (_optionalChain([caipMatch, 'optionalAccess',
|
|
6518
|
+
if (_optionalChain([caipMatch, 'optionalAccess', _257 => _257[1]])) {
|
|
6480
6519
|
const parsed2 = Number(caipMatch[1]);
|
|
6481
6520
|
return Number.isFinite(parsed2) ? parsed2 : void 0;
|
|
6482
6521
|
}
|
|
@@ -6495,24 +6534,24 @@ function asAddress(value) {
|
|
|
6495
6534
|
return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
|
|
6496
6535
|
}
|
|
6497
6536
|
function getEventTxHash(event) {
|
|
6498
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
6537
|
+
if (!_optionalChain([event, 'optionalAccess', _258 => _258.type])) return void 0;
|
|
6499
6538
|
if (event.type === "deposit-received") {
|
|
6500
|
-
return asString(_optionalChain([event, 'access',
|
|
6539
|
+
return asString(_optionalChain([event, 'access', _259 => _259.data, 'optionalAccess', _260 => _260.transactionHash]));
|
|
6501
6540
|
}
|
|
6502
6541
|
if (event.type === "bridge-started" || event.type === "bridge-complete") {
|
|
6503
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
6504
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
6505
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
6542
|
+
const deposit = isRecord(_optionalChain([event, 'access', _261 => _261.data, 'optionalAccess', _262 => _262.deposit])) ? event.data.deposit : void 0;
|
|
6543
|
+
const source = isRecord(_optionalChain([event, 'access', _263 => _263.data, 'optionalAccess', _264 => _264.source])) ? event.data.source : void 0;
|
|
6544
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _265 => _265.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _266 => _266.transactionHash]))));
|
|
6506
6545
|
}
|
|
6507
6546
|
if (event.type === "bridge-failed" || event.type === "error") {
|
|
6508
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
6509
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
6510
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
6547
|
+
const deposit = isRecord(_optionalChain([event, 'access', _267 => _267.data, 'optionalAccess', _268 => _268.deposit])) ? event.data.deposit : void 0;
|
|
6548
|
+
const source = isRecord(_optionalChain([event, 'access', _269 => _269.data, 'optionalAccess', _270 => _270.source])) ? event.data.source : void 0;
|
|
6549
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _271 => _271.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _272 => _272.transactionHash]))));
|
|
6511
6550
|
}
|
|
6512
6551
|
return void 0;
|
|
6513
6552
|
}
|
|
6514
6553
|
function getEventSourceDetails(event) {
|
|
6515
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
6554
|
+
if (!_optionalChain([event, 'optionalAccess', _273 => _273.type]) || !isRecord(event.data)) return {};
|
|
6516
6555
|
if (event.type === "deposit-received") {
|
|
6517
6556
|
return {
|
|
6518
6557
|
chainId: asNumber(event.data.chain),
|
|
@@ -6524,9 +6563,9 @@ function getEventSourceDetails(event) {
|
|
|
6524
6563
|
const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
|
|
6525
6564
|
if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") {
|
|
6526
6565
|
return {
|
|
6527
|
-
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess',
|
|
6528
|
-
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess',
|
|
6529
|
-
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess',
|
|
6566
|
+
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _274 => _274.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _275 => _275.chain])))),
|
|
6567
|
+
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _276 => _276.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _277 => _277.amount])))),
|
|
6568
|
+
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _278 => _278.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _279 => _279.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _280 => _280.token]))))
|
|
6530
6569
|
};
|
|
6531
6570
|
}
|
|
6532
6571
|
return {};
|
|
@@ -6540,7 +6579,7 @@ function asChain(value) {
|
|
|
6540
6579
|
return asNumber(value);
|
|
6541
6580
|
}
|
|
6542
6581
|
function getEventDestinationDetails(event) {
|
|
6543
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
6582
|
+
if (!_optionalChain([event, 'optionalAccess', _281 => _281.type]) || !isRecord(event.data)) return {};
|
|
6544
6583
|
if (event.type !== "bridge-started" && event.type !== "bridge-complete") {
|
|
6545
6584
|
return {};
|
|
6546
6585
|
}
|
|
@@ -6550,14 +6589,14 @@ function getEventDestinationDetails(event) {
|
|
|
6550
6589
|
return {
|
|
6551
6590
|
chainId: asChain(destination.chain),
|
|
6552
6591
|
amount: asAmount(destination.amount),
|
|
6553
|
-
token: _optionalChain([token, 'optionalAccess',
|
|
6592
|
+
token: _optionalChain([token, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()]) || void 0
|
|
6554
6593
|
};
|
|
6555
6594
|
}
|
|
6556
6595
|
function isDepositEvent(event) {
|
|
6557
|
-
return _optionalChain([event, 'optionalAccess',
|
|
6596
|
+
return _optionalChain([event, 'optionalAccess', _284 => _284.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _285 => _285.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _286 => _286.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _287 => _287.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _288 => _288.type]) === "error";
|
|
6558
6597
|
}
|
|
6559
6598
|
function isFailedEvent(event) {
|
|
6560
|
-
return _optionalChain([event, 'optionalAccess',
|
|
6599
|
+
return _optionalChain([event, 'optionalAccess', _289 => _289.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _290 => _290.type]) === "error";
|
|
6561
6600
|
}
|
|
6562
6601
|
function isHexString(value) {
|
|
6563
6602
|
return value.startsWith("0x") || value.startsWith("0X");
|
|
@@ -6569,7 +6608,7 @@ function txRefsMatch(a, b) {
|
|
|
6569
6608
|
return a === b;
|
|
6570
6609
|
}
|
|
6571
6610
|
function formatBridgeFailedMessage(event) {
|
|
6572
|
-
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess',
|
|
6611
|
+
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _291 => _291.data]), () => ( {}));
|
|
6573
6612
|
const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
|
|
6574
6613
|
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
6575
6614
|
function toUserFacingFailure(raw) {
|
|
@@ -6597,7 +6636,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
6597
6636
|
return { message: "Bridge failed" };
|
|
6598
6637
|
}
|
|
6599
6638
|
function failureMessageForEvent(event) {
|
|
6600
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
6639
|
+
if (_optionalChain([event, 'optionalAccess', _292 => _292.type]) === "error") {
|
|
6601
6640
|
const message = isRecord(event.data) ? asString(event.data.message) : void 0;
|
|
6602
6641
|
return _nullishCoalesce(message, () => ( "Unknown error"));
|
|
6603
6642
|
}
|
|
@@ -6636,7 +6675,7 @@ async function fetchTokenPriceUsd(service, token) {
|
|
|
6636
6675
|
}
|
|
6637
6676
|
function useTokenPrices(service, tokens) {
|
|
6638
6677
|
const [prices, setPrices] = _react.useState.call(void 0, {});
|
|
6639
|
-
const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess',
|
|
6678
|
+
const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _293 => _293.symbol])));
|
|
6640
6679
|
const entries = [
|
|
6641
6680
|
...new Map(
|
|
6642
6681
|
defined.flatMap((token) => {
|
|
@@ -6819,12 +6858,12 @@ function isEventForTx(event, txHash) {
|
|
|
6819
6858
|
return txRefsMatch(eventTxHash, txHash);
|
|
6820
6859
|
}
|
|
6821
6860
|
function parseWebhookTimestamp(event) {
|
|
6822
|
-
if (typeof _optionalChain([event, 'optionalAccess',
|
|
6861
|
+
if (typeof _optionalChain([event, 'optionalAccess', _294 => _294.time]) !== "string") return void 0;
|
|
6823
6862
|
const timestamp = Date.parse(event.time);
|
|
6824
6863
|
return Number.isFinite(timestamp) ? timestamp : void 0;
|
|
6825
6864
|
}
|
|
6826
6865
|
function syncPhaseTimings(previous, event) {
|
|
6827
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
6866
|
+
if (!_optionalChain([event, 'optionalAccess', _295 => _295.type])) return previous;
|
|
6828
6867
|
const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
|
|
6829
6868
|
const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") && previous.receivedAt === void 0;
|
|
6830
6869
|
const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete") && previous.bridgingAt === void 0;
|
|
@@ -6886,46 +6925,52 @@ function getCurrentPhaseId(state, phaseTimings) {
|
|
|
6886
6925
|
if (state.type === "complete") {
|
|
6887
6926
|
return void 0;
|
|
6888
6927
|
}
|
|
6889
|
-
if (_optionalChain([state, 'access',
|
|
6928
|
+
if (_optionalChain([state, 'access', _296 => _296.lastEvent, 'optionalAccess', _297 => _297.type]) === "bridge-started" || _optionalChain([state, 'access', _298 => _298.lastEvent, 'optionalAccess', _299 => _299.type]) === "bridge-complete")
|
|
6890
6929
|
return "bridging";
|
|
6891
|
-
if (_optionalChain([state, 'access',
|
|
6930
|
+
if (_optionalChain([state, 'access', _300 => _300.lastEvent, 'optionalAccess', _301 => _301.type]) === "deposit-received") return "received";
|
|
6892
6931
|
return "confirming";
|
|
6893
6932
|
}
|
|
6933
|
+
function getCompletionDestinationAmount(event) {
|
|
6934
|
+
const amount = _optionalChain([event, 'optionalAccess', _302 => _302.data, 'optionalAccess', _303 => _303.destination, 'optionalAccess', _304 => _304.amount]);
|
|
6935
|
+
return typeof amount === "string" ? amount : void 0;
|
|
6936
|
+
}
|
|
6894
6937
|
function getCompletionDestinationTxHash(event) {
|
|
6895
|
-
const eventData = _optionalChain([event, 'optionalAccess',
|
|
6896
|
-
const swapTxHash = _optionalChain([eventData, 'optionalAccess',
|
|
6897
|
-
const destinationTxHash = _optionalChain([eventData, 'optionalAccess',
|
|
6938
|
+
const eventData = _optionalChain([event, 'optionalAccess', _305 => _305.data]);
|
|
6939
|
+
const swapTxHash = _optionalChain([eventData, 'optionalAccess', _306 => _306.swap, 'optionalAccess', _307 => _307.transactionHash]);
|
|
6940
|
+
const destinationTxHash = _optionalChain([eventData, 'optionalAccess', _308 => _308.destination, 'optionalAccess', _309 => _309.transactionHash]);
|
|
6898
6941
|
return _nullishCoalesce(swapTxHash, () => ( destinationTxHash));
|
|
6899
6942
|
}
|
|
6900
6943
|
function getTerminalProcessingOutcome(event) {
|
|
6901
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
6944
|
+
if (_optionalChain([event, 'optionalAccess', _310 => _310.type]) === "post-bridge-swap-complete") {
|
|
6902
6945
|
return {
|
|
6903
6946
|
type: "complete",
|
|
6904
|
-
destinationTxHash: getCompletionDestinationTxHash(event)
|
|
6947
|
+
destinationTxHash: getCompletionDestinationTxHash(event),
|
|
6948
|
+
destinationAmount: getCompletionDestinationAmount(event)
|
|
6905
6949
|
};
|
|
6906
6950
|
}
|
|
6907
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
6951
|
+
if (_optionalChain([event, 'optionalAccess', _311 => _311.type]) === "post-bridge-swap-failed") {
|
|
6908
6952
|
return {
|
|
6909
6953
|
type: "failed",
|
|
6910
6954
|
message: formatBridgeFailedMessage(event).message
|
|
6911
6955
|
};
|
|
6912
6956
|
}
|
|
6913
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
6957
|
+
if (_optionalChain([event, 'optionalAccess', _312 => _312.type]) === "bridge-complete") {
|
|
6914
6958
|
return {
|
|
6915
6959
|
type: "complete",
|
|
6916
|
-
destinationTxHash: getCompletionDestinationTxHash(event)
|
|
6960
|
+
destinationTxHash: getCompletionDestinationTxHash(event),
|
|
6961
|
+
destinationAmount: getCompletionDestinationAmount(event)
|
|
6917
6962
|
};
|
|
6918
6963
|
}
|
|
6919
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
6964
|
+
if (_optionalChain([event, 'optionalAccess', _313 => _313.type]) === "bridge-failed") {
|
|
6920
6965
|
return {
|
|
6921
6966
|
type: "failed",
|
|
6922
6967
|
message: formatBridgeFailedMessage(event).message
|
|
6923
6968
|
};
|
|
6924
6969
|
}
|
|
6925
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
6970
|
+
if (_optionalChain([event, 'optionalAccess', _314 => _314.type]) === "error") {
|
|
6926
6971
|
return {
|
|
6927
6972
|
type: "failed",
|
|
6928
|
-
message: _nullishCoalesce(_optionalChain([event, 'access',
|
|
6973
|
+
message: _nullishCoalesce(_optionalChain([event, 'access', _315 => _315.data, 'optionalAccess', _316 => _316.message]), () => ( "Unknown error"))
|
|
6929
6974
|
};
|
|
6930
6975
|
}
|
|
6931
6976
|
return null;
|
|
@@ -6933,10 +6978,10 @@ function getTerminalProcessingOutcome(event) {
|
|
|
6933
6978
|
function getInitialProcessingState(event, txHash) {
|
|
6934
6979
|
if (!event || !isEventForTx(event, txHash)) return null;
|
|
6935
6980
|
const terminal = getTerminalProcessingOutcome(event);
|
|
6936
|
-
if (_optionalChain([terminal, 'optionalAccess',
|
|
6981
|
+
if (_optionalChain([terminal, 'optionalAccess', _317 => _317.type]) === "complete") {
|
|
6937
6982
|
return { type: "complete", lastEvent: event };
|
|
6938
6983
|
}
|
|
6939
|
-
if (_optionalChain([terminal, 'optionalAccess',
|
|
6984
|
+
if (_optionalChain([terminal, 'optionalAccess', _318 => _318.type]) === "failed") {
|
|
6940
6985
|
return { type: "failed", message: terminal.message, lastEvent: event };
|
|
6941
6986
|
}
|
|
6942
6987
|
if (isDepositEvent(event)) {
|
|
@@ -6945,7 +6990,7 @@ function getInitialProcessingState(event, txHash) {
|
|
|
6945
6990
|
return null;
|
|
6946
6991
|
}
|
|
6947
6992
|
function getSettledSourceTxHash(event, fallbackTxHash) {
|
|
6948
|
-
return _nullishCoalesce(_optionalChain([event, 'optionalAccess',
|
|
6993
|
+
return _nullishCoalesce(_optionalChain([event, 'optionalAccess', _319 => _319.data, 'optionalAccess', _320 => _320.source, 'optionalAccess', _321 => _321.transactionHash]), () => ( fallbackTxHash));
|
|
6949
6994
|
}
|
|
6950
6995
|
function ProcessingStep({
|
|
6951
6996
|
smartAccount,
|
|
@@ -7025,8 +7070,8 @@ function ProcessingStep({
|
|
|
7025
7070
|
const [elapsedSeconds, setElapsedSeconds] = _react.useState.call(void 0,
|
|
7026
7071
|
() => Math.max(0, Math.floor((Date.now() - startTimeRef.current) / 1e3))
|
|
7027
7072
|
);
|
|
7028
|
-
const [latchedTiming, setLatchedTiming] = _react.useState.call(void 0, _optionalChain([quote, 'optionalAccess',
|
|
7029
|
-
if (latchedTiming === void 0 && _optionalChain([quote, 'optionalAccess',
|
|
7073
|
+
const [latchedTiming, setLatchedTiming] = _react.useState.call(void 0, _optionalChain([quote, 'optionalAccess', _322 => _322.timing]));
|
|
7074
|
+
if (latchedTiming === void 0 && _optionalChain([quote, 'optionalAccess', _323 => _323.timing]) !== void 0) {
|
|
7030
7075
|
setLatchedTiming(quote.timing);
|
|
7031
7076
|
}
|
|
7032
7077
|
const timingStateRef = _react.useRef.call(void 0, "expected");
|
|
@@ -7057,7 +7102,7 @@ function ProcessingStep({
|
|
|
7057
7102
|
flowLabel
|
|
7058
7103
|
});
|
|
7059
7104
|
const context = processingContextRef.current;
|
|
7060
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
7105
|
+
_optionalChain([onDepositCompleteRef, 'access', _324 => _324.current, 'optionalCall', _325 => _325(txHash, void 0, {
|
|
7061
7106
|
amount: context.amount,
|
|
7062
7107
|
sourceChain: context.sourceChain,
|
|
7063
7108
|
sourceToken: context.sourceToken,
|
|
@@ -7090,7 +7135,7 @@ function ProcessingStep({
|
|
|
7090
7135
|
destinationTxHash: outcome.destinationTxHash,
|
|
7091
7136
|
event: event.type
|
|
7092
7137
|
});
|
|
7093
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
7138
|
+
_optionalChain([onDepositCompleteRef, 'access', _326 => _326.current, 'optionalCall', _327 => _327(
|
|
7094
7139
|
sourceTxHash2,
|
|
7095
7140
|
outcome.destinationTxHash,
|
|
7096
7141
|
{
|
|
@@ -7100,7 +7145,8 @@ function ProcessingStep({
|
|
|
7100
7145
|
sourceDecimals: context.sourceDecimals,
|
|
7101
7146
|
amountUsd: context.amountUsd,
|
|
7102
7147
|
targetChain: context.targetChain,
|
|
7103
|
-
targetToken: context.targetToken
|
|
7148
|
+
targetToken: context.targetToken,
|
|
7149
|
+
destinationAmount: outcome.destinationAmount
|
|
7104
7150
|
}
|
|
7105
7151
|
)]);
|
|
7106
7152
|
return;
|
|
@@ -7110,7 +7156,7 @@ function ProcessingStep({
|
|
|
7110
7156
|
message: outcome.message,
|
|
7111
7157
|
event: event.type
|
|
7112
7158
|
});
|
|
7113
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
7159
|
+
_optionalChain([onDepositFailedRef, 'access', _328 => _328.current, 'optionalCall', _329 => _329(txHash, outcome.message)]);
|
|
7114
7160
|
}, [
|
|
7115
7161
|
debug,
|
|
7116
7162
|
onDepositCompleteRef,
|
|
@@ -7121,8 +7167,8 @@ function ProcessingStep({
|
|
|
7121
7167
|
const onSettledChangeRef = _react.useRef.call(void 0, onSettledChange);
|
|
7122
7168
|
onSettledChangeRef.current = onSettledChange;
|
|
7123
7169
|
_react.useEffect.call(void 0, () => {
|
|
7124
|
-
_optionalChain([onSettledChangeRef, 'access',
|
|
7125
|
-
return () => _optionalChain([onSettledChangeRef, 'access',
|
|
7170
|
+
_optionalChain([onSettledChangeRef, 'access', _330 => _330.current, 'optionalCall', _331 => _331(state.type !== "processing")]);
|
|
7171
|
+
return () => _optionalChain([onSettledChangeRef, 'access', _332 => _332.current, 'optionalCall', _333 => _333(false)]);
|
|
7126
7172
|
}, [state.type]);
|
|
7127
7173
|
_react.useEffect.call(void 0, () => {
|
|
7128
7174
|
if (directTransfer || state.type !== "processing") return;
|
|
@@ -7148,13 +7194,13 @@ function ProcessingStep({
|
|
|
7148
7194
|
updatePhaseTimings(
|
|
7149
7195
|
(previous) => syncPhaseTimings(previous, state.lastEvent)
|
|
7150
7196
|
);
|
|
7151
|
-
}, [_optionalChain([state, 'access',
|
|
7197
|
+
}, [_optionalChain([state, 'access', _334 => _334.lastEvent, 'optionalAccess', _335 => _335.time]), _optionalChain([state, 'access', _336 => _336.lastEvent, 'optionalAccess', _337 => _337.type]), updatePhaseTimings]);
|
|
7152
7198
|
const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
|
|
7153
7199
|
_react.useEffect.call(void 0, () => {
|
|
7154
7200
|
let cancelled = false;
|
|
7155
7201
|
let timeoutId;
|
|
7156
|
-
const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess',
|
|
7157
|
-
const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess',
|
|
7202
|
+
const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _338 => _338.variant]) === "fiat";
|
|
7203
|
+
const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _339 => _339.expectedOrderUuid]), () => ( null));
|
|
7158
7204
|
setSwappedFiatContext(null);
|
|
7159
7205
|
if (isFiatSwappedOrder && !expectedOrderUuid) {
|
|
7160
7206
|
return () => {
|
|
@@ -7204,8 +7250,8 @@ function ProcessingStep({
|
|
|
7204
7250
|
smartAccount,
|
|
7205
7251
|
txHash,
|
|
7206
7252
|
isSwappedOrder,
|
|
7207
|
-
_optionalChain([swappedContext, 'optionalAccess',
|
|
7208
|
-
_optionalChain([swappedContext, 'optionalAccess',
|
|
7253
|
+
_optionalChain([swappedContext, 'optionalAccess', _340 => _340.variant]),
|
|
7254
|
+
_optionalChain([swappedContext, 'optionalAccess', _341 => _341.expectedOrderUuid])
|
|
7209
7255
|
]);
|
|
7210
7256
|
_react.useEffect.call(void 0, () => {
|
|
7211
7257
|
if (directTransfer) return;
|
|
@@ -7231,17 +7277,18 @@ function ProcessingStep({
|
|
|
7231
7277
|
debugLog(debug, "processing", "poll:event", {
|
|
7232
7278
|
type: lastEvent2.type,
|
|
7233
7279
|
matchesTx: eventMatchesTx,
|
|
7234
|
-
intentId: _optionalChain([eventData, 'optionalAccess',
|
|
7280
|
+
intentId: _optionalChain([eventData, 'optionalAccess', _342 => _342.intentId])
|
|
7235
7281
|
});
|
|
7236
7282
|
}
|
|
7237
7283
|
if (!isMounted) return;
|
|
7238
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
7284
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _343 => _343.type]) === "bridge-complete") {
|
|
7239
7285
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
7240
7286
|
const sourceTxHash2 = getSettledSourceTxHash(
|
|
7241
7287
|
eventForCurrentTx,
|
|
7242
7288
|
txHash
|
|
7243
7289
|
);
|
|
7244
|
-
const
|
|
7290
|
+
const destination = _optionalChain([eventForCurrentTx, 'access', _344 => _344.data, 'optionalAccess', _345 => _345.destination]);
|
|
7291
|
+
const destinationTxHash2 = _optionalChain([destination, 'optionalAccess', _346 => _346.transactionHash]);
|
|
7245
7292
|
debugLog(debug, "processing", "state:complete", {
|
|
7246
7293
|
txHash,
|
|
7247
7294
|
sourceTxHash: sourceTxHash2,
|
|
@@ -7249,18 +7296,19 @@ function ProcessingStep({
|
|
|
7249
7296
|
event: eventForCurrentTx.type
|
|
7250
7297
|
});
|
|
7251
7298
|
const context = processingContextRef.current;
|
|
7252
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
7299
|
+
_optionalChain([onDepositCompleteRef, 'access', _347 => _347.current, 'optionalCall', _348 => _348(sourceTxHash2, destinationTxHash2, {
|
|
7253
7300
|
amount: context.amount,
|
|
7254
7301
|
sourceChain: context.sourceChain,
|
|
7255
7302
|
sourceToken: context.sourceToken,
|
|
7256
7303
|
sourceDecimals: context.sourceDecimals,
|
|
7257
7304
|
amountUsd: context.amountUsd,
|
|
7258
7305
|
targetChain: context.targetChain,
|
|
7259
|
-
targetToken: context.targetToken
|
|
7306
|
+
targetToken: context.targetToken,
|
|
7307
|
+
destinationAmount: typeof _optionalChain([destination, 'optionalAccess', _349 => _349.amount]) === "string" ? destination.amount : void 0
|
|
7260
7308
|
})]);
|
|
7261
7309
|
return;
|
|
7262
7310
|
}
|
|
7263
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
7311
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _350 => _350.type]) === "bridge-failed") {
|
|
7264
7312
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
7265
7313
|
setState({
|
|
7266
7314
|
type: "failed",
|
|
@@ -7272,11 +7320,11 @@ function ProcessingStep({
|
|
|
7272
7320
|
message: formatted.message,
|
|
7273
7321
|
code: formatted.code
|
|
7274
7322
|
});
|
|
7275
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
7323
|
+
_optionalChain([onDepositFailedRef, 'access', _351 => _351.current, 'optionalCall', _352 => _352(txHash, formatted.message)]);
|
|
7276
7324
|
return;
|
|
7277
7325
|
}
|
|
7278
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
7279
|
-
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access',
|
|
7326
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _353 => _353.type]) === "error") {
|
|
7327
|
+
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _354 => _354.data, 'optionalAccess', _355 => _355.message]), () => ( "Unknown error"));
|
|
7280
7328
|
setState({
|
|
7281
7329
|
type: "failed",
|
|
7282
7330
|
message: errorMessage,
|
|
@@ -7286,7 +7334,7 @@ function ProcessingStep({
|
|
|
7286
7334
|
txHash,
|
|
7287
7335
|
message: errorMessage
|
|
7288
7336
|
});
|
|
7289
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
7337
|
+
_optionalChain([onDepositFailedRef, 'access', _356 => _356.current, 'optionalCall', _357 => _357(txHash, errorMessage)]);
|
|
7290
7338
|
return;
|
|
7291
7339
|
}
|
|
7292
7340
|
setState((previous) => ({
|
|
@@ -7342,20 +7390,20 @@ function ProcessingStep({
|
|
|
7342
7390
|
const lastEvent = state.lastEvent;
|
|
7343
7391
|
const failureMessage = state.type === "failed" ? state.message : void 0;
|
|
7344
7392
|
const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
|
|
7345
|
-
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
|
|
7346
|
-
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
|
|
7347
|
-
const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess',
|
|
7393
|
+
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : flowLabel === "payment" ? "payment" : "deposit";
|
|
7394
|
+
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : flowLabel === "payment" ? "Payment" : "Deposit";
|
|
7395
|
+
const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _358 => _358.data, 'optionalAccess', _359 => _359.destination, 'optionalAccess', _360 => _360.transactionHash]) || null;
|
|
7348
7396
|
const sourceTxHash = getSettledSourceTxHash(lastEvent, txHash);
|
|
7349
7397
|
const sourceDetails = getEventSourceDetails(lastEvent);
|
|
7350
7398
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
7351
7399
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
7352
7400
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
7353
7401
|
const targetChainId = _chunkOY5N3E6Lcjs.targetChainToChainId.call(void 0, targetChain);
|
|
7354
|
-
const settledSourceTxHash = _optionalChain([lastEvent, 'optionalAccess',
|
|
7402
|
+
const settledSourceTxHash = _optionalChain([lastEvent, 'optionalAccess', _361 => _361.data, 'optionalAccess', _362 => _362.source, 'optionalAccess', _363 => _363.transactionHash]);
|
|
7355
7403
|
const sourceExplorerHash = _nullishCoalesce(settledSourceTxHash, () => ( (sourceTxHashPending ? null : sourceTxHash)));
|
|
7356
7404
|
_react.useEffect.call(void 0, () => {
|
|
7357
7405
|
if (sourceTxHashPending && settledSourceTxHash) {
|
|
7358
|
-
_optionalChain([onSourceTransactionObserved, 'optionalCall',
|
|
7406
|
+
_optionalChain([onSourceTransactionObserved, 'optionalCall', _364 => _364(settledSourceTxHash)]);
|
|
7359
7407
|
}
|
|
7360
7408
|
}, [onSourceTransactionObserved, settledSourceTxHash, sourceTxHashPending]);
|
|
7361
7409
|
const sourceExplorerUrl = sourceExplorerHash ? explorerTxUrl(displaySourceChain, sourceExplorerHash) : null;
|
|
@@ -7459,7 +7507,7 @@ function ProcessingStep({
|
|
|
7459
7507
|
timeoutMs: latchedTiming ? resolveServedThresholds(latchedTiming).escalatedMs : FALLBACK_ESCALATED_DELAY_MS,
|
|
7460
7508
|
served: latchedTiming !== void 0
|
|
7461
7509
|
});
|
|
7462
|
-
_optionalChain([onErrorRef, 'access',
|
|
7510
|
+
_optionalChain([onErrorRef, 'access', _365 => _365.current, 'optionalCall', _366 => _366(
|
|
7463
7511
|
"Transfer is taking longer than expected. Your funds are safe and processing will continue automatically.",
|
|
7464
7512
|
"PROCESS_TIMEOUT"
|
|
7465
7513
|
)]);
|
|
@@ -7477,8 +7525,8 @@ function ProcessingStep({
|
|
|
7477
7525
|
const sourceChainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, displaySourceChain);
|
|
7478
7526
|
const targetChainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, targetChainId);
|
|
7479
7527
|
const timerText = formatTimer(elapsedSeconds);
|
|
7480
|
-
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
7481
|
-
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
7528
|
+
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _367 => _367.feeSponsored]), () => ( false));
|
|
7529
|
+
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _368 => _368.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
7482
7530
|
const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
|
|
7483
7531
|
const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
|
|
7484
7532
|
const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
@@ -7489,20 +7537,20 @@ function ProcessingStep({
|
|
|
7489
7537
|
/* @__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 }) })
|
|
7490
7538
|
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}), title: stateTitle });
|
|
7491
7539
|
if (isComplete && isSwappedOrder) {
|
|
7492
|
-
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess',
|
|
7540
|
+
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _369 => _369.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _370 => _370.paymentMethod]))), () => ( null));
|
|
7493
7541
|
const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
|
|
7494
|
-
const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess',
|
|
7542
|
+
const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _371 => _371.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
|
|
7495
7543
|
_nullishCoalesce(onrampMethod, () => ( effectivePaymentMethod)),
|
|
7496
7544
|
effectivePaymentMethod
|
|
7497
7545
|
) : null;
|
|
7498
|
-
const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess',
|
|
7499
|
-
const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
7546
|
+
const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _372 => _372.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
|
|
7547
|
+
const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _373 => _373.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
|
|
7500
7548
|
const depositedAmount = receiveDisplay;
|
|
7501
|
-
const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
7549
|
+
const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _374 => _374.onrampFeeUsd]), () => ( null));
|
|
7502
7550
|
const sponsoredFeeTooltip = "This fee is sponsored for this deposit.";
|
|
7503
7551
|
const feesTooltip = feeSponsored ? "On-ramp fees are charged by the payment provider. Market and network fees are sponsored for this deposit." : "Fees include on-ramp, market, and network costs for this deposit.";
|
|
7504
7552
|
const { rows: quoteFeeRows, chargeableUsd } = buildQuoteFeeRows(
|
|
7505
|
-
_optionalChain([quote, 'optionalAccess',
|
|
7553
|
+
_optionalChain([quote, 'optionalAccess', _375 => _375.fees, 'access', _376 => _376.breakdown]),
|
|
7506
7554
|
sponsoredFeeTooltip
|
|
7507
7555
|
);
|
|
7508
7556
|
const feeRows = [];
|
|
@@ -7589,7 +7637,7 @@ function ProcessingStep({
|
|
|
7589
7637
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
|
|
7590
7638
|
] }),
|
|
7591
7639
|
isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
7592
|
-
_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
7640
|
+
_optionalChain([swappedFiatContext, 'optionalAccess', _377 => _377.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
7593
7641
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
|
|
7594
7642
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
7595
7643
|
"$",
|
|
@@ -7601,7 +7649,7 @@ function ProcessingStep({
|
|
|
7601
7649
|
] })
|
|
7602
7650
|
] })
|
|
7603
7651
|
] }),
|
|
7604
|
-
_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
7652
|
+
_optionalChain([swappedFiatContext, 'optionalAccess', _378 => _378.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
7605
7653
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
|
|
7606
7654
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
7607
7655
|
"$",
|
|
@@ -7668,7 +7716,7 @@ function ProcessingStep({
|
|
|
7668
7716
|
) })
|
|
7669
7717
|
] })
|
|
7670
7718
|
] }) : (() => {
|
|
7671
|
-
const { display, struck } = quoteFeeRow(_optionalChain([quote, 'optionalAccess',
|
|
7719
|
+
const { display, struck } = quoteFeeRow(_optionalChain([quote, 'optionalAccess', _379 => _379.fees]));
|
|
7672
7720
|
if (display !== null) {
|
|
7673
7721
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
7674
7722
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
@@ -7797,7 +7845,8 @@ function computeRequestKey(input) {
|
|
|
7797
7845
|
recipient: normalizeKeyToken(input.recipient),
|
|
7798
7846
|
outputTokenRules: _nullishCoalesce(input.outputTokenRules, () => ( null)),
|
|
7799
7847
|
rejectUnmapped: _nullishCoalesce(input.rejectUnmapped, () => ( null)),
|
|
7800
|
-
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
|
|
7848
|
+
forceRegister: _nullishCoalesce(input.forceRegister, () => ( false)),
|
|
7849
|
+
salt: _nullishCoalesce(input.salt, () => ( null))
|
|
7801
7850
|
});
|
|
7802
7851
|
}
|
|
7803
7852
|
function computeCacheKey(input) {
|
|
@@ -7806,7 +7855,8 @@ function computeCacheKey(input) {
|
|
|
7806
7855
|
targetToken: normalizeKeyToken(input.targetToken),
|
|
7807
7856
|
recipient: normalizeKeyToken(input.recipient),
|
|
7808
7857
|
outputTokenRules: _nullishCoalesce(input.outputTokenRules, () => ( null)),
|
|
7809
|
-
rejectUnmapped: _nullishCoalesce(input.rejectUnmapped, () => ( null))
|
|
7858
|
+
rejectUnmapped: _nullishCoalesce(input.rejectUnmapped, () => ( null)),
|
|
7859
|
+
salt: _nullishCoalesce(input.salt, () => ( null))
|
|
7810
7860
|
});
|
|
7811
7861
|
}
|
|
7812
7862
|
function computeIsCacheable(input) {
|
|
@@ -7817,7 +7867,7 @@ var setupRequestDedupe = /* @__PURE__ */ new Map();
|
|
|
7817
7867
|
function readDedupedAccountSetupResult(requestKey) {
|
|
7818
7868
|
const now = Date.now();
|
|
7819
7869
|
const existing = setupRequestDedupe.get(requestKey);
|
|
7820
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
7870
|
+
if (_optionalChain([existing, 'optionalAccess', _380 => _380.settled]) && existing.expiresAt > now && existing.result) {
|
|
7821
7871
|
return existing.result;
|
|
7822
7872
|
}
|
|
7823
7873
|
return null;
|
|
@@ -7838,7 +7888,7 @@ async function runAccountSetup(input, deps) {
|
|
|
7838
7888
|
);
|
|
7839
7889
|
}
|
|
7840
7890
|
try {
|
|
7841
|
-
const salt = deriveAccountSalt(input);
|
|
7891
|
+
const salt = _nullishCoalesce(input.salt, () => ( deriveAccountSalt(input)));
|
|
7842
7892
|
debugLog(debug, "account-setup", "setup:start", {
|
|
7843
7893
|
salt,
|
|
7844
7894
|
recipient: input.recipient,
|
|
@@ -7851,7 +7901,7 @@ async function runAccountSetup(input, deps) {
|
|
|
7851
7901
|
chain: _chunkOY5N3E6Lcjs.targetChainToCaip2.call(void 0, input.targetChain),
|
|
7852
7902
|
token: input.targetToken,
|
|
7853
7903
|
recipient: input.recipient,
|
|
7854
|
-
..._optionalChain([input, 'access',
|
|
7904
|
+
..._optionalChain([input, 'access', _381 => _381.outputTokenRules, 'optionalAccess', _382 => _382.length]) && {
|
|
7855
7905
|
outputTokenRules: input.outputTokenRules
|
|
7856
7906
|
},
|
|
7857
7907
|
...input.rejectUnmapped != null && {
|