@rhinestone/deposit-modal 0.11.0 → 0.11.1
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-6RVLEM3B.mjs → DepositModalReown-MO5QDLIT.mjs} +5 -5
- package/dist/{DepositModalReown-TXTLVZIQ.cjs → DepositModalReown-YGB73NMW.cjs} +13 -13
- package/dist/{chunk-XVKBCDZI.cjs → chunk-4FTI3GTB.cjs} +1 -1
- package/dist/{chunk-WLDTBKRA.mjs → chunk-5746YXKC.mjs} +1 -1
- package/dist/{chunk-ITAYM7SB.mjs → chunk-CWGUBFJL.mjs} +41 -3
- package/dist/{chunk-G4FVZQOM.mjs → chunk-EIWOVX53.mjs} +6 -6
- package/dist/{chunk-JYKMR6QI.cjs → chunk-FVUXJ3RP.cjs} +3 -3
- package/dist/{chunk-HCQWFL3A.cjs → chunk-HUHBNYD3.cjs} +66 -66
- package/dist/{chunk-BLJMYCBF.cjs → chunk-LQGYPM5B.cjs} +63 -63
- package/dist/{chunk-VRNRRN2U.mjs → chunk-OWYPKCYD.mjs} +3 -3
- package/dist/{chunk-7RNEYPI4.cjs → chunk-SSQ27YFB.cjs} +277 -274
- package/dist/{chunk-QRR3Y7EK.mjs → chunk-URFSTNRS.mjs} +1 -1
- package/dist/{chunk-DYTRG4C7.mjs → chunk-V6T7LORJ.mjs} +1 -1
- package/dist/{chunk-TRD2FCAR.mjs → chunk-YELNYILK.mjs} +256 -253
- package/dist/{chunk-NPSC5R22.cjs → chunk-ZQR36NCV.cjs} +65 -27
- package/dist/{chunk-GWA6GFTI.cjs → chunk-ZRIRCIQM.cjs} +54 -54
- package/dist/claim.cjs +5 -5
- package/dist/claim.d.cts +2 -2
- package/dist/claim.d.ts +2 -2
- 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.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +7 -7
- package/dist/{types-C7wag_iL.d.cts → types-CsGa-HxD.d.cts} +6 -0
- package/dist/{types-D4b6Cjox.d.ts → types-DdS8OySJ.d.ts} +6 -0
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4FTI3GTBcjs = require('./chunk-4FTI3GTB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -843,6 +843,11 @@ var SwappedConnectFeeChangedError = class extends Error {
|
|
|
843
843
|
function parseExchangeFeeBps(value) {
|
|
844
844
|
return typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= 1e4 ? value : void 0;
|
|
845
845
|
}
|
|
846
|
+
var UNSUPPORTED_CONNECT_EXCHANGES = /* @__PURE__ */ new Set(["kraken", "htx"]);
|
|
847
|
+
var SUPPORTED_CONNECT_EXCHANGE_COUNT = 7;
|
|
848
|
+
function isSupportedConnectExchange(exchange) {
|
|
849
|
+
return !UNSUPPORTED_CONNECT_EXCHANGES.has(exchange.connection.toLowerCase());
|
|
850
|
+
}
|
|
846
851
|
function resolveAppFeeBps(appFees, sourceChainCaip2, sourceToken) {
|
|
847
852
|
const override = _optionalChain([appFees, 'optionalAccess', _6 => _6.tokens, 'optionalAccess', _7 => _7[sourceChainCaip2], 'optionalAccess', _8 => _8[sourceToken.toLowerCase()]]);
|
|
848
853
|
const bps = _nullishCoalesce(_nullishCoalesce(override, () => ( _optionalChain([appFees, 'optionalAccess', _9 => _9.feeBps]))), () => ( 0));
|
|
@@ -888,7 +893,7 @@ function createDepositService(baseUrl, options) {
|
|
|
888
893
|
try {
|
|
889
894
|
const response = await fetch(apiUrl("/qr/tokens"), {
|
|
890
895
|
method: "GET",
|
|
891
|
-
headers:
|
|
896
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS
|
|
892
897
|
});
|
|
893
898
|
if (!response.ok) {
|
|
894
899
|
debugLog(debug, scope, "getTopTokens:unavailable", {
|
|
@@ -915,7 +920,7 @@ function createDepositService(baseUrl, options) {
|
|
|
915
920
|
try {
|
|
916
921
|
const response = await fetch(apiUrl("/chains"), {
|
|
917
922
|
method: "GET",
|
|
918
|
-
headers:
|
|
923
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS
|
|
919
924
|
});
|
|
920
925
|
if (!response.ok) {
|
|
921
926
|
debugLog(debug, scope, "getChains:unavailable", {
|
|
@@ -969,7 +974,7 @@ function createDepositService(baseUrl, options) {
|
|
|
969
974
|
});
|
|
970
975
|
const response = await fetch(url, {
|
|
971
976
|
method: "POST",
|
|
972
|
-
headers:
|
|
977
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
973
978
|
body: JSON.stringify({ account: params })
|
|
974
979
|
});
|
|
975
980
|
if (!response.ok) {
|
|
@@ -1002,7 +1007,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1002
1007
|
debugLog(debug, scope, "fetchPortfolio:request", { url, address });
|
|
1003
1008
|
const response = await fetch(url, {
|
|
1004
1009
|
method: "GET",
|
|
1005
|
-
headers:
|
|
1010
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS
|
|
1006
1011
|
});
|
|
1007
1012
|
if (!response.ok) {
|
|
1008
1013
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1049,7 +1054,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1049
1054
|
debugLog(debug, scope, "fetchSolanaPortfolio:request", { url, address });
|
|
1050
1055
|
const response = await fetch(url, {
|
|
1051
1056
|
method: "GET",
|
|
1052
|
-
headers:
|
|
1057
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS
|
|
1053
1058
|
});
|
|
1054
1059
|
if (!response.ok) {
|
|
1055
1060
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1079,7 +1084,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1079
1084
|
debugLog(debug, scope, "checkAccount:request", { url, address });
|
|
1080
1085
|
const response = await fetch(url, {
|
|
1081
1086
|
method: "GET",
|
|
1082
|
-
headers:
|
|
1087
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS
|
|
1083
1088
|
});
|
|
1084
1089
|
if (!response.ok) {
|
|
1085
1090
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1114,7 +1119,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1114
1119
|
);
|
|
1115
1120
|
const response = await fetch(url, {
|
|
1116
1121
|
method: "GET",
|
|
1117
|
-
headers:
|
|
1122
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1118
1123
|
cache: "no-store"
|
|
1119
1124
|
});
|
|
1120
1125
|
if (!response.ok) {
|
|
@@ -1142,7 +1147,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1142
1147
|
);
|
|
1143
1148
|
const response = await fetch(url, {
|
|
1144
1149
|
method: "GET",
|
|
1145
|
-
headers:
|
|
1150
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1146
1151
|
cache: "no-store"
|
|
1147
1152
|
});
|
|
1148
1153
|
if (!response.ok) {
|
|
@@ -1166,7 +1171,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1166
1171
|
);
|
|
1167
1172
|
const response = await fetch(url, {
|
|
1168
1173
|
method: "GET",
|
|
1169
|
-
headers:
|
|
1174
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1170
1175
|
cache: "no-store"
|
|
1171
1176
|
});
|
|
1172
1177
|
if (!response.ok) {
|
|
@@ -1188,7 +1193,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1188
1193
|
async getPositions(address) {
|
|
1189
1194
|
const url = apiUrl(`/positions/${address}`);
|
|
1190
1195
|
debugLog(debug, scope, "getPositions:request", { url, address });
|
|
1191
|
-
const response = await fetch(url, { headers:
|
|
1196
|
+
const response = await fetch(url, { headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS });
|
|
1192
1197
|
if (!response.ok) {
|
|
1193
1198
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
1194
1199
|
debugError(debug, scope, "getPositions:failed", error, {
|
|
@@ -1222,7 +1227,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1222
1227
|
});
|
|
1223
1228
|
const response = await fetch(url, {
|
|
1224
1229
|
method: "POST",
|
|
1225
|
-
headers:
|
|
1230
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1226
1231
|
body: JSON.stringify({ account, market, chainId, asset, amount })
|
|
1227
1232
|
});
|
|
1228
1233
|
if (!response.ok) {
|
|
@@ -1258,7 +1263,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1258
1263
|
});
|
|
1259
1264
|
const response = await fetch(url, {
|
|
1260
1265
|
method: "POST",
|
|
1261
|
-
headers:
|
|
1266
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1262
1267
|
body: JSON.stringify({
|
|
1263
1268
|
depositWallet,
|
|
1264
1269
|
owner,
|
|
@@ -1300,7 +1305,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1300
1305
|
});
|
|
1301
1306
|
const response = await fetch(url, {
|
|
1302
1307
|
method: "GET",
|
|
1303
|
-
headers:
|
|
1308
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1304
1309
|
cache: "no-store"
|
|
1305
1310
|
});
|
|
1306
1311
|
if (!response.ok) {
|
|
@@ -1353,7 +1358,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1353
1358
|
});
|
|
1354
1359
|
const response = await fetch(url, {
|
|
1355
1360
|
method: "GET",
|
|
1356
|
-
headers:
|
|
1361
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1357
1362
|
cache: "no-store"
|
|
1358
1363
|
});
|
|
1359
1364
|
if (!response.ok) {
|
|
@@ -1398,7 +1403,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1398
1403
|
try {
|
|
1399
1404
|
const response = await fetch(url, {
|
|
1400
1405
|
method: "POST",
|
|
1401
|
-
headers:
|
|
1406
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1402
1407
|
body: JSON.stringify(body),
|
|
1403
1408
|
cache: "no-store"
|
|
1404
1409
|
});
|
|
@@ -1435,7 +1440,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1435
1440
|
try {
|
|
1436
1441
|
const response = await fetch(url, {
|
|
1437
1442
|
method: "GET",
|
|
1438
|
-
headers:
|
|
1443
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1439
1444
|
cache: "no-store"
|
|
1440
1445
|
});
|
|
1441
1446
|
if (!response.ok) {
|
|
@@ -1465,7 +1470,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1465
1470
|
try {
|
|
1466
1471
|
const response = await fetch(url, {
|
|
1467
1472
|
method: "GET",
|
|
1468
|
-
headers:
|
|
1473
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1469
1474
|
cache: "no-store"
|
|
1470
1475
|
});
|
|
1471
1476
|
if (!response.ok) {
|
|
@@ -1490,7 +1495,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1490
1495
|
});
|
|
1491
1496
|
const response = await fetch(url, {
|
|
1492
1497
|
method: "POST",
|
|
1493
|
-
headers:
|
|
1498
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1494
1499
|
body: JSON.stringify(params)
|
|
1495
1500
|
});
|
|
1496
1501
|
if (!response.ok) {
|
|
@@ -1522,7 +1527,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1522
1527
|
});
|
|
1523
1528
|
const response = await fetch(url, {
|
|
1524
1529
|
method: "POST",
|
|
1525
|
-
headers:
|
|
1530
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1526
1531
|
body: JSON.stringify(params)
|
|
1527
1532
|
});
|
|
1528
1533
|
if (!response.ok) {
|
|
@@ -1559,7 +1564,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1559
1564
|
debugLog(debug, scope, "getSwappedConnectExchanges:request");
|
|
1560
1565
|
const response = await fetch(url, {
|
|
1561
1566
|
method: "GET",
|
|
1562
|
-
headers:
|
|
1567
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1563
1568
|
cache: "no-store"
|
|
1564
1569
|
});
|
|
1565
1570
|
if (!response.ok) {
|
|
@@ -1594,7 +1599,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1594
1599
|
throw new Error("Swapped Connect exchanges: malformed response");
|
|
1595
1600
|
}
|
|
1596
1601
|
return {
|
|
1597
|
-
exchanges,
|
|
1602
|
+
exchanges: exchanges.filter(isSupportedConnectExchange),
|
|
1598
1603
|
fetchedAt: body.fetchedAt,
|
|
1599
1604
|
expiresAt: body.expiresAt,
|
|
1600
1605
|
stale: body.stale === true ? true : void 0,
|
|
@@ -1612,7 +1617,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1612
1617
|
try {
|
|
1613
1618
|
const response = await fetch(url, {
|
|
1614
1619
|
method: "GET",
|
|
1615
|
-
headers:
|
|
1620
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1616
1621
|
cache: "no-store"
|
|
1617
1622
|
});
|
|
1618
1623
|
if (!response.ok) {
|
|
@@ -1698,7 +1703,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1698
1703
|
try {
|
|
1699
1704
|
const response = await fetch(url, {
|
|
1700
1705
|
method: "GET",
|
|
1701
|
-
headers:
|
|
1706
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1702
1707
|
cache: "no-store"
|
|
1703
1708
|
});
|
|
1704
1709
|
if (!response.ok) {
|
|
@@ -1725,7 +1730,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1725
1730
|
);
|
|
1726
1731
|
const response = await fetch(url, {
|
|
1727
1732
|
method: "GET",
|
|
1728
|
-
headers:
|
|
1733
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
1729
1734
|
cache: "no-store"
|
|
1730
1735
|
});
|
|
1731
1736
|
if (!response.ok) return null;
|
|
@@ -2445,6 +2450,22 @@ function isUnsupportedChainSwitchError(error) {
|
|
|
2445
2450
|
const message = (error instanceof Error ? error.message : String(error)).toLowerCase();
|
|
2446
2451
|
return name === "SwitchChainNotSupportedError" || message.includes("does not support programmatic chain switching") || message.includes("switch chain not supported") || message.includes("method not found") || message.includes("does not exist") || message.includes("is not available");
|
|
2447
2452
|
}
|
|
2453
|
+
var OPAQUE_REVERT_REASONS = [
|
|
2454
|
+
"unexpected error",
|
|
2455
|
+
"internal error",
|
|
2456
|
+
"unknown error",
|
|
2457
|
+
"internal json-rpc error"
|
|
2458
|
+
];
|
|
2459
|
+
var DETAIL_SECTION_HEADINGS = [
|
|
2460
|
+
"Request Arguments:",
|
|
2461
|
+
"Raw Call Arguments:",
|
|
2462
|
+
"Request body:",
|
|
2463
|
+
"Contract Call:",
|
|
2464
|
+
"Docs:",
|
|
2465
|
+
"Details:",
|
|
2466
|
+
"Version:",
|
|
2467
|
+
"URL:"
|
|
2468
|
+
];
|
|
2448
2469
|
function formatUserError(raw) {
|
|
2449
2470
|
const lower = raw.toLowerCase();
|
|
2450
2471
|
if (lower.includes("user rejected") || lower.includes("user denied")) {
|
|
@@ -2456,6 +2477,22 @@ function formatUserError(raw) {
|
|
|
2456
2477
|
if (lower.includes("nonce too low") || lower.includes("nonce too high")) {
|
|
2457
2478
|
return "Transaction conflict \u2014 please try again";
|
|
2458
2479
|
}
|
|
2480
|
+
const revertMarker = "reverted with the following reason:";
|
|
2481
|
+
const revertIdx = lower.indexOf(revertMarker);
|
|
2482
|
+
const revertReason = revertIdx === -1 ? null : _nullishCoalesce(raw.slice(revertIdx + revertMarker.length).split(/\n[^\S\n]*\n/)[0].split("\n").map((line) => line.trim()).find(
|
|
2483
|
+
(line) => line.length > 0 && !DETAIL_SECTION_HEADINGS.some(
|
|
2484
|
+
(heading) => line.startsWith(heading)
|
|
2485
|
+
)
|
|
2486
|
+
), () => ( ""));
|
|
2487
|
+
if (revertReason !== null) {
|
|
2488
|
+
const reasonLower = revertReason.toLowerCase();
|
|
2489
|
+
if (reasonLower.includes("execution reverted")) {
|
|
2490
|
+
return "Transaction would fail on-chain";
|
|
2491
|
+
}
|
|
2492
|
+
if (revertReason === "" || revertReason === "0x" || OPAQUE_REVERT_REASONS.some((opaque) => reasonLower.includes(opaque))) {
|
|
2493
|
+
return "Your wallet couldn't send the transaction \u2014 please try again";
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2459
2496
|
if (lower.includes("execution reverted")) {
|
|
2460
2497
|
return "Transaction would fail on-chain";
|
|
2461
2498
|
}
|
|
@@ -2474,7 +2511,7 @@ function formatUserError(raw) {
|
|
|
2474
2511
|
if (lower.includes("rate limit") || lower.includes("429")) {
|
|
2475
2512
|
return "Rate limited \u2014 please try again shortly";
|
|
2476
2513
|
}
|
|
2477
|
-
let cleaned = raw;
|
|
2514
|
+
let cleaned = revertReason || raw;
|
|
2478
2515
|
const stripMarkers = [
|
|
2479
2516
|
"\n\nRequest Arguments:",
|
|
2480
2517
|
"\nRaw Call Arguments:",
|
|
@@ -2887,4 +2924,5 @@ function checkBackendUrl(component, backendUrl) {
|
|
|
2887
2924
|
|
|
2888
2925
|
|
|
2889
2926
|
|
|
2890
|
-
|
|
2927
|
+
|
|
2928
|
+
exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronRightIcon = ChevronRightIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.CoinsIcon = CoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.CardIcon = CardIcon; exports.BankIcon = BankIcon; exports.UnplugIcon = UnplugIcon; exports.MigrateAssetsIcon = MigrateAssetsIcon; exports.AppleIcon = AppleIcon; exports.BodyHeader = BodyHeader; exports.CdnIcon = CdnIcon; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.catalogKeyForChain = catalogKeyForChain; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.chainIdsByValue = chainIdsByValue; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.formatFeeUsd = formatFeeUsd; exports.quoteFeeRow = quoteFeeRow; exports.quoteFeeGroups = quoteFeeGroups; exports.SwappedConnectFeeChangedError = SwappedConnectFeeChangedError; exports.SUPPORTED_CONNECT_EXCHANGE_COUNT = SUPPORTED_CONNECT_EXCHANGE_COUNT; exports.resolveAppFeeBps = resolveAppFeeBps; exports.createDepositService = createDepositService; exports.rpcUrlFor = rpcUrlFor; exports.RpcUrlsProvider = RpcUrlsProvider; exports.useRpcUrls = useRpcUrls; exports.useStableRpcUrls = useStableRpcUrls; exports.getPublicClient = getPublicClient; exports.peekRuntimeChains = peekRuntimeChains; exports.primeRuntimeChains = primeRuntimeChains; exports.useChainCatalog = useChainCatalog; exports.useCatalogChain = useCatalogChain; exports.useDepositChainIds = useDepositChainIds; exports.useDestinationChains = useDestinationChains; exports.useTargetTokens = useTargetTokens; exports.useIsDepositChain = useIsDepositChain; exports.useChainName = useChainName; exports.useExplorerTxUrl = useExplorerTxUrl; exports.ChainCatalogProvider = ChainCatalogProvider; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.Callout = Callout; exports.TokenIcon = TokenIcon; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.resolveTokenDisplay = resolveTokenDisplay; exports.formatTokenAmount = formatTokenAmount; exports.tokenAmountToNumber = tokenAmountToNumber; exports.formatRawTokenAmount = formatRawTokenAmount; exports.isDisplayStablecoinSymbol = isDisplayStablecoinSymbol; exports.isRecognizedToken = isRecognizedToken; exports.estimateReceiveAmount = estimateReceiveAmount; exports.formatQuotedReceive = formatQuotedReceive; exports.formatReceiveEstimate = formatReceiveEstimate; exports.applyTheme = applyTheme; exports.checkBackendUrl = checkBackendUrl;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFVUXJ3RPcjs = require('./chunk-FVUXJ3RP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -28,10 +28,10 @@ var _chunkJYKMR6QIcjs = require('./chunk-JYKMR6QI.cjs');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkZQR36NCVcjs = require('./chunk-ZQR36NCV.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunk4FTI3GTBcjs = require('./chunk-4FTI3GTB.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -68,7 +68,7 @@ var Input = _react.forwardRef.call(void 0,
|
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "rs-input-error", children: [
|
|
71
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
71
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.AlertTriangleIcon, { className: "rs-input-error-icon" }),
|
|
72
72
|
error
|
|
73
73
|
] })
|
|
74
74
|
] });
|
|
@@ -154,7 +154,7 @@ async function submitSignedRecovery(params) {
|
|
|
154
154
|
try {
|
|
155
155
|
signature = await signRecovery({ typedData, signer, depositId, destination });
|
|
156
156
|
} catch (error) {
|
|
157
|
-
|
|
157
|
+
_chunkZQR36NCVcjs.debugError.call(void 0, debug, scope, "signRecovery:failed", error);
|
|
158
158
|
throw new RecoveryError(
|
|
159
159
|
"Signature request was declined. Approve it in your wallet to recover this deposit.",
|
|
160
160
|
0,
|
|
@@ -171,7 +171,7 @@ async function submitSignedRecovery(params) {
|
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
const url = `${backendUrl.replace(/\/$/, "")}/deposits/recover`;
|
|
174
|
-
|
|
174
|
+
_chunkZQR36NCVcjs.debugLog.call(void 0, debug, scope, "submitSignedRecovery:request", {
|
|
175
175
|
url,
|
|
176
176
|
depositId,
|
|
177
177
|
signer
|
|
@@ -183,19 +183,19 @@ async function submitSignedRecovery(params) {
|
|
|
183
183
|
// The shared const, so recovery carries `x-deposit-modal-version` like
|
|
184
184
|
// every other backend call. Without it this path would be invisible in the
|
|
185
185
|
// per-client version telemetry the processor records.
|
|
186
|
-
headers:
|
|
186
|
+
headers: _chunk4FTI3GTBcjs.SERVICE_HEADERS,
|
|
187
187
|
// `depositId` as a string: it is a uint256 upstream and JSON numbers lose
|
|
188
188
|
// precision well before that range.
|
|
189
189
|
body: JSON.stringify({ depositId, destination, signature })
|
|
190
190
|
});
|
|
191
191
|
} catch (error) {
|
|
192
|
-
|
|
192
|
+
_chunkZQR36NCVcjs.debugError.call(void 0, debug, scope, "submitSignedRecovery:network", error);
|
|
193
193
|
const { message, retryable } = formatRecoveryError(0);
|
|
194
194
|
throw new RecoveryError(message, 0, void 0, retryable);
|
|
195
195
|
}
|
|
196
196
|
if (!response.ok) {
|
|
197
197
|
const body = await response.json().catch(() => ({}));
|
|
198
|
-
|
|
198
|
+
_chunkZQR36NCVcjs.debugError.call(void 0, debug, scope, "submitSignedRecovery:failed", body, {
|
|
199
199
|
status: response.status
|
|
200
200
|
});
|
|
201
201
|
const { message, retryable } = formatRecoveryError(
|
|
@@ -206,7 +206,7 @@ async function submitSignedRecovery(params) {
|
|
|
206
206
|
throw new RecoveryError(message, response.status, body.code, retryable);
|
|
207
207
|
}
|
|
208
208
|
const result = await response.json();
|
|
209
|
-
|
|
209
|
+
_chunkZQR36NCVcjs.debugLog.call(void 0, debug, scope, "submitSignedRecovery:success", {
|
|
210
210
|
transactionHash: result.transactionHash
|
|
211
211
|
});
|
|
212
212
|
return result;
|
|
@@ -228,7 +228,7 @@ function describeDeposit(row) {
|
|
|
228
228
|
const symbol = _chunkTENL4H64cjs.getTokenSymbol.call(void 0, row.token, chainId);
|
|
229
229
|
const raw = BigInt(_nullishCoalesce(_nullishCoalesce(row.sourceAmount, () => ( row.amount)), () => ( "0")));
|
|
230
230
|
const human = Number(_viem.formatUnits.call(void 0, raw, decimals));
|
|
231
|
-
const amount = _nullishCoalesce(
|
|
231
|
+
const amount = _nullishCoalesce(_chunkZQR36NCVcjs.formatTokenAmount.call(void 0, human, symbol), () => ( _viem.formatUnits.call(void 0, raw, decimals)));
|
|
232
232
|
return {
|
|
233
233
|
chainId,
|
|
234
234
|
symbol,
|
|
@@ -325,15 +325,15 @@ function ClaimModal({
|
|
|
325
325
|
onError,
|
|
326
326
|
debug
|
|
327
327
|
}) {
|
|
328
|
-
|
|
328
|
+
_chunkZQR36NCVcjs.checkBackendUrl.call(void 0, "ClaimModal", backendUrl);
|
|
329
329
|
const modalRef = _react.useRef.call(void 0, null);
|
|
330
|
-
const onReadyRef =
|
|
331
|
-
const onLifecycleRef =
|
|
332
|
-
const onEventRef =
|
|
333
|
-
const onErrorRef =
|
|
334
|
-
const rpcUrls =
|
|
330
|
+
const onReadyRef = _chunkZQR36NCVcjs.useLatestRef.call(void 0, onReady);
|
|
331
|
+
const onLifecycleRef = _chunkZQR36NCVcjs.useLatestRef.call(void 0, onLifecycle);
|
|
332
|
+
const onEventRef = _chunkZQR36NCVcjs.useLatestRef.call(void 0, onEvent);
|
|
333
|
+
const onErrorRef = _chunkZQR36NCVcjs.useLatestRef.call(void 0, onError);
|
|
334
|
+
const rpcUrls = _chunkZQR36NCVcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
335
335
|
const service = _react.useMemo.call(void 0,
|
|
336
|
-
() =>
|
|
336
|
+
() => _chunkZQR36NCVcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:claim" }),
|
|
337
337
|
[backendUrl, debug]
|
|
338
338
|
);
|
|
339
339
|
const [state, dispatch] = _react.useReducer.call(void 0, claimReducer, INITIAL_STATE);
|
|
@@ -341,7 +341,7 @@ function ClaimModal({
|
|
|
341
341
|
const isOpenRef = _react.useRef.call(void 0, isOpen);
|
|
342
342
|
isOpenRef.current = isOpen;
|
|
343
343
|
_react.useEffect.call(void 0, () => {
|
|
344
|
-
if (isOpen && modalRef.current)
|
|
344
|
+
if (isOpen && modalRef.current) _chunkZQR36NCVcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
345
345
|
}, [isOpen, theme]);
|
|
346
346
|
_react.useEffect.call(void 0, () => {
|
|
347
347
|
if (isOpen) {
|
|
@@ -363,8 +363,8 @@ function ClaimModal({
|
|
|
363
363
|
}, [state.step, onClose]);
|
|
364
364
|
const canGoBack = state.step === "select" || state.step === "review" || state.step === "failed";
|
|
365
365
|
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _7 => _7.showBackButton]), () => ( true));
|
|
366
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
367
|
-
|
|
366
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
367
|
+
_chunkZQR36NCVcjs.Modal,
|
|
368
368
|
{
|
|
369
369
|
isOpen,
|
|
370
370
|
onClose: handleClose,
|
|
@@ -380,7 +380,7 @@ function ClaimModal({
|
|
|
380
380
|
className: "rs-modal-header-back",
|
|
381
381
|
"aria-label": "Go back",
|
|
382
382
|
onClick: () => dispatch({ type: "back" }),
|
|
383
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
383
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.ChevronLeftIcon, {})
|
|
384
384
|
}
|
|
385
385
|
) }),
|
|
386
386
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -391,7 +391,7 @@ function ClaimModal({
|
|
|
391
391
|
disabled: state.step === "processing",
|
|
392
392
|
className: "rs-modal-close",
|
|
393
393
|
"aria-label": "Close",
|
|
394
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
394
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.CloseIcon, {})
|
|
395
395
|
}
|
|
396
396
|
) })
|
|
397
397
|
] }),
|
|
@@ -529,7 +529,7 @@ function ClaimBody({
|
|
|
529
529
|
const refundedRaw = BigInt(
|
|
530
530
|
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(result.amount, () => ( deposit.sourceAmount)), () => ( deposit.amount)), () => ( "0"))
|
|
531
531
|
);
|
|
532
|
-
const amountDisplay = _nullishCoalesce(
|
|
532
|
+
const amountDisplay = _nullishCoalesce(_chunkZQR36NCVcjs.formatTokenAmount.call(void 0, Number(_viem.formatUnits.call(void 0, refundedRaw, decimals)), symbol), () => ( _viem.formatUnits.call(void 0, refundedRaw, decimals)));
|
|
533
533
|
dispatch({
|
|
534
534
|
type: "complete",
|
|
535
535
|
txHash: result.transactionHash,
|
|
@@ -556,7 +556,7 @@ function ClaimBody({
|
|
|
556
556
|
if (!isCurrentOperation()) return;
|
|
557
557
|
const recoveryError = err instanceof RecoveryError ? err : void 0;
|
|
558
558
|
const status = _optionalChain([recoveryError, 'optionalAccess', _16 => _16.status]);
|
|
559
|
-
const message = _nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess', _17 => _17.message]), () => (
|
|
559
|
+
const message = _nullishCoalesce(_optionalChain([recoveryError, 'optionalAccess', _17 => _17.message]), () => ( _chunkZQR36NCVcjs.formatUserError.call(void 0,
|
|
560
560
|
err instanceof Error ? err.message : "Recovery failed"
|
|
561
561
|
)));
|
|
562
562
|
dispatch({
|
|
@@ -621,7 +621,7 @@ function LookupStep({
|
|
|
621
621
|
onResults(deposits);
|
|
622
622
|
} catch (err) {
|
|
623
623
|
if (!isCurrentOperation()) return;
|
|
624
|
-
const message =
|
|
624
|
+
const message = _chunkZQR36NCVcjs.formatUserError.call(void 0,
|
|
625
625
|
err instanceof Error ? err.message : "Lookup failed"
|
|
626
626
|
);
|
|
627
627
|
setError(message);
|
|
@@ -642,9 +642,9 @@ function LookupStep({
|
|
|
642
642
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
643
643
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
644
644
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
645
|
-
|
|
645
|
+
_chunkZQR36NCVcjs.BodyHeader,
|
|
646
646
|
{
|
|
647
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
647
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.HandCoinsIcon, {}),
|
|
648
648
|
title: "Claim a deposit",
|
|
649
649
|
subtitle: "Get funds from a failed deposit sent back to you on the source chain."
|
|
650
650
|
}
|
|
@@ -659,9 +659,9 @@ function LookupStep({
|
|
|
659
659
|
error: trimmed.length > 0 && !validTxHash ? "Enter a valid transaction hash" : void 0
|
|
660
660
|
}
|
|
661
661
|
),
|
|
662
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
662
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.Callout, { variant: "error", children: error }),
|
|
663
663
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
664
|
-
|
|
664
|
+
_chunkZQR36NCVcjs.Button,
|
|
665
665
|
{
|
|
666
666
|
onClick: handleLookup,
|
|
667
667
|
loading,
|
|
@@ -672,7 +672,7 @@ function LookupStep({
|
|
|
672
672
|
}
|
|
673
673
|
)
|
|
674
674
|
] }),
|
|
675
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
675
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.PoweredBy, {})
|
|
676
676
|
] });
|
|
677
677
|
}
|
|
678
678
|
function SelectStep({
|
|
@@ -682,9 +682,9 @@ function SelectStep({
|
|
|
682
682
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
683
683
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
684
684
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
685
|
-
|
|
685
|
+
_chunkZQR36NCVcjs.BodyHeader,
|
|
686
686
|
{
|
|
687
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
687
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.CoinsIcon, {}),
|
|
688
688
|
title: "Select a deposit",
|
|
689
689
|
subtitle: "This transaction produced multiple deposits. Choose the one to claim."
|
|
690
690
|
}
|
|
@@ -693,7 +693,7 @@ function SelectStep({
|
|
|
693
693
|
const { symbol, amount, chainName } = describeDeposit(row);
|
|
694
694
|
const eligible = isEligible(row);
|
|
695
695
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
696
|
-
|
|
696
|
+
_chunkFVUXJ3RPcjs.ListRow,
|
|
697
697
|
{
|
|
698
698
|
leadingMedia: _chunkTENL4H64cjs.tokenIconUrl.call(void 0, symbol),
|
|
699
699
|
title: `${amount} ${symbol}`,
|
|
@@ -706,7 +706,7 @@ function SelectStep({
|
|
|
706
706
|
);
|
|
707
707
|
}) })
|
|
708
708
|
] }),
|
|
709
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
709
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.PoweredBy, {})
|
|
710
710
|
] });
|
|
711
711
|
}
|
|
712
712
|
function ReviewStep({
|
|
@@ -716,15 +716,15 @@ function ReviewStep({
|
|
|
716
716
|
onSubmit
|
|
717
717
|
}) {
|
|
718
718
|
const { chainId, symbol, amount, chainName, chainIcon } = describeDeposit(deposit);
|
|
719
|
-
const explorerTxUrl =
|
|
719
|
+
const explorerTxUrl = _chunkZQR36NCVcjs.useExplorerTxUrl.call(void 0, );
|
|
720
720
|
const [destination, setDestination] = _react.useState.call(void 0, _nullishCoalesce(defaultRefundDestination, () => ( "")));
|
|
721
721
|
const destinationValid = _viem.isAddress.call(void 0, destination);
|
|
722
722
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
723
723
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
724
724
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
725
|
-
|
|
725
|
+
_chunkZQR36NCVcjs.BodyHeader,
|
|
726
726
|
{
|
|
727
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
727
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.HandCoinsIcon, {}),
|
|
728
728
|
title: "Review refund",
|
|
729
729
|
subtitle: "This returns the funds on the source chain. It does not retry the original bridge."
|
|
730
730
|
}
|
|
@@ -738,14 +738,14 @@ function ReviewStep({
|
|
|
738
738
|
" ",
|
|
739
739
|
symbol
|
|
740
740
|
] }),
|
|
741
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
741
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.TokenIcon, { symbol }) })
|
|
742
742
|
] })
|
|
743
743
|
] }),
|
|
744
744
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
745
745
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
746
746
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
747
747
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
|
|
748
|
-
chainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
748
|
+
chainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.CdnIcon, { src: chainIcon }) })
|
|
749
749
|
] })
|
|
750
750
|
] }),
|
|
751
751
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -762,7 +762,7 @@ function ReviewStep({
|
|
|
762
762
|
rel: "noreferrer",
|
|
763
763
|
children: [
|
|
764
764
|
short,
|
|
765
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
765
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.ExternalLinkIcon, {})
|
|
766
766
|
]
|
|
767
767
|
}
|
|
768
768
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: short });
|
|
@@ -780,7 +780,7 @@ function ReviewStep({
|
|
|
780
780
|
}
|
|
781
781
|
),
|
|
782
782
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
783
|
-
|
|
783
|
+
_chunkZQR36NCVcjs.Button,
|
|
784
784
|
{
|
|
785
785
|
onClick: () => destinationValid && onSubmit(destination),
|
|
786
786
|
loading: submitting,
|
|
@@ -791,7 +791,7 @@ function ReviewStep({
|
|
|
791
791
|
}
|
|
792
792
|
)
|
|
793
793
|
] }),
|
|
794
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
794
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.PoweredBy, {})
|
|
795
795
|
] });
|
|
796
796
|
}
|
|
797
797
|
function ResultStep({
|
|
@@ -802,13 +802,13 @@ function ResultStep({
|
|
|
802
802
|
onRetry
|
|
803
803
|
}) {
|
|
804
804
|
const success = !!result;
|
|
805
|
-
const explorerTxUrl =
|
|
805
|
+
const explorerTxUrl = _chunkZQR36NCVcjs.useExplorerTxUrl.call(void 0, );
|
|
806
806
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
807
807
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
808
808
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
809
|
-
|
|
809
|
+
_chunkZQR36NCVcjs.BodyHeader,
|
|
810
810
|
{
|
|
811
|
-
icon: success ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
811
|
+
icon: success ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.AlertTriangleIcon, {}),
|
|
812
812
|
variant: success ? "success" : "error",
|
|
813
813
|
title: success ? "Refund submitted" : "Refund failed",
|
|
814
814
|
subtitle: success ? "Your funds are being returned on the source chain." : void 0
|
|
@@ -823,7 +823,7 @@ function ResultStep({
|
|
|
823
823
|
" ",
|
|
824
824
|
result.symbol
|
|
825
825
|
] }),
|
|
826
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
826
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.TokenIcon, { symbol: result.symbol }) })
|
|
827
827
|
] })
|
|
828
828
|
] }),
|
|
829
829
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -844,22 +844,22 @@ function ResultStep({
|
|
|
844
844
|
rel: "noreferrer",
|
|
845
845
|
children: [
|
|
846
846
|
short,
|
|
847
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
847
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.ExternalLinkIcon, {})
|
|
848
848
|
]
|
|
849
849
|
}
|
|
850
850
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: short });
|
|
851
851
|
})()
|
|
852
852
|
] })
|
|
853
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
853
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.Callout, { variant: "error", children: error }),
|
|
854
854
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-button-row", children: success ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
855
|
-
onReset && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
856
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
855
|
+
onReset && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.Button, { variant: "outline", onClick: onReset, fullWidth: true, children: "Claim another deposit" }),
|
|
856
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
857
857
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
858
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
859
|
-
onRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
858
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
|
|
859
|
+
onRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.Button, { onClick: onRetry, fullWidth: true, children: "Try again" })
|
|
860
860
|
] }) })
|
|
861
861
|
] }),
|
|
862
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
862
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZQR36NCVcjs.PoweredBy, {})
|
|
863
863
|
] });
|
|
864
864
|
}
|
|
865
865
|
|