@rhinestone/deposit-modal 0.3.0-alpha.8 → 0.3.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 +76 -0
- package/dist/{DepositModalReown-TYHATVOM.mjs → DepositModalReown-6SUEC5IU.mjs} +4 -4
- package/dist/{DepositModalReown-LWGABUOF.cjs → DepositModalReown-DNW4GH6L.cjs} +7 -7
- package/dist/{QRCode-SMMYPUQC.cjs → QRCode-5DXFNKI2.cjs} +2 -2
- package/dist/{QRCode-YMQTKSSK.mjs → QRCode-WUC652SH.mjs} +2 -2
- package/dist/{WithdrawModalReown-H7HA3JP3.mjs → WithdrawModalReown-7UAGSOSU.mjs} +4 -4
- package/dist/{WithdrawModalReown-FCWED55P.cjs → WithdrawModalReown-OUWBSKSM.cjs} +7 -7
- package/dist/{constants-DqVn968d.d.cts → caip-CrQ2KKU-.d.cts} +11 -1
- package/dist/{constants-DqVn968d.d.ts → caip-CrQ2KKU-.d.ts} +11 -1
- package/dist/{chunk-U3OLJZBT.cjs → chunk-2SMS542Q.cjs} +109 -102
- package/dist/{chunk-PKD7W5JG.cjs → chunk-33H6O5UU.cjs} +6 -16
- package/dist/{chunk-SZIYS42B.mjs → chunk-6YRDD462.mjs} +63 -3
- package/dist/{chunk-E46WOBZQ.mjs → chunk-GPSBM66J.mjs} +2 -12
- package/dist/{chunk-5ZS4ZJPW.mjs → chunk-KAWJABTW.mjs} +1071 -543
- package/dist/{chunk-H7QMSMM5.mjs → chunk-KJ2RR2D4.mjs} +1834 -586
- package/dist/{chunk-7JIDIX27.cjs → chunk-MILJQWPT.cjs} +73 -13
- package/dist/{chunk-UELVNPGE.cjs → chunk-RABZINV3.cjs} +1056 -528
- package/dist/{chunk-DW276H63.mjs → chunk-TKQYTBU6.mjs} +21 -14
- package/dist/{chunk-GBFOGYMH.cjs → chunk-VVJAIMKB.cjs} +1885 -637
- package/dist/constants.cjs +6 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +5 -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/index.cjs +19 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +20 -7
- package/dist/styles.css +685 -75
- package/dist/{types-D8Q4TMk7.d.cts → types-BMcGO5k_.d.cts} +56 -2
- package/dist/{types-D8Q4TMk7.d.ts → types-BMcGO5k_.d.ts} +56 -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 +41 -17
|
@@ -10,8 +10,10 @@ import {
|
|
|
10
10
|
getTokenAddress,
|
|
11
11
|
getTokenDecimalsByAddress,
|
|
12
12
|
getTokenIcon,
|
|
13
|
-
getTokenSymbol
|
|
14
|
-
|
|
13
|
+
getTokenSymbol,
|
|
14
|
+
isSolanaCaip2,
|
|
15
|
+
parseEvmChainId
|
|
16
|
+
} from "./chunk-6YRDD462.mjs";
|
|
15
17
|
|
|
16
18
|
// src/components/ui/Modal.tsx
|
|
17
19
|
import {
|
|
@@ -62,14 +64,14 @@ function Modal({
|
|
|
62
64
|
}
|
|
63
65
|
}, [isOpen]);
|
|
64
66
|
useEffect(() => {
|
|
65
|
-
if (isOpen) {
|
|
67
|
+
if (isOpen && !inline) {
|
|
66
68
|
const originalOverflow = document.body.style.overflow;
|
|
67
69
|
document.body.style.overflow = "hidden";
|
|
68
70
|
return () => {
|
|
69
71
|
document.body.style.overflow = originalOverflow;
|
|
70
72
|
};
|
|
71
73
|
}
|
|
72
|
-
}, [isOpen]);
|
|
74
|
+
}, [isOpen, inline]);
|
|
73
75
|
const handleKeyDown = useCallback(
|
|
74
76
|
(event) => {
|
|
75
77
|
if (event.key === "Escape") {
|
|
@@ -164,7 +166,10 @@ import {
|
|
|
164
166
|
Percent,
|
|
165
167
|
Clock,
|
|
166
168
|
CirclePlus,
|
|
167
|
-
CircleArrowOutUpLeft
|
|
169
|
+
CircleArrowOutUpLeft,
|
|
170
|
+
CreditCard,
|
|
171
|
+
Landmark,
|
|
172
|
+
Apple
|
|
168
173
|
} from "lucide-react";
|
|
169
174
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
170
175
|
var WalletIcon = Wallet;
|
|
@@ -183,7 +188,7 @@ function TransferCryptoIcon() {
|
|
|
183
188
|
children: /* @__PURE__ */ jsx2(
|
|
184
189
|
"path",
|
|
185
190
|
{
|
|
186
|
-
d: "M26.
|
|
191
|
+
d: "M26.08 18.37C27.03 18.72 27.87 19.30 28.53 20.07C29.19 20.83 29.65 21.75 29.86 22.73C30.07 23.72 30.03 24.74 29.74 25.71C29.45 26.68 28.92 27.55 28.20 28.26C27.48 28.97 26.59 29.49 25.62 29.76C24.65 30.04 23.63 30.06 22.64 29.83C21.66 29.61 20.75 29.14 20.00 28.47C19.24 27.80 18.67 26.95 18.33 26.00M15 14H16V18M24.70 21.87L25.40 22.58L22.58 25.40M22 16C22 19.31 19.31 22 16 22C12.68 22 10 19.31 10 16C10 12.68 12.68 10 16 10C19.31 10 22 12.68 22 16Z",
|
|
187
192
|
stroke: "currentColor",
|
|
188
193
|
strokeWidth: "2",
|
|
189
194
|
strokeLinecap: "round",
|
|
@@ -207,6 +212,59 @@ var PercentIcon = Percent;
|
|
|
207
212
|
var ClockIcon = Clock;
|
|
208
213
|
var PlusCircleIcon = CirclePlus;
|
|
209
214
|
var CircleArrowOutUpLeftIcon = CircleArrowOutUpLeft;
|
|
215
|
+
var CardIcon = CreditCard;
|
|
216
|
+
var BankIcon = Landmark;
|
|
217
|
+
var AppleIcon = Apple;
|
|
218
|
+
|
|
219
|
+
// src/components/ui/Callout.tsx
|
|
220
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
221
|
+
function CircleAlertIcon() {
|
|
222
|
+
return /* @__PURE__ */ jsx3(
|
|
223
|
+
"svg",
|
|
224
|
+
{
|
|
225
|
+
width: "16",
|
|
226
|
+
height: "16",
|
|
227
|
+
viewBox: "0 0 16 16",
|
|
228
|
+
fill: "none",
|
|
229
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
230
|
+
"aria-hidden": "true",
|
|
231
|
+
children: /* @__PURE__ */ jsx3(
|
|
232
|
+
"path",
|
|
233
|
+
{
|
|
234
|
+
d: "M10 5.99L6 9.99M6 5.99L10 9.99M14.66 7.99C14.66 11.68 11.68 14.66 8 14.66C4.31 14.66 1.33 11.68 1.33 7.99C1.33 4.31 4.31 1.33 8 1.33C11.68 1.33 14.66 4.31 14.66 7.99Z",
|
|
235
|
+
stroke: "currentColor",
|
|
236
|
+
strokeWidth: "1.33",
|
|
237
|
+
strokeLinecap: "round",
|
|
238
|
+
strokeLinejoin: "round"
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
function Callout({ variant = "error", children, role }) {
|
|
245
|
+
return /* @__PURE__ */ jsxs(
|
|
246
|
+
"div",
|
|
247
|
+
{
|
|
248
|
+
className: `rs-callout rs-callout--${variant}`,
|
|
249
|
+
role: role ?? (variant === "error" ? "alert" : "status"),
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ jsx3("span", { className: "rs-callout-icon", children: variant === "error" ? /* @__PURE__ */ jsx3(CircleAlertIcon, {}) : /* @__PURE__ */ jsx3(AlertTriangleIcon, {}) }),
|
|
252
|
+
/* @__PURE__ */ jsx3("span", { className: "rs-callout-text", children })
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
Callout.displayName = "Callout";
|
|
258
|
+
|
|
259
|
+
// src/core/useLatestRef.ts
|
|
260
|
+
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
261
|
+
function useLatestRef(value) {
|
|
262
|
+
const ref = useRef2(value);
|
|
263
|
+
useEffect2(() => {
|
|
264
|
+
ref.current = value;
|
|
265
|
+
}, [value]);
|
|
266
|
+
return ref;
|
|
267
|
+
}
|
|
210
268
|
|
|
211
269
|
// src/core/debug.ts
|
|
212
270
|
function truncateString(value, max = 240) {
|
|
@@ -261,29 +319,6 @@ function debugError(enabled, scope, message, error, data) {
|
|
|
261
319
|
console.error(`[deposit-modal:${scope}] ${message}`, payload);
|
|
262
320
|
}
|
|
263
321
|
|
|
264
|
-
// src/core/caip.ts
|
|
265
|
-
var SOLANA_MAINNET_GENESIS = "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
266
|
-
var SOLANA_MAINNET_CAIP2 = `solana:${SOLANA_MAINNET_GENESIS}`;
|
|
267
|
-
function toEvmCaip2(chainId) {
|
|
268
|
-
return `eip155:${chainId}`;
|
|
269
|
-
}
|
|
270
|
-
function targetChainToCaip2(targetChain) {
|
|
271
|
-
return targetChain === "solana" ? SOLANA_MAINNET_CAIP2 : toEvmCaip2(targetChain);
|
|
272
|
-
}
|
|
273
|
-
function parseEvmChainId(value) {
|
|
274
|
-
if (typeof value === "number" && Number.isFinite(value)) {
|
|
275
|
-
return value;
|
|
276
|
-
}
|
|
277
|
-
if (typeof value !== "string") return null;
|
|
278
|
-
const match = value.match(/^eip155:(\d+)$/);
|
|
279
|
-
if (!match?.[1]) return null;
|
|
280
|
-
const parsed = Number.parseInt(match[1], 10);
|
|
281
|
-
return Number.isFinite(parsed) ? parsed : null;
|
|
282
|
-
}
|
|
283
|
-
function isSolanaCaip2(value) {
|
|
284
|
-
return typeof value === "string" && value.startsWith("solana:");
|
|
285
|
-
}
|
|
286
|
-
|
|
287
322
|
// src/core/deposit-asset-helpers.ts
|
|
288
323
|
function getAssetId(asset) {
|
|
289
324
|
return `${asset.chainId}:${asset.token.toLowerCase()}`;
|
|
@@ -933,6 +968,44 @@ function createDepositService(baseUrl, options) {
|
|
|
933
968
|
});
|
|
934
969
|
return result;
|
|
935
970
|
},
|
|
971
|
+
async getQuotePreview(params) {
|
|
972
|
+
const url = apiUrl("/quotes/preview");
|
|
973
|
+
const body = {
|
|
974
|
+
account: params.account,
|
|
975
|
+
sourceChainId: `eip155:${params.sourceChainId}`,
|
|
976
|
+
sourceToken: params.sourceToken,
|
|
977
|
+
amount: params.amount
|
|
978
|
+
};
|
|
979
|
+
debugLog(debug, scope, "getQuotePreview:request", {
|
|
980
|
+
url,
|
|
981
|
+
sourceChainId: body.sourceChainId,
|
|
982
|
+
sourceToken: params.sourceToken,
|
|
983
|
+
amount: params.amount
|
|
984
|
+
});
|
|
985
|
+
try {
|
|
986
|
+
const response = await fetch(url, {
|
|
987
|
+
method: "POST",
|
|
988
|
+
headers: { "Content-Type": "application/json" },
|
|
989
|
+
body: JSON.stringify(body),
|
|
990
|
+
cache: "no-store"
|
|
991
|
+
});
|
|
992
|
+
if (!response.ok) {
|
|
993
|
+
debugLog(debug, scope, "getQuotePreview:unavailable", {
|
|
994
|
+
status: response.status
|
|
995
|
+
});
|
|
996
|
+
return null;
|
|
997
|
+
}
|
|
998
|
+
const quote = await response.json();
|
|
999
|
+
debugLog(debug, scope, "getQuotePreview:success", {
|
|
1000
|
+
settlementLayer: quote.settlementLayer,
|
|
1001
|
+
totalUsd: quote.fees?.totalUsd
|
|
1002
|
+
});
|
|
1003
|
+
return quote;
|
|
1004
|
+
} catch (error) {
|
|
1005
|
+
debugError(debug, scope, "getQuotePreview:error", error);
|
|
1006
|
+
return null;
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
936
1009
|
async fetchPrices(symbols) {
|
|
937
1010
|
const list = symbols.filter((s) => s.length > 0);
|
|
938
1011
|
if (list.length === 0) return {};
|
|
@@ -962,6 +1035,150 @@ function createDepositService(baseUrl, options) {
|
|
|
962
1035
|
debugError(debug, scope, "fetchPrices:error", err);
|
|
963
1036
|
return {};
|
|
964
1037
|
}
|
|
1038
|
+
},
|
|
1039
|
+
async getSwappedWidgetUrl(params) {
|
|
1040
|
+
const url = apiUrl("/onramp/swapped/widget-url");
|
|
1041
|
+
debugLog(debug, scope, "getSwappedWidgetUrl:request", {
|
|
1042
|
+
smartAccount: shortRef(params.smartAccount),
|
|
1043
|
+
method: params.method
|
|
1044
|
+
});
|
|
1045
|
+
const response = await fetch(url, {
|
|
1046
|
+
method: "POST",
|
|
1047
|
+
headers: { "Content-Type": "application/json" },
|
|
1048
|
+
body: JSON.stringify(params)
|
|
1049
|
+
});
|
|
1050
|
+
if (!response.ok) {
|
|
1051
|
+
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
1052
|
+
debugError(debug, scope, "getSwappedWidgetUrl:failed", error, {
|
|
1053
|
+
status: response.status
|
|
1054
|
+
});
|
|
1055
|
+
throw new Error(
|
|
1056
|
+
error.error || `Swapped widget URL failed: ${response.status}`
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1059
|
+
const body = await response.json();
|
|
1060
|
+
if (typeof body.url !== "string" || typeof body.currencyCode !== "string" || typeof body.externalCustomerId !== "string") {
|
|
1061
|
+
throw new Error("Swapped widget URL: malformed response");
|
|
1062
|
+
}
|
|
1063
|
+
return {
|
|
1064
|
+
url: body.url,
|
|
1065
|
+
currencyCode: body.currencyCode,
|
|
1066
|
+
sandbox: body.sandbox === true,
|
|
1067
|
+
externalCustomerId: body.externalCustomerId,
|
|
1068
|
+
expiresAt: body.expiresAt
|
|
1069
|
+
};
|
|
1070
|
+
},
|
|
1071
|
+
async getSwappedConnectUrl(params) {
|
|
1072
|
+
const url = apiUrl("/onramp/swapped/connect-url");
|
|
1073
|
+
debugLog(debug, scope, "getSwappedConnectUrl:request", {
|
|
1074
|
+
smartAccount: shortRef(params.smartAccount),
|
|
1075
|
+
connection: params.connection
|
|
1076
|
+
});
|
|
1077
|
+
const response = await fetch(url, {
|
|
1078
|
+
method: "POST",
|
|
1079
|
+
headers: { "Content-Type": "application/json" },
|
|
1080
|
+
body: JSON.stringify(params)
|
|
1081
|
+
});
|
|
1082
|
+
if (!response.ok) {
|
|
1083
|
+
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
1084
|
+
debugError(debug, scope, "getSwappedConnectUrl:failed", error, {
|
|
1085
|
+
status: response.status
|
|
1086
|
+
});
|
|
1087
|
+
throw new Error(
|
|
1088
|
+
error.error || `Swapped Connect URL failed: ${response.status}`
|
|
1089
|
+
);
|
|
1090
|
+
}
|
|
1091
|
+
const body = await response.json();
|
|
1092
|
+
if (typeof body.url !== "string" || typeof body.currencyCode !== "string" || typeof body.externalCustomerId !== "string") {
|
|
1093
|
+
throw new Error("Swapped Connect URL: malformed response");
|
|
1094
|
+
}
|
|
1095
|
+
return {
|
|
1096
|
+
url: body.url,
|
|
1097
|
+
currencyCode: body.currencyCode,
|
|
1098
|
+
sandbox: body.sandbox === true,
|
|
1099
|
+
externalCustomerId: body.externalCustomerId,
|
|
1100
|
+
expiresAt: body.expiresAt
|
|
1101
|
+
};
|
|
1102
|
+
},
|
|
1103
|
+
async getSwappedConnectExchanges() {
|
|
1104
|
+
const url = apiUrl("/onramp/swapped/connect-exchanges");
|
|
1105
|
+
debugLog(debug, scope, "getSwappedConnectExchanges:request");
|
|
1106
|
+
const response = await fetch(url, {
|
|
1107
|
+
method: "GET",
|
|
1108
|
+
headers: { "Content-Type": "application/json" },
|
|
1109
|
+
cache: "no-store"
|
|
1110
|
+
});
|
|
1111
|
+
if (!response.ok) {
|
|
1112
|
+
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
1113
|
+
debugError(debug, scope, "getSwappedConnectExchanges:failed", error, {
|
|
1114
|
+
status: response.status
|
|
1115
|
+
});
|
|
1116
|
+
throw new Error(
|
|
1117
|
+
error.error || `Swapped Connect exchanges failed: ${response.status}`
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
const body = await response.json();
|
|
1121
|
+
const rawExchanges = Array.isArray(body.exchanges) ? body.exchanges : null;
|
|
1122
|
+
const exchanges = [];
|
|
1123
|
+
let hasMalformedExchange = rawExchanges === null;
|
|
1124
|
+
for (const exchange of rawExchanges ?? []) {
|
|
1125
|
+
if (!exchange || typeof exchange !== "object") {
|
|
1126
|
+
hasMalformedExchange = true;
|
|
1127
|
+
continue;
|
|
1128
|
+
}
|
|
1129
|
+
const raw = exchange;
|
|
1130
|
+
const connection = typeof raw.connection === "string" ? raw.connection : "";
|
|
1131
|
+
const name = typeof raw.name === "string" ? raw.name : "";
|
|
1132
|
+
const logoUrl = typeof raw.logoUrl === "string" || raw.logoUrl === null ? raw.logoUrl : null;
|
|
1133
|
+
if (!connection || !name) {
|
|
1134
|
+
hasMalformedExchange = true;
|
|
1135
|
+
continue;
|
|
1136
|
+
}
|
|
1137
|
+
exchanges.push({ connection, name, logoUrl });
|
|
1138
|
+
}
|
|
1139
|
+
if (hasMalformedExchange || typeof body.fetchedAt !== "string" || typeof body.expiresAt !== "string") {
|
|
1140
|
+
throw new Error("Swapped Connect exchanges: malformed response");
|
|
1141
|
+
}
|
|
1142
|
+
return {
|
|
1143
|
+
exchanges,
|
|
1144
|
+
fetchedAt: body.fetchedAt,
|
|
1145
|
+
expiresAt: body.expiresAt,
|
|
1146
|
+
stale: body.stale === true ? true : void 0
|
|
1147
|
+
};
|
|
1148
|
+
},
|
|
1149
|
+
async fetchSwappedOrderStatus(smartAccount) {
|
|
1150
|
+
const url = apiUrl(
|
|
1151
|
+
`/onramp/swapped/status/${encodeURIComponent(smartAccount)}`
|
|
1152
|
+
);
|
|
1153
|
+
const response = await fetch(url, {
|
|
1154
|
+
method: "GET",
|
|
1155
|
+
headers: { "Content-Type": "application/json" },
|
|
1156
|
+
cache: "no-store"
|
|
1157
|
+
});
|
|
1158
|
+
if (!response.ok) return null;
|
|
1159
|
+
let body = null;
|
|
1160
|
+
try {
|
|
1161
|
+
body = await response.json();
|
|
1162
|
+
} catch {
|
|
1163
|
+
return null;
|
|
1164
|
+
}
|
|
1165
|
+
if (!body || body.ok !== true) return null;
|
|
1166
|
+
const status = typeof body.status === "string" ? body.status : null;
|
|
1167
|
+
const orderId = typeof body.orderId === "string" ? body.orderId : null;
|
|
1168
|
+
if (!status || !orderId) return null;
|
|
1169
|
+
const numericOrNull = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
1170
|
+
return {
|
|
1171
|
+
orderId,
|
|
1172
|
+
status,
|
|
1173
|
+
orderCrypto: typeof body.orderCrypto === "string" ? body.orderCrypto : null,
|
|
1174
|
+
orderCryptoAmount: typeof body.orderCryptoAmount === "string" ? body.orderCryptoAmount : null,
|
|
1175
|
+
transactionId: typeof body.transactionId === "string" ? body.transactionId : null,
|
|
1176
|
+
receivedAt: typeof body.receivedAt === "string" ? body.receivedAt : null,
|
|
1177
|
+
paidAmountUsd: numericOrNull(body.paidAmountUsd),
|
|
1178
|
+
paidAmountEur: numericOrNull(body.paidAmountEur),
|
|
1179
|
+
onrampFeeUsd: numericOrNull(body.onrampFeeUsd),
|
|
1180
|
+
paymentMethod: typeof body.paymentMethod === "string" ? body.paymentMethod : null
|
|
1181
|
+
};
|
|
965
1182
|
}
|
|
966
1183
|
};
|
|
967
1184
|
}
|
|
@@ -1145,14 +1362,31 @@ function formatUserError(raw) {
|
|
|
1145
1362
|
return cleaned;
|
|
1146
1363
|
}
|
|
1147
1364
|
|
|
1148
|
-
// src/core/
|
|
1149
|
-
import {
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1365
|
+
// src/core/public-client.ts
|
|
1366
|
+
import { createPublicClient, http } from "viem";
|
|
1367
|
+
import { hyperliquid } from "viem/chains";
|
|
1368
|
+
var clientCache = /* @__PURE__ */ new Map();
|
|
1369
|
+
function getPublicClient(chainId) {
|
|
1370
|
+
let client = clientCache.get(chainId);
|
|
1371
|
+
if (!client) {
|
|
1372
|
+
const chain = CHAIN_BY_ID[chainId];
|
|
1373
|
+
client = createPublicClient({
|
|
1374
|
+
chain,
|
|
1375
|
+
transport: http()
|
|
1376
|
+
});
|
|
1377
|
+
clientCache.set(chainId, client);
|
|
1378
|
+
}
|
|
1379
|
+
return client;
|
|
1380
|
+
}
|
|
1381
|
+
var hyperEvmClient;
|
|
1382
|
+
function getHyperEvmReadClient() {
|
|
1383
|
+
if (!hyperEvmClient) {
|
|
1384
|
+
hyperEvmClient = createPublicClient({
|
|
1385
|
+
chain: hyperliquid,
|
|
1386
|
+
transport: http()
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
return hyperEvmClient;
|
|
1156
1390
|
}
|
|
1157
1391
|
|
|
1158
1392
|
// src/core/theme.ts
|
|
@@ -1315,7 +1549,7 @@ function applyTheme(element, theme) {
|
|
|
1315
1549
|
}
|
|
1316
1550
|
|
|
1317
1551
|
// src/components/ui/BodyHeader.tsx
|
|
1318
|
-
import { jsx as
|
|
1552
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1319
1553
|
function BodyHeader({
|
|
1320
1554
|
icon,
|
|
1321
1555
|
title,
|
|
@@ -1327,19 +1561,19 @@ function BodyHeader({
|
|
|
1327
1561
|
variant === "success" ? "rs-body-header-icon--success" : "",
|
|
1328
1562
|
variant === "error" ? "rs-body-header-icon--error" : ""
|
|
1329
1563
|
].filter(Boolean).join(" ");
|
|
1330
|
-
return /* @__PURE__ */
|
|
1331
|
-
/* @__PURE__ */
|
|
1332
|
-
/* @__PURE__ */
|
|
1333
|
-
/* @__PURE__ */
|
|
1334
|
-
subtitle && /* @__PURE__ */
|
|
1564
|
+
return /* @__PURE__ */ jsxs2("div", { className: "rs-body-header", children: [
|
|
1565
|
+
/* @__PURE__ */ jsx4("div", { className: iconClasses, children: icon }),
|
|
1566
|
+
/* @__PURE__ */ jsxs2("div", { className: "rs-body-header-text", children: [
|
|
1567
|
+
/* @__PURE__ */ jsx4("h2", { className: "rs-body-header-title", children: title }),
|
|
1568
|
+
subtitle && /* @__PURE__ */ jsx4("p", { className: "rs-body-header-subtitle", children: subtitle })
|
|
1335
1569
|
] })
|
|
1336
1570
|
] });
|
|
1337
1571
|
}
|
|
1338
1572
|
BodyHeader.displayName = "BodyHeader";
|
|
1339
1573
|
|
|
1340
1574
|
// src/components/ui/PoweredBy.tsx
|
|
1341
|
-
import { jsx as
|
|
1342
|
-
var rhinestoneLogo = /* @__PURE__ */
|
|
1575
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1576
|
+
var rhinestoneLogo = /* @__PURE__ */ jsxs3(
|
|
1343
1577
|
"svg",
|
|
1344
1578
|
{
|
|
1345
1579
|
className: "rs-powered-by-logo",
|
|
@@ -1348,8 +1582,8 @@ var rhinestoneLogo = /* @__PURE__ */ jsxs2(
|
|
|
1348
1582
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1349
1583
|
"aria-hidden": "true",
|
|
1350
1584
|
children: [
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */
|
|
1585
|
+
/* @__PURE__ */ jsxs3("g", { fill: "currentColor", clipPath: "url(#rs-pb-clip)", children: [
|
|
1586
|
+
/* @__PURE__ */ jsx5(
|
|
1353
1587
|
"path",
|
|
1354
1588
|
{
|
|
1355
1589
|
opacity: "0.5",
|
|
@@ -1358,8 +1592,8 @@ var rhinestoneLogo = /* @__PURE__ */ jsxs2(
|
|
|
1358
1592
|
d: "M10.48 14.82a4.3 4.3 0 0 1-2.9 1 4.3 4.3 0 0 1-2.4-1 25 25 0 0 1-2.08-1.95l-.13-.13c-.78-.78-1.46-1.46-1.94-2.08a4.3 4.3 0 0 1-1-2.9c.05-.96.48-1.72 1-2.4a25 25 0 0 1 1.94-2.08l.07-.06.06-.07a25 25 0 0 1 2.08-1.94 4.3 4.3 0 0 1 2.9-1c.96.05 1.73.48 2.4 1 .62.49 1.3 1.17 2.08 1.94l.13.13c.77.78 1.46 1.46 1.94 2.09a4.3 4.3 0 0 1 1 2.9 4.3 4.3 0 0 1-1 2.39c-.48.62-1.17 1.3-1.94 2.08l-.07.07-.06.06c-.78.78-1.46 1.46-2.08 1.94m-8.9-6.63c.07 1.02.9 1.86 2.56 3.52s2.5 2.5 3.53 2.56h.32c1.03-.06 1.86-.9 3.53-2.56s2.5-2.5 2.56-3.52v-.33c-.07-1.03-.9-1.86-2.56-3.52-1.67-1.67-2.5-2.5-3.53-2.56h-.32c-1.03.06-1.86.89-3.53 2.56-1.66 1.66-2.5 2.5-2.56 3.52z"
|
|
1359
1593
|
}
|
|
1360
1594
|
),
|
|
1361
|
-
/* @__PURE__ */
|
|
1362
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ jsx5("path", { d: "M3.66 8.01q.02-.27.28-.35a4.6 4.6 0 0 0 2.53-1.48q.72-.8 1-2.05a.4.4 0 0 1 .36-.29c.17 0 .32.12.36.29a4.6 4.6 0 0 0 1.47 2.52c.55.49 1.21.8 2.06 1a.4.4 0 0 1 .28.36.4.4 0 0 1-.28.36 4.6 4.6 0 0 0-2.53 1.47 4.6 4.6 0 0 0-1 2.06.4.4 0 0 1-.36.28.4.4 0 0 1-.36-.28A4.6 4.6 0 0 0 6 9.38a4.6 4.6 0 0 0-2.06-1.01.4.4 0 0 1-.28-.36m26.46-3.44c0 .51.38.87.96.87s.95-.36.95-.87c0-.52-.37-.86-.95-.86s-.96.34-.96.86m.2 1.44v5.33h1.53V6.01zm-4.4 5.33h-1.55V3.88h1.54v2.98c.25-.5.8-1.01 1.6-1.01 1.29 0 1.87.83 1.87 2.28v3.21h-1.54V8.3c0-.77-.34-1.16-.92-1.16-.67 0-1 .53-1 1.3zm-4.45 0h-1.54V6.01h1.54l-.27 1.22a.1.1 0 0 0 .02.1.1.1 0 0 0 .1.04q.09 0 .1-.09c.24-.84.93-1.36 1.64-1.36q.4.01.57.05v1.42l-.67-.04c-.67 0-1.5.31-1.5 2zm13 0h-1.55V6.01h1.54l-.02.9a1.8 1.8 0 0 1 1.61-1.06c1.3 0 1.88.83 1.88 2.28v3.21H36.4V8.3c0-.77-.35-1.16-.93-1.16-.67 0-1 .53-1 1.3z" }),
|
|
1596
|
+
/* @__PURE__ */ jsx5(
|
|
1363
1597
|
"path",
|
|
1364
1598
|
{
|
|
1365
1599
|
fillRule: "evenodd",
|
|
@@ -1367,8 +1601,8 @@ var rhinestoneLogo = /* @__PURE__ */ jsxs2(
|
|
|
1367
1601
|
d: "M38.74 8.69c0 1.63 1.01 2.82 2.7 2.82 1.51 0 2.32-.82 2.55-1.73l-1.43-.26c-.1.37-.47.82-1.12.82-.67 0-1.23-.6-1.24-1.31H44q.05-.19.06-.56a2.55 2.55 0 0 0-2.6-2.63c-1.5 0-2.72 1.2-2.72 2.85m3.82-.58h-2.3a1.2 1.2 0 0 1 1.18-1.13c.6 0 1.14.45 1.12 1.13"
|
|
1368
1602
|
}
|
|
1369
1603
|
),
|
|
1370
|
-
/* @__PURE__ */
|
|
1371
|
-
/* @__PURE__ */
|
|
1604
|
+
/* @__PURE__ */ jsx5("path", { d: "M47.1 11.51c-1.2 0-2.33-.41-2.55-1.65l1.43-.21q.27.8 1.1.79c.5 0 .77-.24.77-.55 0-.27-.2-.45-.75-.55l-.5-.1c-1.1-.24-1.77-.74-1.77-1.63 0-1.06.91-1.78 2.25-1.78 1.26 0 2.2.59 2.32 1.68l-1.41.22c-.07-.52-.43-.82-.91-.82-.5 0-.75.26-.75.57 0 .25.17.42.63.51l.5.1c1.28.26 1.94.77 1.94 1.75 0 1.01-1.03 1.66-2.3 1.66" }),
|
|
1605
|
+
/* @__PURE__ */ jsx5(
|
|
1372
1606
|
"path",
|
|
1373
1607
|
{
|
|
1374
1608
|
fillRule: "evenodd",
|
|
@@ -1376,8 +1610,8 @@ var rhinestoneLogo = /* @__PURE__ */ jsxs2(
|
|
|
1376
1610
|
d: "M54.44 8.68c0 1.53 1.08 2.83 2.78 2.83s2.79-1.3 2.79-2.83c0-1.55-1.1-2.84-2.79-2.84-1.7 0-2.78 1.29-2.78 2.84m4.02 0c0 .98-.59 1.45-1.24 1.45-.64 0-1.23-.47-1.23-1.45 0-.97.59-1.47 1.23-1.47.65 0 1.24.48 1.24 1.47"
|
|
1377
1611
|
}
|
|
1378
1612
|
),
|
|
1379
|
-
/* @__PURE__ */
|
|
1380
|
-
/* @__PURE__ */
|
|
1613
|
+
/* @__PURE__ */ jsx5("path", { d: "M62.4 11.34h-1.53V6.01h1.54l-.02.9a1.8 1.8 0 0 1 1.6-1.06c1.3 0 1.89.83 1.89 2.28v3.21h-1.54V8.3c0-.77-.34-1.16-.93-1.16-.66 0-1 .53-1 1.3z" }),
|
|
1614
|
+
/* @__PURE__ */ jsx5(
|
|
1381
1615
|
"path",
|
|
1382
1616
|
{
|
|
1383
1617
|
fillRule: "evenodd",
|
|
@@ -1385,16 +1619,16 @@ var rhinestoneLogo = /* @__PURE__ */ jsxs2(
|
|
|
1385
1619
|
d: "M66.68 8.69c0 1.63 1.02 2.82 2.71 2.82 1.51 0 2.31-.82 2.55-1.73l-1.44-.26c-.1.37-.47.82-1.12.82-.67 0-1.23-.6-1.24-1.31h3.8q.06-.19.06-.56a2.55 2.55 0 0 0-2.6-2.63c-1.5 0-2.72 1.2-2.72 2.85m3.82-.58h-2.3a1.2 1.2 0 0 1 1.18-1.13c.6 0 1.15.45 1.12 1.13"
|
|
1386
1620
|
}
|
|
1387
1621
|
),
|
|
1388
|
-
/* @__PURE__ */
|
|
1622
|
+
/* @__PURE__ */ jsx5("path", { d: "M52.44 9.05V7.26h1.53V6h-1.53V4.42h-1.53V6h-1.1v1.26h1.1v1.85l.02.49a1.9 1.9 0 0 0 1.67 1.67c.22.03.47.03.62.03h.65V9.87h-.61c-.4 0-.59 0-.7-.12-.12-.11-.12-.3-.12-.64z" })
|
|
1389
1623
|
] }),
|
|
1390
|
-
/* @__PURE__ */
|
|
1624
|
+
/* @__PURE__ */ jsx5("defs", { children: /* @__PURE__ */ jsx5("clipPath", { id: "rs-pb-clip", children: /* @__PURE__ */ jsx5("path", { fill: "#fff", d: "M0 0h72v16H0z" }) }) })
|
|
1391
1625
|
]
|
|
1392
1626
|
}
|
|
1393
1627
|
);
|
|
1394
1628
|
function PoweredBy() {
|
|
1395
|
-
return /* @__PURE__ */
|
|
1396
|
-
/* @__PURE__ */
|
|
1397
|
-
/* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rs-powered-by", "aria-label": "Powered by Rhinestone", children: [
|
|
1630
|
+
/* @__PURE__ */ jsx5("span", { children: "Powered by" }),
|
|
1631
|
+
/* @__PURE__ */ jsx5(
|
|
1398
1632
|
"a",
|
|
1399
1633
|
{
|
|
1400
1634
|
className: "rs-powered-by-link",
|
|
@@ -1409,27 +1643,27 @@ function PoweredBy() {
|
|
|
1409
1643
|
PoweredBy.displayName = "PoweredBy";
|
|
1410
1644
|
|
|
1411
1645
|
// src/components/ui/Spinner.tsx
|
|
1412
|
-
import { jsx as
|
|
1646
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1413
1647
|
function Spinner({ className }) {
|
|
1414
|
-
return /* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ jsxs4(
|
|
1415
1649
|
"svg",
|
|
1416
1650
|
{
|
|
1417
1651
|
className: `rs-spinner ${className || ""}`,
|
|
1418
1652
|
fill: "none",
|
|
1419
1653
|
viewBox: "0 0 20 21",
|
|
1420
1654
|
children: [
|
|
1421
|
-
/* @__PURE__ */
|
|
1655
|
+
/* @__PURE__ */ jsx6(
|
|
1422
1656
|
"path",
|
|
1423
1657
|
{
|
|
1424
|
-
d: "M10 0.5C8.
|
|
1658
|
+
d: "M10 0.5C8.02 0.5 6.08 1.08 4.44 2.18C2.79 3.28 1.51 4.84 0.76 6.67C0.00 8.50 -0.19 10.51 0.19 12.45C0.57 14.39 1.53 16.17 2.92 17.57C4.32 18.96 6.10 19.92 8.04 20.30C9.98 20.69 11.99 20.49 13.82 19.73C15.65 18.98 17.21 17.70 18.31 16.05C19.41 14.41 20 12.47 20 10.5C20 7.84 18.94 5.30 17.07 3.42C15.19 1.55 12.65 0.5 10 0.5ZM10 17.77C8.56 17.77 7.15 17.34 5.95 16.54C4.76 15.74 3.83 14.61 3.28 13.28C2.73 11.95 2.58 10.49 2.86 9.08C3.14 7.67 3.84 6.37 4.85 5.35C5.87 4.34 7.17 3.64 8.58 3.36C9.99 3.08 11.45 3.23 12.78 3.78C14.11 4.33 15.24 5.26 16.04 6.45C16.84 7.65 17.27 9.06 17.27 10.5C17.27 12.42 16.50 14.27 15.14 15.64C13.77 17.00 11.92 17.77 10 17.77Z",
|
|
1425
1659
|
fill: "currentColor",
|
|
1426
1660
|
opacity: 0.3
|
|
1427
1661
|
}
|
|
1428
1662
|
),
|
|
1429
|
-
/* @__PURE__ */
|
|
1663
|
+
/* @__PURE__ */ jsx6(
|
|
1430
1664
|
"path",
|
|
1431
1665
|
{
|
|
1432
|
-
d: "M10 3.
|
|
1666
|
+
d: "M10 3.22C11.74 3.22 13.42 3.84 14.75 4.95C16.08 6.07 16.96 7.61 17.25 9.31C17.30 9.64 17.46 9.94 17.71 10.15C17.96 10.37 18.28 10.49 18.62 10.5C18.82 10.50 19.01 10.45 19.20 10.37C19.38 10.29 19.54 10.16 19.67 10.01C19.80 9.86 19.89 9.68 19.95 9.49C20.00 9.30 20.01 9.10 19.98 8.90C19.59 6.56 18.38 4.42 16.55 2.88C14.72 1.34 12.40 0.5 10 0.5C7.59 0.5 5.27 1.34 3.44 2.88C1.61 4.42 0.40 6.56 0.01 8.90C-0.01 9.10 -0.00 9.30 0.04 9.49C0.10 9.68 0.19 9.86 0.32 10.01C0.45 10.16 0.61 10.29 0.79 10.37C0.98 10.45 1.17 10.50 1.37 10.5C1.71 10.49 2.03 10.37 2.28 10.15C2.53 9.94 2.69 9.64 2.74 9.31C3.03 7.61 3.91 6.07 5.24 4.95C6.57 3.84 8.25 3.22 10 3.22Z",
|
|
1433
1667
|
fill: "currentColor"
|
|
1434
1668
|
}
|
|
1435
1669
|
)
|
|
@@ -1439,7 +1673,7 @@ function Spinner({ className }) {
|
|
|
1439
1673
|
}
|
|
1440
1674
|
|
|
1441
1675
|
// src/components/ui/ListRow.tsx
|
|
1442
|
-
import { Fragment, jsx as
|
|
1676
|
+
import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1443
1677
|
function ListRow({
|
|
1444
1678
|
leading,
|
|
1445
1679
|
leadingMedia,
|
|
@@ -1453,14 +1687,14 @@ function ListRow({
|
|
|
1453
1687
|
disabled,
|
|
1454
1688
|
...props
|
|
1455
1689
|
}) {
|
|
1456
|
-
const inner = /* @__PURE__ */
|
|
1457
|
-
leadingMedia ? /* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1459
|
-
/* @__PURE__ */
|
|
1460
|
-
/* @__PURE__ */
|
|
1461
|
-
subtitle && /* @__PURE__ */
|
|
1690
|
+
const inner = /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
1691
|
+
leadingMedia ? /* @__PURE__ */ jsx7("span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ jsx7("img", { src: leadingMedia, alt: "" }) }) : leading ? /* @__PURE__ */ jsx7("span", { className: "rs-list-row-leading", children: leading }) : null,
|
|
1692
|
+
/* @__PURE__ */ jsxs5("div", { className: "rs-list-row-body", children: [
|
|
1693
|
+
/* @__PURE__ */ jsxs5("div", { className: "rs-list-row-text", children: [
|
|
1694
|
+
/* @__PURE__ */ jsx7("span", { className: "rs-list-row-title", children: title }),
|
|
1695
|
+
subtitle && /* @__PURE__ */ jsx7("span", { className: "rs-list-row-subtitle", children: subtitle })
|
|
1462
1696
|
] }),
|
|
1463
|
-
action ? /* @__PURE__ */
|
|
1697
|
+
action ? /* @__PURE__ */ jsx7(
|
|
1464
1698
|
"button",
|
|
1465
1699
|
{
|
|
1466
1700
|
type: "button",
|
|
@@ -1472,9 +1706,9 @@ function ListRow({
|
|
|
1472
1706
|
},
|
|
1473
1707
|
children: action.label
|
|
1474
1708
|
}
|
|
1475
|
-
) : meta && /* @__PURE__ */
|
|
1709
|
+
) : meta && /* @__PURE__ */ jsx7("div", { className: "rs-list-row-meta", children: meta })
|
|
1476
1710
|
] }),
|
|
1477
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsx7("span", { className: "rs-list-row-chevron", children: trailing ?? /* @__PURE__ */ jsx7(ChevronRightIcon, {}) })
|
|
1478
1712
|
] });
|
|
1479
1713
|
if (action) {
|
|
1480
1714
|
const handleKey = (e) => {
|
|
@@ -1484,7 +1718,7 @@ function ListRow({
|
|
|
1484
1718
|
onClick?.(e);
|
|
1485
1719
|
}
|
|
1486
1720
|
};
|
|
1487
|
-
return /* @__PURE__ */
|
|
1721
|
+
return /* @__PURE__ */ jsx7(
|
|
1488
1722
|
"div",
|
|
1489
1723
|
{
|
|
1490
1724
|
className: `rs-list-row ${className}`.trim(),
|
|
@@ -1497,7 +1731,7 @@ function ListRow({
|
|
|
1497
1731
|
}
|
|
1498
1732
|
);
|
|
1499
1733
|
}
|
|
1500
|
-
return /* @__PURE__ */
|
|
1734
|
+
return /* @__PURE__ */ jsx7(
|
|
1501
1735
|
"button",
|
|
1502
1736
|
{
|
|
1503
1737
|
type: "button",
|
|
@@ -1511,246 +1745,339 @@ function ListRow({
|
|
|
1511
1745
|
}
|
|
1512
1746
|
ListRow.displayName = "ListRow";
|
|
1513
1747
|
|
|
1514
|
-
// src/components/ui/WalletBadgeIcons.tsx
|
|
1515
|
-
import { jsx as
|
|
1516
|
-
|
|
1517
|
-
/* @__PURE__ */
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1748
|
+
// src/components/ui/WalletBadgeIcons/RabbyIcon.tsx
|
|
1749
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1750
|
+
function RabbyIcon() {
|
|
1751
|
+
return /* @__PURE__ */ jsxs6(
|
|
1752
|
+
"svg",
|
|
1753
|
+
{
|
|
1754
|
+
width: "20",
|
|
1755
|
+
height: "20",
|
|
1756
|
+
viewBox: "0 0 20 20",
|
|
1757
|
+
fill: "none",
|
|
1758
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1759
|
+
children: [
|
|
1760
|
+
/* @__PURE__ */ jsxs6("g", { clipPath: "url(#rs-rabby-clip)", children: [
|
|
1761
|
+
/* @__PURE__ */ jsx8(
|
|
1762
|
+
"mask",
|
|
1763
|
+
{
|
|
1764
|
+
id: "rs-rabby-mask",
|
|
1765
|
+
style: { maskType: "luminance" },
|
|
1766
|
+
maskUnits: "userSpaceOnUse",
|
|
1767
|
+
x: "0",
|
|
1768
|
+
y: "0",
|
|
1769
|
+
width: "20",
|
|
1770
|
+
height: "20",
|
|
1771
|
+
children: /* @__PURE__ */ jsx8(
|
|
1772
|
+
"path",
|
|
1773
|
+
{
|
|
1774
|
+
d: "M20 10C20 4.47 15.52 0 10 0C4.47 0 0 4.47 0 10C0 15.52 4.47 20 10 20C15.52 20 20 15.52 20 10Z",
|
|
1775
|
+
fill: "white"
|
|
1776
|
+
}
|
|
1777
|
+
)
|
|
1778
|
+
}
|
|
1779
|
+
),
|
|
1780
|
+
/* @__PURE__ */ jsxs6("g", { mask: "url(#rs-rabby-mask)", children: [
|
|
1781
|
+
/* @__PURE__ */ jsx8(
|
|
1782
|
+
"path",
|
|
1783
|
+
{
|
|
1784
|
+
d: "M20 10C20 4.47 15.52 0 10 0C4.47 0 0 4.47 0 10C0 15.52 4.47 20 10 20C15.52 20 20 15.52 20 10Z",
|
|
1785
|
+
fill: "#7084FF"
|
|
1786
|
+
}
|
|
1787
|
+
),
|
|
1788
|
+
/* @__PURE__ */ jsx8(
|
|
1789
|
+
"path",
|
|
1790
|
+
{
|
|
1791
|
+
d: "M17.25 10.86C17.82 9.57 14.98 5.97 12.26 4.47C10.55 3.31 8.77 3.47 8.41 3.98C7.62 5.10 11.03 6.05 13.32 7.16C12.83 7.37 12.36 7.76 12.09 8.25C11.24 7.31 9.37 6.51 7.18 7.16C5.70 7.59 4.47 8.62 3.99 10.18C3.85 10.11 3.70 10.09 3.54 10.10C3.39 10.11 3.24 10.16 3.11 10.25C2.98 10.33 2.87 10.45 2.80 10.58C2.72 10.72 2.69 10.87 2.69 11.03C2.69 11.55 3.10 11.96 3.62 11.96C3.71 11.96 4.01 11.90 4.01 11.90L8.77 11.93C6.87 14.96 5.36 15.41 5.36 15.93C5.36 16.46 6.80 16.32 7.34 16.12C9.93 15.18 12.71 12.26 13.19 11.42C15.19 11.67 16.87 11.70 17.25 10.86Z",
|
|
1792
|
+
fill: "url(#rs-rabby-grad0)"
|
|
1793
|
+
}
|
|
1794
|
+
),
|
|
1795
|
+
/* @__PURE__ */ jsx8(
|
|
1796
|
+
"path",
|
|
1797
|
+
{
|
|
1798
|
+
fillRule: "evenodd",
|
|
1799
|
+
clipRule: "evenodd",
|
|
1800
|
+
d: "M13.31 7.15L13.32 7.16C13.42 7.11 13.41 6.96 13.38 6.83C13.31 6.55 12.16 5.41 11.07 4.90C9.60 4.20 8.51 4.23 8.35 4.56C8.65 5.18 10.04 5.76 11.50 6.36C12.12 6.62 12.75 6.88 13.31 7.15Z",
|
|
1801
|
+
fill: "url(#rs-rabby-grad1)"
|
|
1802
|
+
}
|
|
1803
|
+
),
|
|
1804
|
+
/* @__PURE__ */ jsx8(
|
|
1805
|
+
"path",
|
|
1806
|
+
{
|
|
1807
|
+
fillRule: "evenodd",
|
|
1808
|
+
clipRule: "evenodd",
|
|
1809
|
+
d: "M11.45 13.38C11.11 13.26 10.77 13.15 10.43 13.07C10.84 12.33 10.92 11.25 10.54 10.56C10.00 9.60 9.32 9.08 7.73 9.08C6.87 9.08 4.53 9.38 4.48 11.34C4.48 11.54 4.48 11.73 4.50 11.90L8.77 11.93C8.20 12.85 7.66 13.53 7.18 14.05C7.75 14.19 8.22 14.32 8.65 14.43C9.06 14.54 9.43 14.63 9.82 14.73C10.41 14.30 10.96 13.83 11.45 13.38Z",
|
|
1810
|
+
fill: "url(#rs-rabby-grad2)"
|
|
1811
|
+
}
|
|
1812
|
+
),
|
|
1813
|
+
/* @__PURE__ */ jsx8(
|
|
1814
|
+
"path",
|
|
1815
|
+
{
|
|
1816
|
+
d: "M3.94 11.70C4.11 13.19 4.96 13.77 6.68 13.94C8.40 14.12 9.39 14.00 10.71 14.12C11.81 14.22 12.79 14.78 13.15 14.59C13.48 14.42 13.30 13.78 12.86 13.38C12.29 12.85 11.50 12.49 10.12 12.36C10.39 11.60 10.32 10.54 9.89 9.96C9.27 9.12 8.13 8.75 6.68 8.91C5.17 9.08 3.72 9.83 3.94 11.70Z",
|
|
1817
|
+
fill: "url(#rs-rabby-grad3)"
|
|
1818
|
+
}
|
|
1819
|
+
)
|
|
1820
|
+
] })
|
|
1821
|
+
] }),
|
|
1822
|
+
/* @__PURE__ */ jsxs6("defs", { children: [
|
|
1823
|
+
/* @__PURE__ */ jsxs6(
|
|
1824
|
+
"linearGradient",
|
|
1825
|
+
{
|
|
1826
|
+
id: "rs-rabby-grad0",
|
|
1827
|
+
x1: "7.00",
|
|
1828
|
+
y1: "9.72",
|
|
1829
|
+
x2: "17.13",
|
|
1830
|
+
y2: "12.58",
|
|
1831
|
+
gradientUnits: "userSpaceOnUse",
|
|
1832
|
+
children: [
|
|
1833
|
+
/* @__PURE__ */ jsx8("stop", { stopColor: "white" }),
|
|
1834
|
+
/* @__PURE__ */ jsx8("stop", { offset: "1", stopColor: "white" })
|
|
1835
|
+
]
|
|
1836
|
+
}
|
|
1837
|
+
),
|
|
1838
|
+
/* @__PURE__ */ jsxs6(
|
|
1839
|
+
"linearGradient",
|
|
1840
|
+
{
|
|
1841
|
+
id: "rs-rabby-grad1",
|
|
1842
|
+
x1: "15.42",
|
|
1843
|
+
y1: "9.53",
|
|
1844
|
+
x2: "8.09",
|
|
1845
|
+
y2: "2.21",
|
|
1846
|
+
gradientUnits: "userSpaceOnUse",
|
|
1847
|
+
children: [
|
|
1848
|
+
/* @__PURE__ */ jsx8("stop", { stopColor: "#8697FF" }),
|
|
1849
|
+
/* @__PURE__ */ jsx8("stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
1850
|
+
]
|
|
1851
|
+
}
|
|
1852
|
+
),
|
|
1853
|
+
/* @__PURE__ */ jsxs6(
|
|
1854
|
+
"linearGradient",
|
|
1855
|
+
{
|
|
1856
|
+
id: "rs-rabby-grad2",
|
|
1857
|
+
x1: "11.65",
|
|
1858
|
+
y1: "13.64",
|
|
1859
|
+
x2: "4.63",
|
|
1860
|
+
y2: "9.61",
|
|
1861
|
+
gradientUnits: "userSpaceOnUse",
|
|
1862
|
+
children: [
|
|
1863
|
+
/* @__PURE__ */ jsx8("stop", { stopColor: "#8697FF" }),
|
|
1864
|
+
/* @__PURE__ */ jsx8("stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
1865
|
+
]
|
|
1866
|
+
}
|
|
1867
|
+
),
|
|
1868
|
+
/* @__PURE__ */ jsxs6(
|
|
1869
|
+
"linearGradient",
|
|
1870
|
+
{
|
|
1871
|
+
id: "rs-rabby-grad3",
|
|
1872
|
+
x1: "7.61",
|
|
1873
|
+
y1: "9.64",
|
|
1874
|
+
x2: "12.37",
|
|
1875
|
+
y2: "15.67",
|
|
1876
|
+
gradientUnits: "userSpaceOnUse",
|
|
1877
|
+
children: [
|
|
1878
|
+
/* @__PURE__ */ jsx8("stop", { stopColor: "white" }),
|
|
1879
|
+
/* @__PURE__ */ jsx8("stop", { offset: "0.98", stopColor: "#D1D8FF" })
|
|
1880
|
+
]
|
|
1881
|
+
}
|
|
1882
|
+
),
|
|
1883
|
+
/* @__PURE__ */ jsx8("clipPath", { id: "rs-rabby-clip", children: /* @__PURE__ */ jsx8("rect", { width: "20", height: "20", fill: "white" }) })
|
|
1884
|
+
] })
|
|
1885
|
+
]
|
|
1886
|
+
}
|
|
1887
|
+
);
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
// src/components/ui/WalletBadgeIcons/PhantomIcon.tsx
|
|
1891
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1892
|
+
function PhantomIcon() {
|
|
1893
|
+
return /* @__PURE__ */ jsxs7(
|
|
1894
|
+
"svg",
|
|
1895
|
+
{
|
|
1896
|
+
width: "20",
|
|
1897
|
+
height: "20",
|
|
1898
|
+
viewBox: "0 0 20 20",
|
|
1899
|
+
fill: "none",
|
|
1900
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1901
|
+
children: [
|
|
1902
|
+
/* @__PURE__ */ jsx9(
|
|
1529
1903
|
"path",
|
|
1530
1904
|
{
|
|
1531
|
-
d: "
|
|
1532
|
-
fill: "
|
|
1905
|
+
d: "M15.18 0H4.81C2.15 0 0 2.15 0 4.81V15.18C0 17.84 2.15 20 4.81 20H15.18C17.84 20 20 17.84 20 15.18V4.81C20 2.15 17.84 0 15.18 0Z",
|
|
1906
|
+
fill: "#AB9FF2"
|
|
1907
|
+
}
|
|
1908
|
+
),
|
|
1909
|
+
/* @__PURE__ */ jsx9(
|
|
1910
|
+
"path",
|
|
1911
|
+
{
|
|
1912
|
+
fillRule: "evenodd",
|
|
1913
|
+
clipRule: "evenodd",
|
|
1914
|
+
d: "M8.61 12.94C7.77 14.23 6.37 15.85 4.50 15.85C3.62 15.85 2.77 15.49 2.77 13.91C2.77 9.89 8.26 3.67 13.35 3.67C16.25 3.67 17.40 5.68 17.40 7.96C17.40 10.89 15.50 14.24 13.61 14.24C13.01 14.24 12.72 13.91 12.72 13.39C12.72 13.25 12.74 13.10 12.79 12.94C12.14 14.04 10.90 15.07 9.73 15.07C8.88 15.07 8.45 14.53 8.45 13.78C8.45 13.51 8.51 13.23 8.61 12.94ZM15.49 7.88C15.49 8.54 15.10 8.88 14.66 8.88C14.21 8.88 13.83 8.54 13.83 7.88C13.83 7.21 14.21 6.88 14.66 6.88C15.10 6.88 15.49 7.22 15.49 7.88ZM13.00 7.88C13.00 8.54 12.60 8.88 12.17 8.88C11.72 8.88 11.33 8.54 11.33 7.88C11.33 7.22 11.72 6.88 12.17 6.88C12.60 6.88 13.00 7.22 13.00 7.88",
|
|
1915
|
+
fill: "#FFFDF8"
|
|
1533
1916
|
}
|
|
1534
1917
|
)
|
|
1535
|
-
|
|
1536
|
-
),
|
|
1537
|
-
/* @__PURE__ */ jsxs5("g", { mask: "url(#rs-rabby-mask)", children: [
|
|
1538
|
-
/* @__PURE__ */ jsx7(
|
|
1539
|
-
"path",
|
|
1540
|
-
{
|
|
1541
|
-
d: "M20 10C20 4.47688 15.5231 0 10 0C4.47688 0 0 4.47688 0 10C0 15.5231 4.47688 20 10 20C15.5231 20 20 15.5231 20 10Z",
|
|
1542
|
-
fill: "#7084FF"
|
|
1543
|
-
}
|
|
1544
|
-
),
|
|
1545
|
-
/* @__PURE__ */ jsx7(
|
|
1546
|
-
"path",
|
|
1547
|
-
{
|
|
1548
|
-
d: "M17.2515 10.8675C17.8265 9.57871 14.9847 5.97871 12.2697 4.47934C10.5584 3.31684 8.77529 3.47684 8.41404 3.98684C7.62154 5.10684 11.039 6.05559 13.3234 7.16184C12.8322 7.37621 12.3697 7.76059 12.0972 8.25184C11.2453 7.31871 9.37529 6.51434 7.18154 7.16246C5.70279 7.59871 4.47404 8.62684 3.99904 10.18C3.85708 10.1175 3.70178 10.0914 3.5472 10.1041C3.39262 10.1168 3.24365 10.1678 3.11376 10.2526C2.98388 10.3373 2.87719 10.4532 2.80336 10.5896C2.72952 10.726 2.69088 10.8786 2.69092 11.0337C2.69092 11.55 3.10717 11.9681 3.62154 11.9681C3.71654 11.9681 4.01467 11.9037 4.01467 11.9037L8.77529 11.9387C6.87154 14.9687 5.36654 15.4118 5.36654 15.9368C5.36654 16.4618 6.80654 16.32 7.34717 16.1243C9.93467 15.1868 12.714 12.2675 13.1909 11.4268C15.1934 11.6775 16.8765 11.7075 17.2515 10.8675Z",
|
|
1549
|
-
fill: "url(#rs-rabby-grad0)"
|
|
1550
|
-
}
|
|
1551
|
-
),
|
|
1552
|
-
/* @__PURE__ */ jsx7(
|
|
1553
|
-
"path",
|
|
1554
|
-
{
|
|
1555
|
-
fillRule: "evenodd",
|
|
1556
|
-
clipRule: "evenodd",
|
|
1557
|
-
d: "M13.3147 7.15865L13.3216 7.16177C13.4279 7.1199 13.4104 6.96302 13.3816 6.8399C13.3147 6.55615 12.161 5.41365 11.0779 4.90177C9.60224 4.20427 8.51536 4.2399 8.35474 4.56177C8.65474 5.18052 10.0485 5.76052 11.5047 6.3674C12.1235 6.6249 12.7529 6.88677 13.3147 7.15865Z",
|
|
1558
|
-
fill: "url(#rs-rabby-grad1)"
|
|
1559
|
-
}
|
|
1560
|
-
),
|
|
1561
|
-
/* @__PURE__ */ jsx7(
|
|
1562
|
-
"path",
|
|
1563
|
-
{
|
|
1564
|
-
fillRule: "evenodd",
|
|
1565
|
-
clipRule: "evenodd",
|
|
1566
|
-
d: "M11.4522 13.3856C11.1193 13.26 10.7791 13.1548 10.4335 13.0706C10.8422 12.3369 10.9278 11.2506 10.5416 10.5644C10.0003 9.60001 9.32033 9.08688 7.73971 9.08688C6.87096 9.08688 4.53096 9.38063 4.48971 11.3406C4.48471 11.5456 4.4895 11.7346 4.50408 11.9075L8.77721 11.9388C8.20096 12.8556 7.66158 13.5363 7.18908 14.0531C7.75596 14.1994 8.22408 14.3219 8.65408 14.4344C9.06158 14.5406 9.43471 14.6381 9.82471 14.7381C10.4141 14.3069 10.9685 13.8381 11.4522 13.3856Z",
|
|
1567
|
-
fill: "url(#rs-rabby-grad2)"
|
|
1568
|
-
}
|
|
1569
|
-
),
|
|
1570
|
-
/* @__PURE__ */ jsx7(
|
|
1571
|
-
"path",
|
|
1572
|
-
{
|
|
1573
|
-
d: "M3.94351 11.7048C4.11789 13.1936 4.96101 13.7773 6.68476 13.9498C8.40851 14.1223 9.39664 14.0067 10.7123 14.1273C11.8116 14.2273 12.7929 14.7898 13.1573 14.5954C13.4848 14.4204 13.301 13.7892 12.8629 13.3836C12.2941 12.8586 11.5079 12.4936 10.1241 12.3642C10.3998 11.6061 10.3223 10.5436 9.89414 9.96543C9.27476 9.1298 8.13164 8.7523 6.68476 8.9173C5.17226 9.0898 3.72414 9.83605 3.94351 11.7048Z",
|
|
1574
|
-
fill: "url(#rs-rabby-grad3)"
|
|
1575
|
-
}
|
|
1576
|
-
)
|
|
1577
|
-
] })
|
|
1578
|
-
] }),
|
|
1579
|
-
/* @__PURE__ */ jsxs5("defs", { children: [
|
|
1580
|
-
/* @__PURE__ */ jsxs5(
|
|
1581
|
-
"linearGradient",
|
|
1582
|
-
{
|
|
1583
|
-
id: "rs-rabby-grad0",
|
|
1584
|
-
x1: "7.00904",
|
|
1585
|
-
y1: "9.72621",
|
|
1586
|
-
x2: "17.1328",
|
|
1587
|
-
y2: "12.5875",
|
|
1588
|
-
gradientUnits: "userSpaceOnUse",
|
|
1589
|
-
children: [
|
|
1590
|
-
/* @__PURE__ */ jsx7("stop", { stopColor: "white" }),
|
|
1591
|
-
/* @__PURE__ */ jsx7("stop", { offset: "1", stopColor: "white" })
|
|
1592
|
-
]
|
|
1593
|
-
}
|
|
1594
|
-
),
|
|
1595
|
-
/* @__PURE__ */ jsxs5(
|
|
1596
|
-
"linearGradient",
|
|
1597
|
-
{
|
|
1598
|
-
id: "rs-rabby-grad1",
|
|
1599
|
-
x1: "15.4216",
|
|
1600
|
-
y1: "9.5324",
|
|
1601
|
-
x2: "8.09661",
|
|
1602
|
-
y2: "2.21365",
|
|
1603
|
-
gradientUnits: "userSpaceOnUse",
|
|
1604
|
-
children: [
|
|
1605
|
-
/* @__PURE__ */ jsx7("stop", { stopColor: "#8697FF" }),
|
|
1606
|
-
/* @__PURE__ */ jsx7("stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
1607
|
-
]
|
|
1608
|
-
}
|
|
1609
|
-
),
|
|
1610
|
-
/* @__PURE__ */ jsxs5(
|
|
1611
|
-
"linearGradient",
|
|
1612
|
-
{
|
|
1613
|
-
id: "rs-rabby-grad2",
|
|
1614
|
-
x1: "11.6553",
|
|
1615
|
-
y1: "13.6413",
|
|
1616
|
-
x2: "4.63033",
|
|
1617
|
-
y2: "9.61626",
|
|
1618
|
-
gradientUnits: "userSpaceOnUse",
|
|
1619
|
-
children: [
|
|
1620
|
-
/* @__PURE__ */ jsx7("stop", { stopColor: "#8697FF" }),
|
|
1621
|
-
/* @__PURE__ */ jsx7("stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
|
|
1622
|
-
]
|
|
1623
|
-
}
|
|
1624
|
-
),
|
|
1625
|
-
/* @__PURE__ */ jsxs5(
|
|
1626
|
-
"linearGradient",
|
|
1627
|
-
{
|
|
1628
|
-
id: "rs-rabby-grad3",
|
|
1629
|
-
x1: "7.61476",
|
|
1630
|
-
y1: "9.64918",
|
|
1631
|
-
x2: "12.3748",
|
|
1632
|
-
y2: "15.6773",
|
|
1633
|
-
gradientUnits: "userSpaceOnUse",
|
|
1634
|
-
children: [
|
|
1635
|
-
/* @__PURE__ */ jsx7("stop", { stopColor: "white" }),
|
|
1636
|
-
/* @__PURE__ */ jsx7("stop", { offset: "0.984", stopColor: "#D1D8FF" })
|
|
1637
|
-
]
|
|
1638
|
-
}
|
|
1639
|
-
),
|
|
1640
|
-
/* @__PURE__ */ jsx7("clipPath", { id: "rs-rabby-clip", children: /* @__PURE__ */ jsx7("rect", { width: "20", height: "20", fill: "white" }) })
|
|
1641
|
-
] })
|
|
1642
|
-
] });
|
|
1643
|
-
var PhantomIcon = () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1644
|
-
/* @__PURE__ */ jsx7(
|
|
1645
|
-
"path",
|
|
1646
|
-
{
|
|
1647
|
-
d: "M15.1852 0H4.81481C2.15567 0 0 2.15567 0 4.81481V15.1852C0 17.8443 2.15567 20 4.81481 20H15.1852C17.8443 20 20 17.8443 20 15.1852V4.81481C20 2.15567 17.8443 0 15.1852 0Z",
|
|
1648
|
-
fill: "#AB9FF2"
|
|
1649
|
-
}
|
|
1650
|
-
),
|
|
1651
|
-
/* @__PURE__ */ jsx7(
|
|
1652
|
-
"path",
|
|
1653
|
-
{
|
|
1654
|
-
fillRule: "evenodd",
|
|
1655
|
-
clipRule: "evenodd",
|
|
1656
|
-
d: "M8.61617 12.9486C7.77876 14.2315 6.37579 15.855 4.50894 15.855C3.62635 15.855 2.77783 15.4917 2.77783 13.9136C2.77783 9.89449 8.26542 3.67264 13.3569 3.67264C16.2534 3.67264 17.4075 5.68227 17.4075 7.9643C17.4075 10.8936 15.5067 14.2428 13.6171 14.2428C13.0175 14.2428 12.7232 13.9136 12.7232 13.3913C12.7232 13.255 12.7459 13.1075 12.7912 12.9486C12.1462 14.0499 10.9015 15.0717 9.73617 15.0717C8.88765 15.0717 8.45765 14.538 8.45765 13.7887C8.45765 13.5162 8.51431 13.2325 8.61617 12.9486ZM15.4958 7.88486C15.4958 8.54986 15.1032 8.88245 14.6643 8.88245C14.2189 8.88245 13.8332 8.54986 13.8332 7.88486C13.8332 7.21986 14.2189 6.88745 14.6645 6.88745C15.1034 6.88745 15.4958 7.22004 15.4958 7.88486ZM13.0017 7.88486C13.0017 8.54986 12.6095 8.88245 12.1706 8.88245C11.7251 8.88245 11.3393 8.54986 11.3393 7.88505C11.3393 7.22005 11.7251 6.88745 12.1706 6.88745C12.6095 6.88745 13.0017 7.22005 13.0017 7.88505",
|
|
1657
|
-
fill: "#FFFDF8"
|
|
1658
|
-
}
|
|
1659
|
-
)
|
|
1660
|
-
] });
|
|
1661
|
-
var WalletConnectIcon = () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1662
|
-
/* @__PURE__ */ jsx7("rect", { width: "20", height: "20", rx: "2.5", fill: "#3B99FC" }),
|
|
1663
|
-
/* @__PURE__ */ jsx7(
|
|
1664
|
-
"path",
|
|
1665
|
-
{
|
|
1666
|
-
d: "M6.18 7.96a5.36 5.36 0 0 1 7.64 0l.25.26a.26.26 0 0 1 0 .37l-.87.87a.13.13 0 0 1-.19 0l-.35-.35a3.74 3.74 0 0 0-5.32 0l-.38.37a.13.13 0 0 1-.19 0l-.86-.86a.26.26 0 0 1 0-.37l.27-.29Zm9.43 1.79.78.78a.26.26 0 0 1 0 .37l-3.54 3.54a.26.26 0 0 1-.37 0l-2.51-2.5a.07.07 0 0 0-.09 0l-2.51 2.5a.26.26 0 0 1-.37 0L3.46 10.9a.26.26 0 0 1 0-.37l.78-.78a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0L9.72 9.75a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0l2.5-2.5a.26.26 0 0 1 .37 0Z",
|
|
1667
|
-
fill: "#fff"
|
|
1918
|
+
]
|
|
1668
1919
|
}
|
|
1669
|
-
)
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1920
|
+
);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
// src/components/ui/WalletBadgeIcons/WalletConnectIcon.tsx
|
|
1924
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1925
|
+
function WalletConnectIcon() {
|
|
1926
|
+
return /* @__PURE__ */ jsxs8(
|
|
1927
|
+
"svg",
|
|
1674
1928
|
{
|
|
1675
|
-
|
|
1676
|
-
|
|
1929
|
+
width: "20",
|
|
1930
|
+
height: "20",
|
|
1931
|
+
viewBox: "0 0 20 20",
|
|
1932
|
+
fill: "none",
|
|
1933
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1934
|
+
children: [
|
|
1935
|
+
/* @__PURE__ */ jsx10("rect", { width: "20", height: "20", rx: "2.5", fill: "#3B99FC" }),
|
|
1936
|
+
/* @__PURE__ */ jsx10(
|
|
1937
|
+
"path",
|
|
1938
|
+
{
|
|
1939
|
+
d: "M6.18 7.96a5.36 5.36 0 0 1 7.64 0l.25.26a.26.26 0 0 1 0 .37l-.87.87a.13.13 0 0 1-.19 0l-.35-.35a3.74 3.74 0 0 0-5.32 0l-.38.37a.13.13 0 0 1-.19 0l-.86-.86a.26.26 0 0 1 0-.37l.27-.29Zm9.43 1.79.78.78a.26.26 0 0 1 0 .37l-3.54 3.54a.26.26 0 0 1-.37 0l-2.51-2.5a.07.07 0 0 0-.09 0l-2.51 2.5a.26.26 0 0 1-.37 0L3.46 10.9a.26.26 0 0 1 0-.37l.78-.78a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0L9.72 9.75a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0l2.5-2.5a.26.26 0 0 1 .37 0Z",
|
|
1940
|
+
fill: "#fff"
|
|
1941
|
+
}
|
|
1942
|
+
)
|
|
1943
|
+
]
|
|
1677
1944
|
}
|
|
1678
|
-
)
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
/* @__PURE__ */
|
|
1685
|
-
|
|
1686
|
-
var SolBadgeIcon = () => /* @__PURE__ */ jsxs5("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1687
|
-
/* @__PURE__ */ jsx7("rect", { width: "20", height: "20", rx: "10", fill: "#0C0C0C" }),
|
|
1688
|
-
/* @__PURE__ */ jsx7(
|
|
1689
|
-
"path",
|
|
1945
|
+
);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
// src/components/ui/WalletBadgeIcons/EthBadgeIcon.tsx
|
|
1949
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1950
|
+
function EthBadgeIcon() {
|
|
1951
|
+
return /* @__PURE__ */ jsxs9(
|
|
1952
|
+
"svg",
|
|
1690
1953
|
{
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
fill: "
|
|
1954
|
+
width: "20",
|
|
1955
|
+
height: "20",
|
|
1956
|
+
viewBox: "0 0 20 20",
|
|
1957
|
+
fill: "none",
|
|
1958
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1959
|
+
children: [
|
|
1960
|
+
/* @__PURE__ */ jsx11(
|
|
1961
|
+
"path",
|
|
1962
|
+
{
|
|
1963
|
+
d: "M9.99 19.93C15.48 19.93 19.93 15.48 19.93 9.99C19.93 4.51 15.48 0.06 9.99 0.06C4.51 0.06 0.06 4.51 0.06 9.99C0.06 15.48 4.51 19.93 9.99 19.93Z",
|
|
1964
|
+
fill: "#E3E3E3"
|
|
1965
|
+
}
|
|
1966
|
+
),
|
|
1967
|
+
/* @__PURE__ */ jsx11("path", { d: "M10.00 2.18L14.69 9.99L10.02 7.98L10.00 2.18Z", fill: "#2F3030" }),
|
|
1968
|
+
/* @__PURE__ */ jsx11("path", { d: "M5.31 9.99L9.98 2.18L10.00 7.98L5.31 9.99Z", fill: "#828384" }),
|
|
1969
|
+
/* @__PURE__ */ jsx11("path", { d: "M9.98 12.80L5.31 10.04L10.00 8.11L9.98 12.80Z", fill: "#343535" }),
|
|
1970
|
+
/* @__PURE__ */ jsx11("path", { d: "M14.69 10.04L10.02 8.11L10.00 12.80L14.69 10.04Z", fill: "#131313" }),
|
|
1971
|
+
/* @__PURE__ */ jsx11("path", { d: "M10.00 14.00L14.69 11.24L10.00 17.80V14.00Z", fill: "#2F3030" }),
|
|
1972
|
+
/* @__PURE__ */ jsx11("path", { d: "M10.00 14.00L5.31 11.24L10.00 17.80V14.00Z", fill: "#828384" })
|
|
1973
|
+
]
|
|
1695
1974
|
}
|
|
1696
|
-
)
|
|
1697
|
-
|
|
1698
|
-
|
|
1975
|
+
);
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
// src/components/ui/WalletBadgeIcons/SolBadgeIcon.tsx
|
|
1979
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1980
|
+
function SolBadgeIcon() {
|
|
1981
|
+
return /* @__PURE__ */ jsxs10(
|
|
1982
|
+
"svg",
|
|
1699
1983
|
{
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
gradientUnits: "userSpaceOnUse",
|
|
1984
|
+
width: "20",
|
|
1985
|
+
height: "20",
|
|
1986
|
+
viewBox: "0 0 20 20",
|
|
1987
|
+
fill: "none",
|
|
1988
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1706
1989
|
children: [
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
-
/* @__PURE__ */
|
|
1990
|
+
/* @__PURE__ */ jsx12("rect", { width: "20", height: "20", rx: "10", fill: "#0C0C0C" }),
|
|
1991
|
+
/* @__PURE__ */ jsx12(
|
|
1992
|
+
"path",
|
|
1993
|
+
{
|
|
1994
|
+
fillRule: "evenodd",
|
|
1995
|
+
clipRule: "evenodd",
|
|
1996
|
+
d: "M4.62 9.04H13.87C13.99 9.04 14.10 9.08 14.18 9.17L15.64 10.64C15.91 10.91 15.72 11.38 15.34 11.38H6.08C5.97 11.38 5.86 11.33 5.78 11.25L4.31 9.78C4.04 9.51 4.23 9.04 4.62 9.04ZM4.31 7.09L5.77 5.62C5.86 5.53 5.97 5.49 6.08 5.49H15.33C15.71 5.49 15.91 5.95 15.63 6.22L14.17 7.70C14.09 7.78 13.98 7.82 13.87 7.82H4.62C4.23 7.82 4.04 7.36 4.31 7.09ZM15.64 13.34L14.17 14.81C14.09 14.89 13.98 14.94 13.87 14.94H4.62C4.23 14.94 4.04 14.48 4.31 14.20L5.77 12.73C5.86 12.65 5.97 12.60 6.08 12.60H15.33C15.72 12.6 15.91 13.06 15.64 13.34Z",
|
|
1997
|
+
fill: "url(#rs-sol-badge-grad)"
|
|
1998
|
+
}
|
|
1999
|
+
),
|
|
2000
|
+
/* @__PURE__ */ jsx12("defs", { children: /* @__PURE__ */ jsxs10(
|
|
2001
|
+
"linearGradient",
|
|
2002
|
+
{
|
|
2003
|
+
id: "rs-sol-badge-grad",
|
|
2004
|
+
x1: "4.85",
|
|
2005
|
+
y1: "15.34",
|
|
2006
|
+
x2: "15.11",
|
|
2007
|
+
y2: "5.08",
|
|
2008
|
+
gradientUnits: "userSpaceOnUse",
|
|
2009
|
+
children: [
|
|
2010
|
+
/* @__PURE__ */ jsx12("stop", { stopColor: "#CB4EE8" }),
|
|
2011
|
+
/* @__PURE__ */ jsx12("stop", { offset: "1", stopColor: "#10F4B1" })
|
|
2012
|
+
]
|
|
2013
|
+
}
|
|
2014
|
+
) })
|
|
1709
2015
|
]
|
|
1710
2016
|
}
|
|
1711
|
-
)
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
2017
|
+
);
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
// src/components/ui/WalletBadgeIcons/BaseBadgeIcon.tsx
|
|
2021
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2022
|
+
function BaseBadgeIcon() {
|
|
2023
|
+
return /* @__PURE__ */ jsxs11(
|
|
2024
|
+
"svg",
|
|
1717
2025
|
{
|
|
1718
|
-
|
|
1719
|
-
|
|
2026
|
+
width: "20",
|
|
2027
|
+
height: "20",
|
|
2028
|
+
viewBox: "0 0 111 111",
|
|
2029
|
+
fill: "none",
|
|
2030
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2031
|
+
children: [
|
|
2032
|
+
/* @__PURE__ */ jsx13("circle", { cx: "55.5", cy: "55.5", r: "55.5", fill: "#0052FF" }),
|
|
2033
|
+
/* @__PURE__ */ jsx13(
|
|
2034
|
+
"path",
|
|
2035
|
+
{
|
|
2036
|
+
d: "M54.92 93.4c20.94 0 37.92-16.97 37.92-37.92S75.86 17.55 54.92 17.55c-19.49 0-35.57 14.72-37.65 33.64h49.82v5.54h-49.82C19.35 75.67 35.42 93.4 54.92 93.4z",
|
|
2037
|
+
fill: "#fff"
|
|
2038
|
+
}
|
|
2039
|
+
)
|
|
2040
|
+
]
|
|
1720
2041
|
}
|
|
1721
|
-
)
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
/* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7(WalletConnectIcon, {}) })
|
|
1727
|
-
] });
|
|
1728
|
-
var chainBadge = /* @__PURE__ */ jsxs5("span", { className: "rs-list-row-meta-icons", children: [
|
|
1729
|
-
/* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7(EthBadgeIcon, {}) }),
|
|
1730
|
-
/* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7(SolBadgeIcon, {}) }),
|
|
1731
|
-
/* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7(BaseBadgeIcon, {}) })
|
|
1732
|
-
] });
|
|
2042
|
+
);
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
// src/components/ui/WalletBadgeIcons/index.tsx
|
|
2046
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1733
2047
|
function WalletBadgeIcons() {
|
|
1734
|
-
return
|
|
2048
|
+
return /* @__PURE__ */ jsxs12("span", { className: "rs-list-row-meta-icons", children: [
|
|
2049
|
+
/* @__PURE__ */ jsx14("span", { children: /* @__PURE__ */ jsx14(RabbyIcon, {}) }),
|
|
2050
|
+
/* @__PURE__ */ jsx14("span", { children: /* @__PURE__ */ jsx14(PhantomIcon, {}) }),
|
|
2051
|
+
/* @__PURE__ */ jsx14("span", { children: /* @__PURE__ */ jsx14(WalletConnectIcon, {}) })
|
|
2052
|
+
] });
|
|
1735
2053
|
}
|
|
1736
2054
|
WalletBadgeIcons.displayName = "WalletBadgeIcons";
|
|
1737
2055
|
function ChainBadgeIcons() {
|
|
1738
|
-
return
|
|
2056
|
+
return /* @__PURE__ */ jsxs12("span", { className: "rs-list-row-meta-icons", children: [
|
|
2057
|
+
/* @__PURE__ */ jsx14("span", { children: /* @__PURE__ */ jsx14(EthBadgeIcon, {}) }),
|
|
2058
|
+
/* @__PURE__ */ jsx14("span", { children: /* @__PURE__ */ jsx14(SolBadgeIcon, {}) }),
|
|
2059
|
+
/* @__PURE__ */ jsx14("span", { children: /* @__PURE__ */ jsx14(BaseBadgeIcon, {}) })
|
|
2060
|
+
] });
|
|
1739
2061
|
}
|
|
1740
2062
|
ChainBadgeIcons.displayName = "ChainBadgeIcons";
|
|
1741
2063
|
|
|
1742
2064
|
// src/components/steps/ConnectStep.tsx
|
|
1743
|
-
import { Fragment as Fragment2, jsx as
|
|
2065
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1744
2066
|
function formatBalanceUsd(value) {
|
|
1745
2067
|
if (!Number.isFinite(value) || value <= 0) return "$0.00";
|
|
1746
2068
|
return `$${value.toFixed(2)}`;
|
|
1747
2069
|
}
|
|
2070
|
+
function fiatIcon(name) {
|
|
2071
|
+
if (name === "apple") return /* @__PURE__ */ jsx15(AppleIcon, {});
|
|
2072
|
+
if (name === "bank") return /* @__PURE__ */ jsx15(BankIcon, {});
|
|
2073
|
+
return /* @__PURE__ */ jsx15(CardIcon, {});
|
|
2074
|
+
}
|
|
1748
2075
|
function shorten(addr) {
|
|
1749
2076
|
return addr.length > 12 ? `${addr.slice(0, 6)}...${addr.slice(-4)}` : addr;
|
|
1750
2077
|
}
|
|
1751
2078
|
function renderWalletLeading(row) {
|
|
1752
2079
|
if (row.icon) {
|
|
1753
|
-
return /* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ jsx15(
|
|
1754
2081
|
"img",
|
|
1755
2082
|
{
|
|
1756
2083
|
src: row.icon,
|
|
@@ -1759,11 +2086,23 @@ function renderWalletLeading(row) {
|
|
|
1759
2086
|
}
|
|
1760
2087
|
);
|
|
1761
2088
|
}
|
|
1762
|
-
return /* @__PURE__ */
|
|
2089
|
+
return /* @__PURE__ */ jsx15(WalletIcon, {});
|
|
1763
2090
|
}
|
|
2091
|
+
var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ jsx15(TransferCryptoIcon, {});
|
|
2092
|
+
var WALLET_LEADING = /* @__PURE__ */ jsx15(WalletIcon, {});
|
|
2093
|
+
var SMALL_SPINNER = /* @__PURE__ */ jsx15(Spinner, { className: "rs-spinner--sm" });
|
|
2094
|
+
var CONNECT_META = /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
2095
|
+
/* @__PURE__ */ jsx15(WalletBadgeIcons, {}),
|
|
2096
|
+
"+100 wallets"
|
|
2097
|
+
] });
|
|
2098
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, getSupportedChainIds().length - 3);
|
|
2099
|
+
var CHAIN_BADGE_META = /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
2100
|
+
/* @__PURE__ */ jsx15(ChainBadgeIcons, {}),
|
|
2101
|
+
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT} chains` : "All chains"
|
|
2102
|
+
] });
|
|
1764
2103
|
function renderRowTrailing(state) {
|
|
1765
2104
|
if (state === "loading") {
|
|
1766
|
-
return
|
|
2105
|
+
return SMALL_SPINNER;
|
|
1767
2106
|
}
|
|
1768
2107
|
return void 0;
|
|
1769
2108
|
}
|
|
@@ -1773,6 +2112,10 @@ function ConnectStep({
|
|
|
1773
2112
|
onSelectTransferCrypto,
|
|
1774
2113
|
transferCryptoState,
|
|
1775
2114
|
transferCryptoErrorReason,
|
|
2115
|
+
onSelectPayWithCard,
|
|
2116
|
+
fiatPaymentMethods,
|
|
2117
|
+
onSelectFiatMethod,
|
|
2118
|
+
onSelectFundFromExchange,
|
|
1776
2119
|
onRequestConnect,
|
|
1777
2120
|
onConnect,
|
|
1778
2121
|
onDisconnect,
|
|
@@ -1786,41 +2129,60 @@ function ConnectStep({
|
|
|
1786
2129
|
const hasReownWallet = rows.some(
|
|
1787
2130
|
(row) => row.kind === "external" || row.kind === "solana"
|
|
1788
2131
|
);
|
|
1789
|
-
const showDappImports =
|
|
1790
|
-
const extraChainCount = Math.max(0, getSupportedChainIds().length - 3);
|
|
1791
|
-
const chainBadge2 = /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
1792
|
-
/* @__PURE__ */ jsx8(ChainBadgeIcons, {}),
|
|
1793
|
-
extraChainCount > 0 ? `+${extraChainCount} chains` : "All chains"
|
|
1794
|
-
] });
|
|
2132
|
+
const showDappImports = (dappImports?.length ?? 0) > 0;
|
|
1795
2133
|
const defaultSubtitle = onSelectTransferCrypto ? "Add money to your balance" : "Choose a wallet to continue";
|
|
1796
|
-
return /* @__PURE__ */
|
|
1797
|
-
/* @__PURE__ */
|
|
1798
|
-
/* @__PURE__ */
|
|
2134
|
+
return /* @__PURE__ */ jsxs13("div", { className: "rs-screen", children: [
|
|
2135
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2136
|
+
/* @__PURE__ */ jsx15(
|
|
1799
2137
|
BodyHeader,
|
|
1800
2138
|
{
|
|
1801
|
-
icon: /* @__PURE__ */
|
|
2139
|
+
icon: /* @__PURE__ */ jsx15(HandCoinsIcon, {}),
|
|
1802
2140
|
title,
|
|
1803
2141
|
subtitle: subtitle ?? defaultSubtitle
|
|
1804
2142
|
}
|
|
1805
2143
|
),
|
|
1806
|
-
/* @__PURE__ */
|
|
1807
|
-
onSelectTransferCrypto && /* @__PURE__ */
|
|
2144
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-list", children: [
|
|
2145
|
+
onSelectTransferCrypto && /* @__PURE__ */ jsx15(
|
|
1808
2146
|
ListRow,
|
|
1809
2147
|
{
|
|
1810
|
-
leading:
|
|
2148
|
+
leading: TRANSFER_CRYPTO_LEADING,
|
|
1811
2149
|
title: "Transfer crypto",
|
|
1812
|
-
subtitle: transferCryptoState === "
|
|
1813
|
-
meta:
|
|
1814
|
-
onClick: onSelectTransferCrypto
|
|
1815
|
-
|
|
1816
|
-
|
|
2150
|
+
subtitle: transferCryptoState === "error" ? transferCryptoErrorReason ?? "Couldn't prepare account \u2014 tap to retry" : "Instant - No limit",
|
|
2151
|
+
meta: CHAIN_BADGE_META,
|
|
2152
|
+
onClick: onSelectTransferCrypto
|
|
2153
|
+
}
|
|
2154
|
+
),
|
|
2155
|
+
fiatPaymentMethods && fiatPaymentMethods.length > 0 && onSelectFiatMethod ? fiatPaymentMethods.map((opt) => /* @__PURE__ */ jsx15(
|
|
2156
|
+
ListRow,
|
|
2157
|
+
{
|
|
2158
|
+
leading: fiatIcon(opt.icon),
|
|
2159
|
+
title: opt.label,
|
|
2160
|
+
subtitle: opt.sublabel,
|
|
2161
|
+
onClick: () => onSelectFiatMethod(opt.method)
|
|
2162
|
+
},
|
|
2163
|
+
opt.method
|
|
2164
|
+
)) : onSelectPayWithCard && /* @__PURE__ */ jsx15(
|
|
2165
|
+
ListRow,
|
|
2166
|
+
{
|
|
2167
|
+
leading: /* @__PURE__ */ jsx15(CardIcon, {}),
|
|
2168
|
+
title: "Pay with Card",
|
|
2169
|
+
subtitle: "Buy crypto with card or bank",
|
|
2170
|
+
onClick: onSelectPayWithCard
|
|
2171
|
+
}
|
|
2172
|
+
),
|
|
2173
|
+
onSelectFundFromExchange && /* @__PURE__ */ jsx15(
|
|
2174
|
+
ListRow,
|
|
2175
|
+
{
|
|
2176
|
+
leading: /* @__PURE__ */ jsx15(BankIcon, {}),
|
|
2177
|
+
title: "Fund from Exchange",
|
|
2178
|
+
subtitle: "Use Coinbase, Binance, MetaMask\u2026",
|
|
2179
|
+
onClick: onSelectFundFromExchange
|
|
1817
2180
|
}
|
|
1818
2181
|
),
|
|
1819
2182
|
rows.map((row) => {
|
|
1820
2183
|
const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
|
|
1821
2184
|
const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? row.errorReason ?? "Couldn't prepare wallet \u2014 tap to retry" : shorten(row.address);
|
|
1822
|
-
|
|
1823
|
-
return /* @__PURE__ */ jsx8(
|
|
2185
|
+
return /* @__PURE__ */ jsx15(
|
|
1824
2186
|
ListRow,
|
|
1825
2187
|
{
|
|
1826
2188
|
leading: renderWalletLeading(row),
|
|
@@ -1828,41 +2190,50 @@ function ConnectStep({
|
|
|
1828
2190
|
subtitle: subtitleText,
|
|
1829
2191
|
onClick: () => onConfirmWallet?.(row.id),
|
|
1830
2192
|
disabled: row.state === "loading",
|
|
1831
|
-
trailing: renderRowTrailing(row.state)
|
|
1832
|
-
action: showInlineDisconnect && onDisconnect ? { label: "Disconnect", onClick: onDisconnect } : void 0
|
|
2193
|
+
trailing: renderRowTrailing(row.state)
|
|
1833
2194
|
},
|
|
1834
2195
|
row.id
|
|
1835
2196
|
);
|
|
1836
2197
|
}),
|
|
1837
|
-
!hasReownWallet && handleConnect && /* @__PURE__ */
|
|
2198
|
+
!hasReownWallet && handleConnect && /* @__PURE__ */ jsx15(
|
|
1838
2199
|
ListRow,
|
|
1839
2200
|
{
|
|
1840
|
-
leading:
|
|
2201
|
+
leading: WALLET_LEADING,
|
|
1841
2202
|
title: "Connect wallet",
|
|
1842
2203
|
subtitle: "Instant - No limit",
|
|
1843
|
-
meta:
|
|
1844
|
-
/* @__PURE__ */ jsx8(WalletBadgeIcons, {}),
|
|
1845
|
-
"+100 wallets"
|
|
1846
|
-
] }),
|
|
2204
|
+
meta: CONNECT_META,
|
|
1847
2205
|
onClick: handleConnect
|
|
1848
2206
|
}
|
|
1849
2207
|
),
|
|
1850
2208
|
showDappImports && dappImports?.map((row) => {
|
|
1851
|
-
if (
|
|
1852
|
-
return /* @__PURE__ */
|
|
2209
|
+
if (!hasReownWallet) {
|
|
2210
|
+
return /* @__PURE__ */ jsx15(
|
|
2211
|
+
ListRow,
|
|
2212
|
+
{
|
|
2213
|
+
leading: row.icon,
|
|
2214
|
+
title: row.label,
|
|
2215
|
+
subtitle: "Connect wallet to view balance",
|
|
2216
|
+
onClick: handleConnect,
|
|
2217
|
+
disabled: !handleConnect
|
|
2218
|
+
},
|
|
2219
|
+
row.id
|
|
2220
|
+
);
|
|
2221
|
+
}
|
|
2222
|
+
if (row.status === "loading" || row.status === "needs-connect") {
|
|
2223
|
+
return /* @__PURE__ */ jsx15(
|
|
1853
2224
|
ListRow,
|
|
1854
2225
|
{
|
|
1855
2226
|
leading: row.icon,
|
|
1856
2227
|
title: row.label,
|
|
1857
2228
|
subtitle: "Checking balance\u2026",
|
|
1858
2229
|
disabled: true,
|
|
1859
|
-
trailing:
|
|
2230
|
+
trailing: SMALL_SPINNER
|
|
1860
2231
|
},
|
|
1861
2232
|
row.id
|
|
1862
2233
|
);
|
|
1863
2234
|
}
|
|
1864
2235
|
if (row.status.enabled) {
|
|
1865
|
-
return /* @__PURE__ */
|
|
2236
|
+
return /* @__PURE__ */ jsx15(
|
|
1866
2237
|
ListRow,
|
|
1867
2238
|
{
|
|
1868
2239
|
leading: row.icon,
|
|
@@ -1874,7 +2245,7 @@ function ConnectStep({
|
|
|
1874
2245
|
);
|
|
1875
2246
|
}
|
|
1876
2247
|
if (row.status.retryable) {
|
|
1877
|
-
return /* @__PURE__ */
|
|
2248
|
+
return /* @__PURE__ */ jsx15(
|
|
1878
2249
|
ListRow,
|
|
1879
2250
|
{
|
|
1880
2251
|
leading: row.icon,
|
|
@@ -1885,7 +2256,7 @@ function ConnectStep({
|
|
|
1885
2256
|
row.id
|
|
1886
2257
|
);
|
|
1887
2258
|
}
|
|
1888
|
-
return /* @__PURE__ */
|
|
2259
|
+
return /* @__PURE__ */ jsx15(
|
|
1889
2260
|
ListRow,
|
|
1890
2261
|
{
|
|
1891
2262
|
leading: row.icon,
|
|
@@ -1898,17 +2269,26 @@ function ConnectStep({
|
|
|
1898
2269
|
})
|
|
1899
2270
|
] })
|
|
1900
2271
|
] }),
|
|
1901
|
-
/* @__PURE__ */
|
|
2272
|
+
onDisconnect && hasReownWallet && /* @__PURE__ */ jsx15("div", { className: "rs-screen-tight-row", children: /* @__PURE__ */ jsx15(
|
|
2273
|
+
"button",
|
|
2274
|
+
{
|
|
2275
|
+
type: "button",
|
|
2276
|
+
className: "rs-connect-wallet-manage",
|
|
2277
|
+
onClick: onDisconnect,
|
|
2278
|
+
children: "Disconnect wallet"
|
|
2279
|
+
}
|
|
2280
|
+
) }),
|
|
2281
|
+
/* @__PURE__ */ jsx15(PoweredBy, {})
|
|
1902
2282
|
] });
|
|
1903
2283
|
}
|
|
1904
2284
|
ConnectStep.displayName = "ConnectStep";
|
|
1905
2285
|
|
|
1906
2286
|
// src/components/steps/ProcessingStep.tsx
|
|
1907
|
-
import { useEffect as useEffect4, useRef as useRef4, useState as useState2 } from "react";
|
|
2287
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useRef as useRef4, useState as useState2 } from "react";
|
|
1908
2288
|
import { formatUnits } from "viem";
|
|
1909
2289
|
|
|
1910
2290
|
// src/components/ui/Button.tsx
|
|
1911
|
-
import { Fragment as Fragment3, jsx as
|
|
2291
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1912
2292
|
function Button({
|
|
1913
2293
|
children,
|
|
1914
2294
|
variant = "accent",
|
|
@@ -1928,19 +2308,19 @@ function Button({
|
|
|
1928
2308
|
className
|
|
1929
2309
|
].filter(Boolean).join(" ");
|
|
1930
2310
|
const showInlineLoadingText = loading && loadingText !== void 0;
|
|
1931
|
-
return /* @__PURE__ */
|
|
2311
|
+
return /* @__PURE__ */ jsx16(
|
|
1932
2312
|
"button",
|
|
1933
2313
|
{
|
|
1934
2314
|
className: classes,
|
|
1935
2315
|
disabled: disabled || loading,
|
|
1936
2316
|
"aria-busy": loading || void 0,
|
|
1937
2317
|
...props,
|
|
1938
|
-
children: showInlineLoadingText ? /* @__PURE__ */
|
|
1939
|
-
/* @__PURE__ */
|
|
1940
|
-
/* @__PURE__ */
|
|
1941
|
-
] }) : /* @__PURE__ */
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
loading && /* @__PURE__ */
|
|
2318
|
+
children: showInlineLoadingText ? /* @__PURE__ */ jsxs14("span", { className: "rs-button__loading-row", children: [
|
|
2319
|
+
/* @__PURE__ */ jsx16(Spinner, { className: "rs-spinner--sm" }),
|
|
2320
|
+
/* @__PURE__ */ jsx16("span", { children: loadingText })
|
|
2321
|
+
] }) : /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
2322
|
+
/* @__PURE__ */ jsx16("span", { className: loading ? "rs-button__content--hidden" : "", children }),
|
|
2323
|
+
loading && /* @__PURE__ */ jsx16("span", { className: "rs-button__spinner", children: /* @__PURE__ */ jsx16(Spinner, { className: "rs-spinner--sm" }) })
|
|
1944
2324
|
] })
|
|
1945
2325
|
}
|
|
1946
2326
|
);
|
|
@@ -1955,7 +2335,7 @@ import {
|
|
|
1955
2335
|
useCallback as useCallback2
|
|
1956
2336
|
} from "react";
|
|
1957
2337
|
import { createPortal as createPortal2 } from "react-dom";
|
|
1958
|
-
import { jsx as
|
|
2338
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1959
2339
|
function Tooltip({ content, children, className }) {
|
|
1960
2340
|
const [open, setOpen] = useState(false);
|
|
1961
2341
|
const [position, setPosition] = useState(null);
|
|
@@ -1984,7 +2364,7 @@ function Tooltip({ content, children, className }) {
|
|
|
1984
2364
|
if (event.key === "Escape") setOpen(false);
|
|
1985
2365
|
}
|
|
1986
2366
|
document.addEventListener("mousedown", handleOutside);
|
|
1987
|
-
document.addEventListener("touchstart", handleOutside);
|
|
2367
|
+
document.addEventListener("touchstart", handleOutside, { passive: true });
|
|
1988
2368
|
document.addEventListener("keydown", handleKey);
|
|
1989
2369
|
window.addEventListener("scroll", updatePosition, true);
|
|
1990
2370
|
window.addEventListener("resize", updatePosition);
|
|
@@ -1996,7 +2376,7 @@ function Tooltip({ content, children, className }) {
|
|
|
1996
2376
|
window.removeEventListener("resize", updatePosition);
|
|
1997
2377
|
};
|
|
1998
2378
|
}, [open, updatePosition]);
|
|
1999
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ jsxs15(
|
|
2000
2380
|
"span",
|
|
2001
2381
|
{
|
|
2002
2382
|
ref: triggerRef,
|
|
@@ -2004,7 +2384,7 @@ function Tooltip({ content, children, className }) {
|
|
|
2004
2384
|
onMouseEnter: () => setOpen(true),
|
|
2005
2385
|
onMouseLeave: () => setOpen(false),
|
|
2006
2386
|
children: [
|
|
2007
|
-
/* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ jsx17(
|
|
2008
2388
|
"span",
|
|
2009
2389
|
{
|
|
2010
2390
|
className: "rs-tooltip-trigger",
|
|
@@ -2026,7 +2406,7 @@ function Tooltip({ content, children, className }) {
|
|
|
2026
2406
|
}
|
|
2027
2407
|
),
|
|
2028
2408
|
open && position && typeof document !== "undefined" && createPortal2(
|
|
2029
|
-
/* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ jsx17(
|
|
2030
2410
|
"span",
|
|
2031
2411
|
{
|
|
2032
2412
|
ref: bubbleRef,
|
|
@@ -2044,46 +2424,6 @@ function Tooltip({ content, children, className }) {
|
|
|
2044
2424
|
}
|
|
2045
2425
|
Tooltip.displayName = "Tooltip";
|
|
2046
2426
|
|
|
2047
|
-
// src/components/ui/Callout.tsx
|
|
2048
|
-
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2049
|
-
function CircleAlertIcon() {
|
|
2050
|
-
return /* @__PURE__ */ jsx11(
|
|
2051
|
-
"svg",
|
|
2052
|
-
{
|
|
2053
|
-
width: "16",
|
|
2054
|
-
height: "16",
|
|
2055
|
-
viewBox: "0 0 16 16",
|
|
2056
|
-
fill: "none",
|
|
2057
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2058
|
-
"aria-hidden": "true",
|
|
2059
|
-
children: /* @__PURE__ */ jsx11(
|
|
2060
|
-
"path",
|
|
2061
|
-
{
|
|
2062
|
-
d: "M10 5.99992L6 9.99992M6 5.99992L10 9.99992M14.6667 7.99992C14.6667 11.6818 11.6819 14.6666 8 14.6666C4.3181 14.6666 1.33333 11.6818 1.33333 7.99992C1.33333 4.31802 4.3181 1.33325 8 1.33325C11.6819 1.33325 14.6667 4.31802 14.6667 7.99992Z",
|
|
2063
|
-
stroke: "currentColor",
|
|
2064
|
-
strokeWidth: "1.33333",
|
|
2065
|
-
strokeLinecap: "round",
|
|
2066
|
-
strokeLinejoin: "round"
|
|
2067
|
-
}
|
|
2068
|
-
)
|
|
2069
|
-
}
|
|
2070
|
-
);
|
|
2071
|
-
}
|
|
2072
|
-
function Callout({ variant = "error", children, role }) {
|
|
2073
|
-
return /* @__PURE__ */ jsxs9(
|
|
2074
|
-
"div",
|
|
2075
|
-
{
|
|
2076
|
-
className: `rs-callout rs-callout--${variant}`,
|
|
2077
|
-
role: role ?? (variant === "error" ? "alert" : "status"),
|
|
2078
|
-
children: [
|
|
2079
|
-
/* @__PURE__ */ jsx11("span", { className: "rs-callout-icon", children: variant === "error" ? /* @__PURE__ */ jsx11(CircleAlertIcon, {}) : /* @__PURE__ */ jsx11(AlertTriangleIcon, {}) }),
|
|
2080
|
-
/* @__PURE__ */ jsx11("span", { className: "rs-callout-text", children })
|
|
2081
|
-
]
|
|
2082
|
-
}
|
|
2083
|
-
);
|
|
2084
|
-
}
|
|
2085
|
-
Callout.displayName = "Callout";
|
|
2086
|
-
|
|
2087
2427
|
// src/core/webhook.ts
|
|
2088
2428
|
function isRecord(value) {
|
|
2089
2429
|
return typeof value === "object" && value !== null;
|
|
@@ -2159,6 +2499,9 @@ function getEventSourceDetails(event) {
|
|
|
2159
2499
|
function isDepositEvent(event) {
|
|
2160
2500
|
return event?.type === "deposit-received" || event?.type === "bridge-started" || event?.type === "bridge-complete" || event?.type === "bridge-failed" || event?.type === "post-bridge-swap-complete" || event?.type === "post-bridge-swap-failed" || event?.type === "error";
|
|
2161
2501
|
}
|
|
2502
|
+
function isFailedEvent(event) {
|
|
2503
|
+
return event?.type === "bridge-failed" || event?.type === "post-bridge-swap-failed" || event?.type === "error";
|
|
2504
|
+
}
|
|
2162
2505
|
function isHexString(value) {
|
|
2163
2506
|
return value.startsWith("0x") || value.startsWith("0X");
|
|
2164
2507
|
}
|
|
@@ -2168,11 +2511,46 @@ function txRefsMatch(a, b) {
|
|
|
2168
2511
|
}
|
|
2169
2512
|
return a === b;
|
|
2170
2513
|
}
|
|
2514
|
+
function formatBridgeFailedMessage(event) {
|
|
2515
|
+
const eventData = event?.data ?? {};
|
|
2516
|
+
const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
|
|
2517
|
+
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
2518
|
+
function toUserFacingFailure(raw) {
|
|
2519
|
+
const lower = raw.toLowerCase();
|
|
2520
|
+
if (lower.includes("insufficient funds")) {
|
|
2521
|
+
return "Deposit was received, but processing could not continue due to insufficient funds. Please retry.";
|
|
2522
|
+
}
|
|
2523
|
+
if (lower.includes("no valid quote available")) {
|
|
2524
|
+
return "No bridge route is currently available for this transfer. Please try again shortly.";
|
|
2525
|
+
}
|
|
2526
|
+
if (lower.includes("simulation failed")) {
|
|
2527
|
+
return "Transfer processing failed during simulation. Please retry.";
|
|
2528
|
+
}
|
|
2529
|
+
if (raw.length > 220) {
|
|
2530
|
+
return "Transfer processing failed. Please retry.";
|
|
2531
|
+
}
|
|
2532
|
+
return raw;
|
|
2533
|
+
}
|
|
2534
|
+
if (backendMessage.length > 0) {
|
|
2535
|
+
return { message: toUserFacingFailure(backendMessage), code };
|
|
2536
|
+
}
|
|
2537
|
+
if (code) {
|
|
2538
|
+
return { message: `Bridge failed (${code})`, code };
|
|
2539
|
+
}
|
|
2540
|
+
return { message: "Bridge failed" };
|
|
2541
|
+
}
|
|
2542
|
+
function failureMessageForEvent(event) {
|
|
2543
|
+
if (event?.type === "error") {
|
|
2544
|
+
const message = isRecord(event.data) ? asString(event.data.message) : void 0;
|
|
2545
|
+
return message ?? "Unknown error";
|
|
2546
|
+
}
|
|
2547
|
+
return formatBridgeFailedMessage(event).message;
|
|
2548
|
+
}
|
|
2171
2549
|
|
|
2172
2550
|
// src/components/steps/ProcessingStep.tsx
|
|
2173
|
-
import { jsx as
|
|
2551
|
+
import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2174
2552
|
function SuccessBadge() {
|
|
2175
|
-
return /* @__PURE__ */
|
|
2553
|
+
return /* @__PURE__ */ jsxs16(
|
|
2176
2554
|
"svg",
|
|
2177
2555
|
{
|
|
2178
2556
|
width: "40",
|
|
@@ -2182,7 +2560,7 @@ function SuccessBadge() {
|
|
|
2182
2560
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2183
2561
|
"aria-hidden": "true",
|
|
2184
2562
|
children: [
|
|
2185
|
-
/* @__PURE__ */
|
|
2563
|
+
/* @__PURE__ */ jsx18(
|
|
2186
2564
|
"rect",
|
|
2187
2565
|
{
|
|
2188
2566
|
width: "40",
|
|
@@ -2191,7 +2569,7 @@ function SuccessBadge() {
|
|
|
2191
2569
|
fill: "var(--rs-icon-wrapper-bg)"
|
|
2192
2570
|
}
|
|
2193
2571
|
),
|
|
2194
|
-
/* @__PURE__ */
|
|
2572
|
+
/* @__PURE__ */ jsx18(
|
|
2195
2573
|
"path",
|
|
2196
2574
|
{
|
|
2197
2575
|
d: "M28 14L17 25L12 20",
|
|
@@ -2206,7 +2584,7 @@ function SuccessBadge() {
|
|
|
2206
2584
|
);
|
|
2207
2585
|
}
|
|
2208
2586
|
function FailedBadge() {
|
|
2209
|
-
return /* @__PURE__ */
|
|
2587
|
+
return /* @__PURE__ */ jsxs16(
|
|
2210
2588
|
"svg",
|
|
2211
2589
|
{
|
|
2212
2590
|
width: "40",
|
|
@@ -2216,8 +2594,8 @@ function FailedBadge() {
|
|
|
2216
2594
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2217
2595
|
"aria-hidden": "true",
|
|
2218
2596
|
children: [
|
|
2219
|
-
/* @__PURE__ */
|
|
2220
|
-
/* @__PURE__ */
|
|
2597
|
+
/* @__PURE__ */ jsx18("rect", { width: "40", height: "40", rx: "8", fill: "#FB2C36" }),
|
|
2598
|
+
/* @__PURE__ */ jsx18(
|
|
2221
2599
|
"path",
|
|
2222
2600
|
{
|
|
2223
2601
|
d: "M26 14L14 26M14 14L26 26",
|
|
@@ -2241,6 +2619,47 @@ var SOFT_DELAY_MS = {
|
|
|
2241
2619
|
bridging: 4 * 60 * 1e3
|
|
2242
2620
|
};
|
|
2243
2621
|
var PHASE_TIMINGS_PREFIX = "rhinestone:phase-timings";
|
|
2622
|
+
var STABLECOIN_SYMBOLS = /* @__PURE__ */ new Set([
|
|
2623
|
+
"USDC",
|
|
2624
|
+
"USDT",
|
|
2625
|
+
"DAI",
|
|
2626
|
+
"FRAX",
|
|
2627
|
+
"PYUSD",
|
|
2628
|
+
"USDP",
|
|
2629
|
+
"TUSD",
|
|
2630
|
+
"GUSD",
|
|
2631
|
+
"USDS",
|
|
2632
|
+
"LUSD",
|
|
2633
|
+
"BUSD",
|
|
2634
|
+
"USDE"
|
|
2635
|
+
]);
|
|
2636
|
+
function maxFractionDigitsFor(symbol) {
|
|
2637
|
+
if (!symbol) return 6;
|
|
2638
|
+
return STABLECOIN_SYMBOLS.has(symbol.toUpperCase()) ? 3 : 6;
|
|
2639
|
+
}
|
|
2640
|
+
var PAYMENT_METHOD_LABELS = {
|
|
2641
|
+
creditcard: "Card",
|
|
2642
|
+
debitcard: "Card",
|
|
2643
|
+
card: "Card",
|
|
2644
|
+
"apple-pay": "Apple Pay",
|
|
2645
|
+
applepay: "Apple Pay",
|
|
2646
|
+
"google-pay": "Google Pay",
|
|
2647
|
+
googlepay: "Google Pay",
|
|
2648
|
+
"bank-transfer": "Bank Transfer",
|
|
2649
|
+
banktransfer: "Bank Transfer",
|
|
2650
|
+
sepa: "SEPA",
|
|
2651
|
+
"open-banking": "Open Banking",
|
|
2652
|
+
"krak-pay": "Kraken Pay",
|
|
2653
|
+
krakpay: "Kraken Pay",
|
|
2654
|
+
kraken: "Kraken",
|
|
2655
|
+
coinbase: "Coinbase",
|
|
2656
|
+
binance: "Binance"
|
|
2657
|
+
};
|
|
2658
|
+
function formatPaymentMethod(method) {
|
|
2659
|
+
const key = method.trim().toLowerCase();
|
|
2660
|
+
if (PAYMENT_METHOD_LABELS[key]) return PAYMENT_METHOD_LABELS[key];
|
|
2661
|
+
return key.replace(/[-_]+/g, " ").split(" ").filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
2662
|
+
}
|
|
2244
2663
|
function loadPhaseTimings(txHash) {
|
|
2245
2664
|
if (typeof window === "undefined") return null;
|
|
2246
2665
|
try {
|
|
@@ -2268,38 +2687,6 @@ function isEventForTx(event, txHash) {
|
|
|
2268
2687
|
if (!eventTxHash) return false;
|
|
2269
2688
|
return txRefsMatch(eventTxHash, txHash);
|
|
2270
2689
|
}
|
|
2271
|
-
function formatBridgeFailedMessage(event) {
|
|
2272
|
-
const eventData = event?.data ?? {};
|
|
2273
|
-
const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
|
|
2274
|
-
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
2275
|
-
function toUserFacingFailure(raw) {
|
|
2276
|
-
const lower = raw.toLowerCase();
|
|
2277
|
-
if (lower.includes("insufficient funds")) {
|
|
2278
|
-
return "Deposit was received, but processing could not continue due to insufficient funds. Please retry.";
|
|
2279
|
-
}
|
|
2280
|
-
if (lower.includes("no valid quote available")) {
|
|
2281
|
-
return "No bridge route is currently available for this transfer. Please try again shortly.";
|
|
2282
|
-
}
|
|
2283
|
-
if (lower.includes("simulation failed")) {
|
|
2284
|
-
return "Transfer processing failed during simulation. Please retry.";
|
|
2285
|
-
}
|
|
2286
|
-
if (raw.length > 220) {
|
|
2287
|
-
return "Transfer processing failed. Please retry.";
|
|
2288
|
-
}
|
|
2289
|
-
return raw;
|
|
2290
|
-
}
|
|
2291
|
-
if (backendMessage.length > 0) {
|
|
2292
|
-
const userMessage = toUserFacingFailure(backendMessage);
|
|
2293
|
-
return {
|
|
2294
|
-
message: userMessage,
|
|
2295
|
-
code
|
|
2296
|
-
};
|
|
2297
|
-
}
|
|
2298
|
-
if (code) {
|
|
2299
|
-
return { message: `Bridge failed (${code})`, code };
|
|
2300
|
-
}
|
|
2301
|
-
return { message: "Bridge failed" };
|
|
2302
|
-
}
|
|
2303
2690
|
function parseWebhookTimestamp(event) {
|
|
2304
2691
|
if (typeof event?.time !== "string") return void 0;
|
|
2305
2692
|
const timestamp = Date.parse(event.time);
|
|
@@ -2319,11 +2706,35 @@ function syncPhaseTimings(previous, event) {
|
|
|
2319
2706
|
...setCompleted && { completedAt: timestamp }
|
|
2320
2707
|
};
|
|
2321
2708
|
}
|
|
2322
|
-
function
|
|
2323
|
-
|
|
2324
|
-
const mins = Math.floor(
|
|
2325
|
-
const secs =
|
|
2326
|
-
return `${mins}
|
|
2709
|
+
function formatTimer(seconds) {
|
|
2710
|
+
const safe = Math.max(0, seconds);
|
|
2711
|
+
const mins = Math.floor(safe / 60);
|
|
2712
|
+
const secs = safe % 60;
|
|
2713
|
+
return `${mins}:${String(secs).padStart(2, "0")}`;
|
|
2714
|
+
}
|
|
2715
|
+
function TickerChar({ value }) {
|
|
2716
|
+
const [current, setCurrent] = useState2(value);
|
|
2717
|
+
const [previous, setPrevious] = useState2(null);
|
|
2718
|
+
const [animKey, setAnimKey] = useState2(0);
|
|
2719
|
+
useEffect4(() => {
|
|
2720
|
+
if (value === current) return;
|
|
2721
|
+
setPrevious(current);
|
|
2722
|
+
setCurrent(value);
|
|
2723
|
+
setAnimKey((k) => k + 1);
|
|
2724
|
+
const timeout = setTimeout(() => setPrevious(null), 360);
|
|
2725
|
+
return () => clearTimeout(timeout);
|
|
2726
|
+
}, [value, current]);
|
|
2727
|
+
return /* @__PURE__ */ jsxs16("span", { className: "rs-ticker-slot", children: [
|
|
2728
|
+
previous !== null && /* @__PURE__ */ jsx18("span", { className: "rs-ticker-out", children: previous }, `out-${animKey}`),
|
|
2729
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-ticker-in", children: current }, `in-${animKey}`)
|
|
2730
|
+
] });
|
|
2731
|
+
}
|
|
2732
|
+
function Ticker({ value }) {
|
|
2733
|
+
return /* @__PURE__ */ jsx18("span", { className: "rs-ticker", "aria-label": value, children: value.split("").map((char, index) => (
|
|
2734
|
+
// Position-stable key so each slot keeps its own animation state.
|
|
2735
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
2736
|
+
/* @__PURE__ */ jsx18(TickerChar, { value: char }, index)
|
|
2737
|
+
)) });
|
|
2327
2738
|
}
|
|
2328
2739
|
function getPhaseStartTime(phaseId, phaseTimings) {
|
|
2329
2740
|
if (phaseId === "confirming") return phaseTimings.startedAt;
|
|
@@ -2337,13 +2748,10 @@ function getFailedPhaseId(phaseTimings) {
|
|
|
2337
2748
|
if (phaseTimings.receivedAt !== void 0) return "received";
|
|
2338
2749
|
return "confirming";
|
|
2339
2750
|
}
|
|
2340
|
-
function getCurrentPhaseId(state, phaseTimings
|
|
2751
|
+
function getCurrentPhaseId(state, phaseTimings) {
|
|
2341
2752
|
if (state.type === "failed") {
|
|
2342
2753
|
return getFailedPhaseId(phaseTimings);
|
|
2343
2754
|
}
|
|
2344
|
-
if (isEarlyComplete) {
|
|
2345
|
-
return "bridging";
|
|
2346
|
-
}
|
|
2347
2755
|
if (state.type === "complete") {
|
|
2348
2756
|
return void 0;
|
|
2349
2757
|
}
|
|
@@ -2362,7 +2770,7 @@ function ProcessingStep({
|
|
|
2362
2770
|
amount,
|
|
2363
2771
|
sourceSymbol: providedSourceSymbol,
|
|
2364
2772
|
sourceDecimals: providedSourceDecimals,
|
|
2365
|
-
|
|
2773
|
+
amountUsd,
|
|
2366
2774
|
hasPostBridgeActions,
|
|
2367
2775
|
service,
|
|
2368
2776
|
directTransfer,
|
|
@@ -2370,10 +2778,10 @@ function ProcessingStep({
|
|
|
2370
2778
|
debug,
|
|
2371
2779
|
targetToken,
|
|
2372
2780
|
uiConfig,
|
|
2373
|
-
|
|
2374
|
-
quotedFeeAmount = "0.1",
|
|
2781
|
+
quotedFeeAmount,
|
|
2375
2782
|
quotedFeeSymbol,
|
|
2376
2783
|
balanceAfterUsd,
|
|
2784
|
+
isSwappedOrder,
|
|
2377
2785
|
onClose,
|
|
2378
2786
|
onNewDeposit,
|
|
2379
2787
|
onRetry,
|
|
@@ -2389,9 +2797,10 @@ function ProcessingStep({
|
|
|
2389
2797
|
amount,
|
|
2390
2798
|
sourceChain,
|
|
2391
2799
|
sourceToken,
|
|
2800
|
+
sourceDecimals: providedSourceDecimals,
|
|
2801
|
+
amountUsd,
|
|
2392
2802
|
targetChain,
|
|
2393
2803
|
targetToken,
|
|
2394
|
-
waitForFinalTx,
|
|
2395
2804
|
hasPostBridgeActions
|
|
2396
2805
|
});
|
|
2397
2806
|
const onDepositCompleteRef = useLatestRef(onDepositComplete);
|
|
@@ -2410,14 +2819,24 @@ function ProcessingStep({
|
|
|
2410
2819
|
return { startedAt: startTimeRef.current };
|
|
2411
2820
|
});
|
|
2412
2821
|
const [hasEscalatedDelay, setHasEscalatedDelay] = useState2(false);
|
|
2822
|
+
const updatePhaseTimings = useCallback3(
|
|
2823
|
+
(updater) => {
|
|
2824
|
+
setPhaseTimings((previous) => {
|
|
2825
|
+
const next = updater(previous);
|
|
2826
|
+
savePhaseTimings(txHash, next);
|
|
2827
|
+
return next;
|
|
2828
|
+
});
|
|
2829
|
+
},
|
|
2830
|
+
[txHash]
|
|
2831
|
+
);
|
|
2413
2832
|
useEffect4(() => {
|
|
2414
2833
|
if (!directTransfer) return;
|
|
2415
2834
|
const completedAt = Date.now();
|
|
2416
|
-
|
|
2835
|
+
updatePhaseTimings(() => ({
|
|
2417
2836
|
startedAt: startTimeRef.current,
|
|
2418
2837
|
completedAt,
|
|
2419
2838
|
endedAt: completedAt
|
|
2420
|
-
});
|
|
2839
|
+
}));
|
|
2421
2840
|
debugLog(debug, "processing", "direct-transfer:complete", {
|
|
2422
2841
|
txHash,
|
|
2423
2842
|
flowLabel
|
|
@@ -2427,6 +2846,8 @@ function ProcessingStep({
|
|
|
2427
2846
|
amount: context.amount,
|
|
2428
2847
|
sourceChain: context.sourceChain,
|
|
2429
2848
|
sourceToken: context.sourceToken,
|
|
2849
|
+
sourceDecimals: context.sourceDecimals,
|
|
2850
|
+
amountUsd: context.amountUsd,
|
|
2430
2851
|
targetChain: context.targetChain,
|
|
2431
2852
|
targetToken: context.targetToken
|
|
2432
2853
|
});
|
|
@@ -2436,7 +2857,8 @@ function ProcessingStep({
|
|
|
2436
2857
|
flowLabel,
|
|
2437
2858
|
onDepositCompleteRef,
|
|
2438
2859
|
processingContextRef,
|
|
2439
|
-
txHash
|
|
2860
|
+
txHash,
|
|
2861
|
+
updatePhaseTimings
|
|
2440
2862
|
]);
|
|
2441
2863
|
useEffect4(() => {
|
|
2442
2864
|
if (directTransfer || state.type !== "processing") return;
|
|
@@ -2453,17 +2875,38 @@ function ProcessingStep({
|
|
|
2453
2875
|
if (state.type === "processing") return;
|
|
2454
2876
|
const endedAt = state.type === "complete" ? phaseTimings.completedAt ?? Date.now() : Date.now();
|
|
2455
2877
|
setElapsedSeconds(Math.floor((endedAt - startTimeRef.current) / 1e3));
|
|
2456
|
-
|
|
2878
|
+
updatePhaseTimings(
|
|
2457
2879
|
(previous) => previous.endedAt !== void 0 ? previous : { ...previous, endedAt }
|
|
2458
2880
|
);
|
|
2459
|
-
}, [phaseTimings.completedAt, state.type]);
|
|
2881
|
+
}, [phaseTimings.completedAt, state.type, updatePhaseTimings]);
|
|
2460
2882
|
useEffect4(() => {
|
|
2461
2883
|
if (!state.lastEvent) return;
|
|
2462
|
-
|
|
2463
|
-
|
|
2884
|
+
updatePhaseTimings(
|
|
2885
|
+
(previous) => syncPhaseTimings(previous, state.lastEvent)
|
|
2886
|
+
);
|
|
2887
|
+
}, [state.lastEvent?.time, state.lastEvent?.type, updatePhaseTimings]);
|
|
2888
|
+
const [swappedFiatContext, setSwappedFiatContext] = useState2(null);
|
|
2464
2889
|
useEffect4(() => {
|
|
2465
|
-
|
|
2466
|
-
|
|
2890
|
+
let cancelled = false;
|
|
2891
|
+
service.fetchSwappedOrderStatus(smartAccount).then((res) => {
|
|
2892
|
+
if (cancelled || !res) return;
|
|
2893
|
+
if (res.transactionId != null) {
|
|
2894
|
+
if (res.transactionId.toLowerCase() !== txHash.toLowerCase()) return;
|
|
2895
|
+
} else if (!isSwappedOrder) {
|
|
2896
|
+
return;
|
|
2897
|
+
}
|
|
2898
|
+
setSwappedFiatContext({
|
|
2899
|
+
paidAmountUsd: res.paidAmountUsd,
|
|
2900
|
+
paidAmountEur: res.paidAmountEur,
|
|
2901
|
+
onrampFeeUsd: res.onrampFeeUsd,
|
|
2902
|
+
paymentMethod: res.paymentMethod
|
|
2903
|
+
});
|
|
2904
|
+
}).catch(() => {
|
|
2905
|
+
});
|
|
2906
|
+
return () => {
|
|
2907
|
+
cancelled = true;
|
|
2908
|
+
};
|
|
2909
|
+
}, [service, smartAccount, txHash, isSwappedOrder]);
|
|
2467
2910
|
useEffect4(() => {
|
|
2468
2911
|
if (directTransfer) return;
|
|
2469
2912
|
if (state.type !== "processing") {
|
|
@@ -2492,7 +2935,7 @@ function ProcessingStep({
|
|
|
2492
2935
|
});
|
|
2493
2936
|
}
|
|
2494
2937
|
if (!isMounted) return;
|
|
2495
|
-
const awaitingPostBridgeSwap = processingContextRef.current.
|
|
2938
|
+
const awaitingPostBridgeSwap = processingContextRef.current.hasPostBridgeActions;
|
|
2496
2939
|
if (eventForCurrentTx?.type === "post-bridge-swap-complete") {
|
|
2497
2940
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
2498
2941
|
const swapTxHash = eventForCurrentTx.data?.swap?.transactionHash;
|
|
@@ -2506,6 +2949,8 @@ function ProcessingStep({
|
|
|
2506
2949
|
amount: context.amount,
|
|
2507
2950
|
sourceChain: context.sourceChain,
|
|
2508
2951
|
sourceToken: context.sourceToken,
|
|
2952
|
+
sourceDecimals: context.sourceDecimals,
|
|
2953
|
+
amountUsd: context.amountUsd,
|
|
2509
2954
|
targetChain: context.targetChain,
|
|
2510
2955
|
targetToken: context.targetToken
|
|
2511
2956
|
});
|
|
@@ -2539,22 +2984,8 @@ function ProcessingStep({
|
|
|
2539
2984
|
amount: context.amount,
|
|
2540
2985
|
sourceChain: context.sourceChain,
|
|
2541
2986
|
sourceToken: context.sourceToken,
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
});
|
|
2545
|
-
return;
|
|
2546
|
-
}
|
|
2547
|
-
if (!waitForFinalTx && eventForCurrentTx?.type === "bridge-started") {
|
|
2548
|
-
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
2549
|
-
debugLog(debug, "processing", "state:early-complete", {
|
|
2550
|
-
txHash,
|
|
2551
|
-
event: eventForCurrentTx.type
|
|
2552
|
-
});
|
|
2553
|
-
const context = processingContextRef.current;
|
|
2554
|
-
onDepositCompleteRef.current?.(txHash, void 0, {
|
|
2555
|
-
amount: context.amount,
|
|
2556
|
-
sourceChain: context.sourceChain,
|
|
2557
|
-
sourceToken: context.sourceToken,
|
|
2987
|
+
sourceDecimals: context.sourceDecimals,
|
|
2988
|
+
amountUsd: context.amountUsd,
|
|
2558
2989
|
targetChain: context.targetChain,
|
|
2559
2990
|
targetToken: context.targetToken
|
|
2560
2991
|
});
|
|
@@ -2656,7 +3087,6 @@ function ProcessingStep({
|
|
|
2656
3087
|
const isProcessing = state.type === "processing";
|
|
2657
3088
|
const lastEvent = state.lastEvent;
|
|
2658
3089
|
const failureMessage = state.type === "failed" ? state.message : void 0;
|
|
2659
|
-
const isEarlyComplete = !waitForFinalTx && lastEvent?.type === "bridge-started";
|
|
2660
3090
|
const timelineNowMs = phaseTimings.endedAt ?? Date.now();
|
|
2661
3091
|
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
|
|
2662
3092
|
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
|
|
@@ -2674,19 +3104,67 @@ function ProcessingStep({
|
|
|
2674
3104
|
displaySourceToken,
|
|
2675
3105
|
displaySourceChain
|
|
2676
3106
|
) : providedSourceDecimals ?? 18;
|
|
3107
|
+
const amountMaxDigits = maxFractionDigitsFor(sourceSymbol);
|
|
2677
3108
|
const formattedReceivedAmount = (() => {
|
|
2678
3109
|
try {
|
|
2679
3110
|
const raw = formatUnits(BigInt(displayAmount), sourceDecimals);
|
|
2680
3111
|
const numeric = Number(raw);
|
|
2681
3112
|
if (!Number.isFinite(numeric)) return raw;
|
|
2682
|
-
return numeric.toLocaleString("en-US", {
|
|
3113
|
+
return numeric.toLocaleString("en-US", {
|
|
3114
|
+
minimumFractionDigits: 2,
|
|
3115
|
+
maximumFractionDigits: amountMaxDigits
|
|
3116
|
+
});
|
|
2683
3117
|
} catch {
|
|
2684
3118
|
return Number(displayAmount).toLocaleString("en-US", {
|
|
2685
|
-
|
|
3119
|
+
minimumFractionDigits: 2,
|
|
3120
|
+
maximumFractionDigits: amountMaxDigits
|
|
2686
3121
|
});
|
|
2687
3122
|
}
|
|
2688
3123
|
})();
|
|
2689
|
-
const
|
|
3124
|
+
const destinationAmountRaw = (() => {
|
|
3125
|
+
const dest = lastEvent?.data?.destination;
|
|
3126
|
+
if (!dest || dest.amount === void 0) return void 0;
|
|
3127
|
+
try {
|
|
3128
|
+
return BigInt(dest.amount);
|
|
3129
|
+
} catch {
|
|
3130
|
+
return void 0;
|
|
3131
|
+
}
|
|
3132
|
+
})();
|
|
3133
|
+
const sourceAmountRaw = (() => {
|
|
3134
|
+
try {
|
|
3135
|
+
return BigInt(displayAmount);
|
|
3136
|
+
} catch {
|
|
3137
|
+
return void 0;
|
|
3138
|
+
}
|
|
3139
|
+
})();
|
|
3140
|
+
const bridgingCostRaw = sourceAmountRaw !== void 0 && destinationAmountRaw !== void 0 && sourceAmountRaw > destinationAmountRaw ? sourceAmountRaw - destinationAmountRaw : void 0;
|
|
3141
|
+
const formattedDestinationAmount = destinationAmountRaw !== void 0 ? (() => {
|
|
3142
|
+
try {
|
|
3143
|
+
const raw = formatUnits(destinationAmountRaw, sourceDecimals);
|
|
3144
|
+
const numeric = Number(raw);
|
|
3145
|
+
if (!Number.isFinite(numeric)) return raw;
|
|
3146
|
+
return numeric.toLocaleString("en-US", {
|
|
3147
|
+
minimumFractionDigits: 2,
|
|
3148
|
+
maximumFractionDigits: amountMaxDigits
|
|
3149
|
+
});
|
|
3150
|
+
} catch {
|
|
3151
|
+
return void 0;
|
|
3152
|
+
}
|
|
3153
|
+
})() : void 0;
|
|
3154
|
+
const formattedBridgingCost = bridgingCostRaw !== void 0 ? (() => {
|
|
3155
|
+
try {
|
|
3156
|
+
const raw = formatUnits(bridgingCostRaw, sourceDecimals);
|
|
3157
|
+
const numeric = Number(raw);
|
|
3158
|
+
if (!Number.isFinite(numeric)) return raw;
|
|
3159
|
+
return numeric.toLocaleString("en-US", {
|
|
3160
|
+
minimumFractionDigits: 2,
|
|
3161
|
+
maximumFractionDigits: amountMaxDigits
|
|
3162
|
+
});
|
|
3163
|
+
} catch {
|
|
3164
|
+
return void 0;
|
|
3165
|
+
}
|
|
3166
|
+
})() : void 0;
|
|
3167
|
+
const currentPhaseId = getCurrentPhaseId(state, phaseTimings);
|
|
2690
3168
|
const activePhaseStartedAt = currentPhaseId ? getPhaseStartTime(currentPhaseId, phaseTimings) : void 0;
|
|
2691
3169
|
const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
|
|
2692
3170
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
@@ -2702,28 +3180,28 @@ function ProcessingStep({
|
|
|
2702
3180
|
const sourceTokenIcon = getTokenIcon(sourceSymbol);
|
|
2703
3181
|
const sourceChainName = getChainName(displaySourceChain);
|
|
2704
3182
|
const targetChainName = getChainName(targetChain);
|
|
2705
|
-
const
|
|
3183
|
+
const timerText = formatTimer(elapsedSeconds);
|
|
2706
3184
|
const feeSponsored = uiConfig?.feeSponsored ?? false;
|
|
2707
3185
|
const feeTooltip = uiConfig?.feeTooltip ?? (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.");
|
|
2708
3186
|
const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
|
|
2709
3187
|
const handleRetry = onRetry ?? onNewDeposit;
|
|
2710
|
-
const headerContent = isComplete ? /* @__PURE__ */
|
|
2711
|
-
/* @__PURE__ */
|
|
2712
|
-
/* @__PURE__ */
|
|
2713
|
-
] }) : isFailed ? /* @__PURE__ */
|
|
2714
|
-
/* @__PURE__ */
|
|
2715
|
-
/* @__PURE__ */
|
|
2716
|
-
] }) : /* @__PURE__ */
|
|
2717
|
-
return /* @__PURE__ */
|
|
2718
|
-
/* @__PURE__ */
|
|
3188
|
+
const headerContent = isComplete ? /* @__PURE__ */ jsxs16("div", { className: "rs-body-header", children: [
|
|
3189
|
+
/* @__PURE__ */ jsx18(SuccessBadge, {}),
|
|
3190
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-body-header-text", children: /* @__PURE__ */ jsx18("h2", { className: "rs-body-header-title", children: stateTitle }) })
|
|
3191
|
+
] }) : isFailed ? /* @__PURE__ */ jsxs16("div", { className: "rs-body-header", children: [
|
|
3192
|
+
/* @__PURE__ */ jsx18(FailedBadge, {}),
|
|
3193
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-body-header-text", children: /* @__PURE__ */ jsx18("h2", { className: "rs-body-header-title", children: stateTitle }) })
|
|
3194
|
+
] }) : /* @__PURE__ */ jsx18(BodyHeader, { icon: /* @__PURE__ */ jsx18(WalletIcon, {}), title: stateTitle });
|
|
3195
|
+
return /* @__PURE__ */ jsxs16("div", { className: "rs-screen", children: [
|
|
3196
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2719
3197
|
headerContent,
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
/* @__PURE__ */
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
/* @__PURE__ */
|
|
2724
|
-
/* @__PURE__ */
|
|
2725
|
-
sourceChainIcon && /* @__PURE__ */
|
|
2726
|
-
sourceExplorerUrl && /* @__PURE__ */
|
|
3198
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-review-details", children: [
|
|
3199
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3200
|
+
/* @__PURE__ */ jsx18("span", { children: "Source chain" }),
|
|
3201
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3202
|
+
/* @__PURE__ */ jsx18("span", { children: sourceChainName }),
|
|
3203
|
+
sourceChainIcon && /* @__PURE__ */ jsx18("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx18("img", { src: sourceChainIcon, alt: "" }) }),
|
|
3204
|
+
isSwappedOrder && sourceExplorerUrl && /* @__PURE__ */ jsx18(
|
|
2727
3205
|
"a",
|
|
2728
3206
|
{
|
|
2729
3207
|
href: sourceExplorerUrl,
|
|
@@ -2731,17 +3209,17 @@ function ProcessingStep({
|
|
|
2731
3209
|
rel: "noopener noreferrer",
|
|
2732
3210
|
className: "rs-review-detail-link",
|
|
2733
3211
|
"aria-label": "View source transaction",
|
|
2734
|
-
children: /* @__PURE__ */
|
|
3212
|
+
children: /* @__PURE__ */ jsx18(ExternalLinkIcon, {})
|
|
2735
3213
|
}
|
|
2736
3214
|
)
|
|
2737
3215
|
] })
|
|
2738
3216
|
] }),
|
|
2739
|
-
/* @__PURE__ */
|
|
2740
|
-
/* @__PURE__ */
|
|
2741
|
-
/* @__PURE__ */
|
|
2742
|
-
/* @__PURE__ */
|
|
2743
|
-
targetChainIcon && /* @__PURE__ */
|
|
2744
|
-
destExplorerUrl && /* @__PURE__ */
|
|
3217
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3218
|
+
/* @__PURE__ */ jsx18("span", { children: "Destination chain" }),
|
|
3219
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3220
|
+
/* @__PURE__ */ jsx18("span", { children: targetChainName }),
|
|
3221
|
+
targetChainIcon && /* @__PURE__ */ jsx18("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx18("img", { src: targetChainIcon, alt: "" }) }),
|
|
3222
|
+
isSwappedOrder && destExplorerUrl && /* @__PURE__ */ jsx18(
|
|
2745
3223
|
"a",
|
|
2746
3224
|
{
|
|
2747
3225
|
href: destExplorerUrl,
|
|
@@ -2749,83 +3227,147 @@ function ProcessingStep({
|
|
|
2749
3227
|
rel: "noopener noreferrer",
|
|
2750
3228
|
className: "rs-review-detail-link",
|
|
2751
3229
|
"aria-label": "View destination transaction",
|
|
2752
|
-
children: /* @__PURE__ */
|
|
3230
|
+
children: /* @__PURE__ */ jsx18(ExternalLinkIcon, {})
|
|
2753
3231
|
}
|
|
2754
3232
|
)
|
|
2755
3233
|
] })
|
|
2756
3234
|
] }),
|
|
2757
|
-
/* @__PURE__ */
|
|
2758
|
-
/* @__PURE__ */
|
|
2759
|
-
/* @__PURE__ */
|
|
3235
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3236
|
+
/* @__PURE__ */ jsx18("span", { children: isProcessing ? "Time elapsed" : "Total time" }),
|
|
3237
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-review-detail-value", children: /* @__PURE__ */ jsx18(Ticker, { value: timerText }) })
|
|
2760
3238
|
] }),
|
|
2761
|
-
/* @__PURE__ */
|
|
2762
|
-
/* @__PURE__ */
|
|
2763
|
-
|
|
2764
|
-
/* @__PURE__ */
|
|
3239
|
+
isSwappedOrder ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
3240
|
+
swappedFiatContext?.paidAmountUsd != null && /* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3241
|
+
/* @__PURE__ */ jsx18("span", { children: "You pay" }),
|
|
3242
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3243
|
+
"$",
|
|
3244
|
+
swappedFiatContext.paidAmountUsd.toFixed(2),
|
|
3245
|
+
swappedFiatContext.paymentMethod && /* @__PURE__ */ jsxs16("span", { style: { color: "#71717b", marginLeft: 6 }, children: [
|
|
3246
|
+
"via",
|
|
3247
|
+
" ",
|
|
3248
|
+
formatPaymentMethod(swappedFiatContext.paymentMethod)
|
|
3249
|
+
] })
|
|
3250
|
+
] })
|
|
3251
|
+
] }),
|
|
3252
|
+
swappedFiatContext?.onrampFeeUsd != null && /* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3253
|
+
/* @__PURE__ */ jsx18("span", { children: "On-ramp fee" }),
|
|
3254
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3255
|
+
"$",
|
|
3256
|
+
swappedFiatContext.onrampFeeUsd.toFixed(2)
|
|
3257
|
+
] })
|
|
3258
|
+
] }),
|
|
3259
|
+
formattedBridgingCost && /* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3260
|
+
/* @__PURE__ */ jsx18("span", { children: "Bridging cost" }),
|
|
3261
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3262
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
3263
|
+
formattedBridgingCost,
|
|
3264
|
+
" ",
|
|
3265
|
+
sourceSymbol
|
|
3266
|
+
] }),
|
|
3267
|
+
sourceTokenIcon && /* @__PURE__ */ jsx18("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx18("img", { src: sourceTokenIcon, alt: "" }) })
|
|
3268
|
+
] })
|
|
3269
|
+
] })
|
|
3270
|
+
] }) : /* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3271
|
+
/* @__PURE__ */ jsx18("span", { children: isProcessing ? "You send" : "You sent" }),
|
|
3272
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3273
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
2765
3274
|
formattedReceivedAmount,
|
|
2766
3275
|
" ",
|
|
2767
3276
|
sourceSymbol
|
|
2768
3277
|
] }),
|
|
2769
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
3278
|
+
sourceTokenIcon && /* @__PURE__ */ jsx18("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx18("img", { src: sourceTokenIcon, alt: "" }) })
|
|
2770
3279
|
] })
|
|
2771
3280
|
] }),
|
|
2772
|
-
/* @__PURE__ */
|
|
2773
|
-
/* @__PURE__ */
|
|
2774
|
-
/* @__PURE__ */
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
|
|
2777
|
-
formattedReceivedAmount,
|
|
2778
|
-
" ",
|
|
2779
|
-
targetSymbol
|
|
2780
|
-
] }),
|
|
2781
|
-
targetTokenIcon && /* @__PURE__ */ jsx12("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx12("img", { src: targetTokenIcon, alt: "" }) })
|
|
3281
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3282
|
+
/* @__PURE__ */ jsx18("span", { children: isProcessing ? "Receive" : "Received" }),
|
|
3283
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3284
|
+
/* @__PURE__ */ jsx18("span", { children: formattedDestinationAmount ? `${formattedDestinationAmount} ${targetSymbol}` : `~${formattedReceivedAmount} ${targetSymbol}` }),
|
|
3285
|
+
targetTokenIcon && /* @__PURE__ */ jsx18("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx18("img", { src: targetTokenIcon, alt: "" }) })
|
|
2782
3286
|
] })
|
|
2783
3287
|
] }),
|
|
2784
|
-
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */
|
|
2785
|
-
/* @__PURE__ */
|
|
2786
|
-
/* @__PURE__ */
|
|
3288
|
+
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3289
|
+
/* @__PURE__ */ jsx18("span", { children: "Balance" }),
|
|
3290
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
2787
3291
|
"$",
|
|
2788
3292
|
balanceAfterUsd.toFixed(2)
|
|
2789
3293
|
] })
|
|
2790
3294
|
] }),
|
|
2791
|
-
/* @__PURE__ */
|
|
2792
|
-
/* @__PURE__ */
|
|
2793
|
-
/* @__PURE__ */
|
|
2794
|
-
/* @__PURE__ */
|
|
3295
|
+
isSwappedOrder ? quotedFeeAmount !== void 0 && /* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3296
|
+
/* @__PURE__ */ jsx18("span", { children: "Fees" }),
|
|
3297
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3298
|
+
/* @__PURE__ */ jsxs16(
|
|
2795
3299
|
"span",
|
|
2796
3300
|
{
|
|
2797
3301
|
style: feeSponsored ? { textDecoration: "line-through" } : void 0,
|
|
2798
|
-
children:
|
|
3302
|
+
children: [
|
|
3303
|
+
quotedFeeAmount,
|
|
3304
|
+
" ",
|
|
3305
|
+
quotedFeeSymbol ?? sourceSymbol
|
|
3306
|
+
]
|
|
2799
3307
|
}
|
|
2800
3308
|
),
|
|
2801
|
-
/* @__PURE__ */
|
|
3309
|
+
/* @__PURE__ */ jsx18(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx18(
|
|
3310
|
+
"span",
|
|
3311
|
+
{
|
|
3312
|
+
className: "rs-review-detail-info",
|
|
3313
|
+
"aria-label": "Fee info",
|
|
3314
|
+
children: /* @__PURE__ */ jsx18(InfoIcon, {})
|
|
3315
|
+
}
|
|
3316
|
+
) })
|
|
2802
3317
|
] })
|
|
2803
|
-
] })
|
|
3318
|
+
] }) : (() => {
|
|
3319
|
+
const feeValue = quotedFeeAmount ?? formattedBridgingCost;
|
|
3320
|
+
if (feeValue === void 0) return null;
|
|
3321
|
+
return /* @__PURE__ */ jsxs16("div", { className: "rs-review-detail-row", children: [
|
|
3322
|
+
/* @__PURE__ */ jsx18("span", { children: "Fees" }),
|
|
3323
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-review-detail-value", children: [
|
|
3324
|
+
/* @__PURE__ */ jsxs16(
|
|
3325
|
+
"span",
|
|
3326
|
+
{
|
|
3327
|
+
style: feeSponsored ? { textDecoration: "line-through" } : void 0,
|
|
3328
|
+
children: [
|
|
3329
|
+
feeValue,
|
|
3330
|
+
" ",
|
|
3331
|
+
quotedFeeSymbol ?? sourceSymbol
|
|
3332
|
+
]
|
|
3333
|
+
}
|
|
3334
|
+
),
|
|
3335
|
+
/* @__PURE__ */ jsx18(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx18(
|
|
3336
|
+
"span",
|
|
3337
|
+
{
|
|
3338
|
+
className: "rs-review-detail-info",
|
|
3339
|
+
"aria-label": "Fee info",
|
|
3340
|
+
children: /* @__PURE__ */ jsx18(InfoIcon, {})
|
|
3341
|
+
}
|
|
3342
|
+
) })
|
|
3343
|
+
] })
|
|
3344
|
+
] });
|
|
3345
|
+
})()
|
|
2804
3346
|
] }),
|
|
2805
|
-
isFailed && failureMessage && /* @__PURE__ */
|
|
2806
|
-
isProcessing && /* @__PURE__ */
|
|
3347
|
+
isFailed && failureMessage && /* @__PURE__ */ jsx18(Callout, { variant: "error", children: failureMessage }),
|
|
3348
|
+
isProcessing && /* @__PURE__ */ jsx18(
|
|
2807
3349
|
Button,
|
|
2808
3350
|
{
|
|
2809
3351
|
fullWidth: true,
|
|
2810
3352
|
disabled: true,
|
|
2811
3353
|
loading: true,
|
|
2812
|
-
loadingText: "Submitting transaction
|
|
2813
|
-
children: "Submitting transaction
|
|
3354
|
+
loadingText: "Submitting transaction\u2026",
|
|
3355
|
+
children: "Submitting transaction\u2026"
|
|
2814
3356
|
}
|
|
2815
3357
|
),
|
|
2816
|
-
isComplete && /* @__PURE__ */
|
|
2817
|
-
onNewDeposit && /* @__PURE__ */
|
|
3358
|
+
isComplete && /* @__PURE__ */ jsxs16("div", { className: "rs-screen-button-row", children: [
|
|
3359
|
+
onNewDeposit && /* @__PURE__ */ jsxs16(Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
|
|
2818
3360
|
"New ",
|
|
2819
3361
|
flowNoun
|
|
2820
3362
|
] }),
|
|
2821
|
-
onClose && /* @__PURE__ */
|
|
3363
|
+
onClose && /* @__PURE__ */ jsx18(Button, { onClick: onClose, fullWidth: true, children: "Done" })
|
|
2822
3364
|
] }),
|
|
2823
|
-
isFailed && /* @__PURE__ */
|
|
2824
|
-
onClose && /* @__PURE__ */
|
|
2825
|
-
handleRetry && /* @__PURE__ */
|
|
3365
|
+
isFailed && /* @__PURE__ */ jsxs16("div", { className: "rs-screen-button-row", children: [
|
|
3366
|
+
onClose && /* @__PURE__ */ jsx18(Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
|
|
3367
|
+
handleRetry && /* @__PURE__ */ jsx18(Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
|
|
2826
3368
|
] })
|
|
2827
3369
|
] }),
|
|
2828
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ jsx18(PoweredBy, {})
|
|
2829
3371
|
] });
|
|
2830
3372
|
}
|
|
2831
3373
|
|
|
@@ -3114,22 +3656,6 @@ async function buildSafeTransaction(params) {
|
|
|
3114
3656
|
};
|
|
3115
3657
|
}
|
|
3116
3658
|
|
|
3117
|
-
// src/core/public-client.ts
|
|
3118
|
-
import { createPublicClient, http } from "viem";
|
|
3119
|
-
var clientCache = /* @__PURE__ */ new Map();
|
|
3120
|
-
function getPublicClient(chainId) {
|
|
3121
|
-
let client = clientCache.get(chainId);
|
|
3122
|
-
if (!client) {
|
|
3123
|
-
const chain = CHAIN_BY_ID[chainId];
|
|
3124
|
-
client = createPublicClient({
|
|
3125
|
-
chain,
|
|
3126
|
-
transport: http()
|
|
3127
|
-
});
|
|
3128
|
-
clientCache.set(chainId, client);
|
|
3129
|
-
}
|
|
3130
|
-
return client;
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
3659
|
// src/core/session-owner.ts
|
|
3134
3660
|
import { isAddress } from "viem";
|
|
3135
3661
|
import {
|
|
@@ -3188,6 +3714,7 @@ export {
|
|
|
3188
3714
|
ChevronLeftIcon,
|
|
3189
3715
|
ChevronDownIcon,
|
|
3190
3716
|
CloseIcon,
|
|
3717
|
+
HandCoinsIcon,
|
|
3191
3718
|
HistoryIcon,
|
|
3192
3719
|
InfoIcon,
|
|
3193
3720
|
CopyIcon,
|
|
@@ -3197,18 +3724,16 @@ export {
|
|
|
3197
3724
|
ClockIcon,
|
|
3198
3725
|
PlusCircleIcon,
|
|
3199
3726
|
CircleArrowOutUpLeftIcon,
|
|
3727
|
+
BankIcon,
|
|
3728
|
+
Callout,
|
|
3200
3729
|
BodyHeader,
|
|
3201
3730
|
PoweredBy,
|
|
3202
3731
|
Spinner,
|
|
3203
3732
|
ConnectStep,
|
|
3733
|
+
useLatestRef,
|
|
3204
3734
|
Button,
|
|
3205
|
-
Callout,
|
|
3206
3735
|
debugLog,
|
|
3207
3736
|
debugError,
|
|
3208
|
-
toEvmCaip2,
|
|
3209
|
-
targetChainToCaip2,
|
|
3210
|
-
parseEvmChainId,
|
|
3211
|
-
isSolanaCaip2,
|
|
3212
3737
|
getAssetId,
|
|
3213
3738
|
portfolioToAssets,
|
|
3214
3739
|
isNativeAsset,
|
|
@@ -3220,15 +3745,18 @@ export {
|
|
|
3220
3745
|
formatUserError,
|
|
3221
3746
|
Tooltip,
|
|
3222
3747
|
getEventTxHash,
|
|
3748
|
+
getEventSourceDetails,
|
|
3223
3749
|
isDepositEvent,
|
|
3750
|
+
isFailedEvent,
|
|
3224
3751
|
txRefsMatch,
|
|
3225
|
-
|
|
3752
|
+
failureMessageForEvent,
|
|
3226
3753
|
ProcessingStep,
|
|
3227
3754
|
SAFE_ABI,
|
|
3228
3755
|
executeSafeEthTransfer,
|
|
3229
3756
|
executeSafeErc20Transfer,
|
|
3230
3757
|
buildSafeTransaction,
|
|
3231
3758
|
getPublicClient,
|
|
3759
|
+
getHyperEvmReadClient,
|
|
3232
3760
|
loadSessionOwnerFromStorage,
|
|
3233
3761
|
saveSessionOwnerToStorage,
|
|
3234
3762
|
createSessionOwnerKey,
|