@rhinestone/deposit-modal 0.3.0-alpha.7 → 0.3.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-42D5V5II.mjs → DepositModalReown-I7I3KLD2.mjs} +4 -4
- package/dist/{DepositModalReown-ABLVMYFL.cjs → DepositModalReown-XUA47RYZ.cjs} +7 -7
- package/dist/{QRCode-SMMYPUQC.cjs → QRCode-KG47KTGX.cjs} +1 -1
- package/dist/{QRCode-YMQTKSSK.mjs → QRCode-YJ3EGWQS.mjs} +1 -1
- package/dist/{WithdrawModalReown-FJP3XTQ5.cjs → WithdrawModalReown-JATYMQYP.cjs} +7 -7
- package/dist/{WithdrawModalReown-EVHN5NOF.mjs → WithdrawModalReown-KN2DGOXR.mjs} +4 -4
- package/dist/{chunk-44IFH7DZ.mjs → chunk-4BUMVXPS.mjs} +9 -6
- package/dist/{chunk-MHKHSCIA.cjs → chunk-7JIDIX27.cjs} +1 -1
- package/dist/{chunk-CPXERFGC.cjs → chunk-G5Q4QBWX.cjs} +93 -93
- package/dist/{chunk-3FHYC3K7.mjs → chunk-KE4MRCFN.mjs} +3 -3
- package/dist/{chunk-YQFH2WSW.cjs → chunk-KIPKYPNF.cjs} +54 -14
- package/dist/{chunk-ENMIKNXS.cjs → chunk-MMXUBBGK.cjs} +123 -96
- package/dist/{chunk-5YXAQB6A.mjs → chunk-OISMGA2L.mjs} +56 -16
- package/dist/{chunk-UCZXBHLH.mjs → chunk-SZIYS42B.mjs} +1 -1
- package/dist/{chunk-7VKAUBZ7.mjs → chunk-TJG2AFPS.mjs} +99 -72
- package/dist/{chunk-LEVCOJD6.cjs → chunk-ZVG4JDKZ.cjs} +254 -251
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +6 -6
- package/dist/index.mjs +5 -5
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.mjs +3 -3
- package/package.json +5 -5
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkMMXUBBGKcjs = require('./chunk-MMXUBBGK.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunk7JIDIX27cjs = require('./chunk-7JIDIX27.cjs');
|
|
8
|
+
|
|
9
|
+
// src/core/reown.tsx
|
|
2
10
|
var _react = require('react');
|
|
3
11
|
var _reactquery = require('@tanstack/react-query');
|
|
4
12
|
var _appkitadapterwagmi = require('@reown/appkit-adapter-wagmi');
|
|
@@ -11,26 +19,47 @@ var _wagmi = require('wagmi');
|
|
|
11
19
|
|
|
12
20
|
|
|
13
21
|
|
|
22
|
+
|
|
14
23
|
var _react3 = require('@reown/appkit/react');
|
|
24
|
+
var _networks = require('@reown/appkit/networks');
|
|
15
25
|
|
|
16
26
|
|
|
27
|
+
// src/core/reown-networks.ts
|
|
17
28
|
|
|
18
29
|
|
|
19
30
|
|
|
20
31
|
|
|
21
32
|
|
|
22
33
|
|
|
23
|
-
var _networks = require('@reown/appkit/networks');
|
|
24
34
|
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
var APPKIT_NETWORK_BY_ID = {
|
|
39
|
+
[_networks.mainnet.id]: _networks.mainnet,
|
|
40
|
+
[_networks.optimism.id]: _networks.optimism,
|
|
41
|
+
[_networks.polygon.id]: _networks.polygon,
|
|
42
|
+
[_networks.arbitrum.id]: _networks.arbitrum,
|
|
43
|
+
[_networks.base.id]: _networks.base,
|
|
44
|
+
[_networks.bsc.id]: _networks.bsc,
|
|
45
|
+
[_networks.soneium.id]: _networks.soneium,
|
|
46
|
+
[_networks.plasma.id]: _networks.plasma
|
|
47
|
+
};
|
|
48
|
+
var EVM_NETWORKS = _chunk7JIDIX27cjs.SUPPORTED_CHAINS.map((chain) => {
|
|
49
|
+
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
50
|
+
if (!network) {
|
|
51
|
+
throw new Error(
|
|
52
|
+
`[rhinestone] No AppKit network registered for supported chain ${chain.id} (${chain.name}). Add it to APPKIT_NETWORK_BY_ID in reown-networks.ts.`
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return network;
|
|
56
|
+
});
|
|
57
|
+
function getAppKitNetwork(chainId) {
|
|
58
|
+
return APPKIT_NETWORK_BY_ID[chainId];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/core/reown.tsx
|
|
25
62
|
var _jsxruntime = require('react/jsx-runtime');
|
|
26
|
-
var EVM_NETWORKS = [
|
|
27
|
-
_networks.mainnet,
|
|
28
|
-
_networks.base,
|
|
29
|
-
_networks.arbitrum,
|
|
30
|
-
_networks.optimism,
|
|
31
|
-
_networks.polygon,
|
|
32
|
-
_networks.bsc
|
|
33
|
-
];
|
|
34
63
|
var cachedAdapter = null;
|
|
35
64
|
var cachedAdapterKey = null;
|
|
36
65
|
function mapTheme(theme) {
|
|
@@ -94,6 +123,7 @@ function useReownWallet() {
|
|
|
94
123
|
const { walletInfo } = _react3.useWalletInfo.call(void 0, );
|
|
95
124
|
const { data: walletClient } = _wagmi.useWalletClient.call(void 0, );
|
|
96
125
|
const publicClient = _wagmi.usePublicClient.call(void 0, );
|
|
126
|
+
const { switchNetwork } = _react3.useAppKitNetwork.call(void 0, );
|
|
97
127
|
const { switchChainAsync } = _wagmi.useSwitchChain.call(void 0, );
|
|
98
128
|
const isSolana = _nullishCoalesce(_optionalChain([caipAddress, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("solana:")]), () => ( false));
|
|
99
129
|
const solanaAddress = isSolana ? _optionalChain([caipAddress, 'optionalAccess', _5 => _5.split, 'call', _6 => _6(":"), 'access', _7 => _7.slice, 'call', _8 => _8(2), 'access', _9 => _9.join, 'call', _10 => _10(":")]) : void 0;
|
|
@@ -116,11 +146,21 @@ function useReownWallet() {
|
|
|
116
146
|
void _optionalChain([_react3.modal, 'optionalAccess', _12 => _12.disconnect, 'call', _13 => _13()]);
|
|
117
147
|
},
|
|
118
148
|
switchChain: async (chainId) => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
149
|
+
const target = getAppKitNetwork(chainId);
|
|
150
|
+
try {
|
|
151
|
+
if (target) {
|
|
152
|
+
await switchNetwork(target);
|
|
153
|
+
} else {
|
|
154
|
+
await switchChainAsync({ chainId });
|
|
155
|
+
}
|
|
156
|
+
} catch (err) {
|
|
157
|
+
if (_chunkMMXUBBGKcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
158
|
+
throw new Error(
|
|
159
|
+
`Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, chainId)} in your wallet to continue`
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
throw err;
|
|
122
163
|
}
|
|
123
|
-
await switchChainAsync({ chainId });
|
|
124
164
|
}
|
|
125
165
|
};
|
|
126
166
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk7JIDIX27cjs = require('./chunk-7JIDIX27.cjs');
|
|
15
15
|
|
|
16
16
|
// src/components/ui/Modal.tsx
|
|
17
17
|
|
|
@@ -881,7 +881,7 @@ function createDepositService(baseUrl, options) {
|
|
|
881
881
|
},
|
|
882
882
|
async checkLiquidity(params) {
|
|
883
883
|
if (params.destinationChainId === "solana") {
|
|
884
|
-
const token =
|
|
884
|
+
const token = _chunk7JIDIX27cjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
|
|
885
885
|
return {
|
|
886
886
|
hasLiquidity: true,
|
|
887
887
|
symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _23 => _23.symbol]), () => ( "Token")),
|
|
@@ -990,14 +990,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
990
990
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _28 => _28.balance, 'optionalAccess', _29 => _29.unlocked]), () => ( "0"));
|
|
991
991
|
const normalizedName = tokenData.tokenName.trim();
|
|
992
992
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
993
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
994
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
993
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunk7JIDIX27cjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
994
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunk7JIDIX27cjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
995
995
|
if (!resolvedTokenAddress) {
|
|
996
996
|
continue;
|
|
997
997
|
}
|
|
998
|
-
const registrySymbol =
|
|
998
|
+
const registrySymbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
999
999
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
1000
|
-
const decimals = registrySymbol !== "Token" ?
|
|
1000
|
+
const decimals = registrySymbol !== "Token" ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
1001
1001
|
tokens.push({
|
|
1002
1002
|
chainId: chainBalance.chainId,
|
|
1003
1003
|
address: resolvedTokenAddress,
|
|
@@ -1026,14 +1026,14 @@ function normalizeDirectToken(token) {
|
|
|
1026
1026
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
1027
1027
|
token.token,
|
|
1028
1028
|
"address"
|
|
1029
|
-
))), () => ( (typeof chainId === "number" ?
|
|
1029
|
+
))), () => ( (typeof chainId === "number" ? _chunk7JIDIX27cjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
|
|
1030
1030
|
if (!address) return null;
|
|
1031
1031
|
const balanceUsd = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractNumber(token, "balanceUsd"), () => ( extractNumber(token, "usdValue"))), () => ( extractNumber(token, "valueUsd"))), () => ( extractNumericString(token, "balanceUsd"))), () => ( extractNumericString(token, "usdValue"))), () => ( extractNumericString(token, "valueUsd"))), () => ( 0));
|
|
1032
1032
|
const isSolanaToken = chainId === "solana";
|
|
1033
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
1033
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, address, chainId);
|
|
1034
1034
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
1035
1035
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
1036
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
1036
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
1037
1037
|
return {
|
|
1038
1038
|
chainId,
|
|
1039
1039
|
address,
|
|
@@ -1073,6 +1073,78 @@ function extractNumericString(data, key) {
|
|
|
1073
1073
|
return Number.isFinite(parsed) ? parsed : null;
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
|
+
// src/core/formatters.ts
|
|
1077
|
+
var currencyFormatter = new Intl.NumberFormat("en-US", {
|
|
1078
|
+
style: "currency",
|
|
1079
|
+
currency: "USD",
|
|
1080
|
+
maximumFractionDigits: 2
|
|
1081
|
+
});
|
|
1082
|
+
var tokenFormatter = new Intl.NumberFormat("en-US", {
|
|
1083
|
+
minimumFractionDigits: 2,
|
|
1084
|
+
maximumFractionDigits: 5
|
|
1085
|
+
});
|
|
1086
|
+
function isUnsupportedChainSwitchError(error) {
|
|
1087
|
+
if (!error) return false;
|
|
1088
|
+
const name = error instanceof Error ? error.name : "";
|
|
1089
|
+
const message = (error instanceof Error ? error.message : String(error)).toLowerCase();
|
|
1090
|
+
return name === "SwitchChainNotSupportedError" || message.includes("does not support programmatic chain switching") || message.includes("switch chain not supported") || message.includes("method not found") || message.includes("does not exist") || message.includes("is not available");
|
|
1091
|
+
}
|
|
1092
|
+
function formatUserError(raw) {
|
|
1093
|
+
const lower = raw.toLowerCase();
|
|
1094
|
+
if (lower.includes("user rejected") || lower.includes("user denied")) {
|
|
1095
|
+
return "Transaction cancelled";
|
|
1096
|
+
}
|
|
1097
|
+
if (lower.includes("insufficient funds")) {
|
|
1098
|
+
return "Insufficient funds for this transaction";
|
|
1099
|
+
}
|
|
1100
|
+
if (lower.includes("nonce too low") || lower.includes("nonce too high")) {
|
|
1101
|
+
return "Transaction conflict \u2014 please try again";
|
|
1102
|
+
}
|
|
1103
|
+
if (lower.includes("execution reverted")) {
|
|
1104
|
+
return "Transaction would fail on-chain";
|
|
1105
|
+
}
|
|
1106
|
+
if (lower.includes("timed out") || lower.includes("took too long")) {
|
|
1107
|
+
return "Request timed out \u2014 please try again";
|
|
1108
|
+
}
|
|
1109
|
+
if (lower.includes("econnrefused") || lower.includes("econnreset") || lower.includes("enotfound") || lower.includes("fetch failed")) {
|
|
1110
|
+
return "Service unavailable \u2014 please try again";
|
|
1111
|
+
}
|
|
1112
|
+
if (lower.includes("recent blockhash") || lower.includes("latest blockhash")) {
|
|
1113
|
+
return "Solana RPC unavailable \u2014 please retry";
|
|
1114
|
+
}
|
|
1115
|
+
if (lower.includes("network") || lower.includes("disconnected")) {
|
|
1116
|
+
return "Network error \u2014 check your connection";
|
|
1117
|
+
}
|
|
1118
|
+
if (lower.includes("rate limit") || lower.includes("429")) {
|
|
1119
|
+
return "Rate limited \u2014 please try again shortly";
|
|
1120
|
+
}
|
|
1121
|
+
let cleaned = raw;
|
|
1122
|
+
const stripMarkers = [
|
|
1123
|
+
"\n\nRequest Arguments:",
|
|
1124
|
+
"\nRaw Call Arguments:",
|
|
1125
|
+
"\nRequest body:",
|
|
1126
|
+
"\nContract Call:",
|
|
1127
|
+
"\nDocs:",
|
|
1128
|
+
"\nDetails:",
|
|
1129
|
+
"\nVersion:",
|
|
1130
|
+
"\nURL:"
|
|
1131
|
+
];
|
|
1132
|
+
for (const marker of stripMarkers) {
|
|
1133
|
+
const idx = cleaned.indexOf(marker);
|
|
1134
|
+
if (idx !== -1) {
|
|
1135
|
+
cleaned = cleaned.slice(0, idx).trim();
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
cleaned = cleaned.replace(/https?:\/\/\S+/g, "").trim();
|
|
1139
|
+
if (cleaned.length === 0) {
|
|
1140
|
+
return "An unexpected error occurred";
|
|
1141
|
+
}
|
|
1142
|
+
if (cleaned.length > 120) {
|
|
1143
|
+
return cleaned.slice(0, 120) + "...";
|
|
1144
|
+
}
|
|
1145
|
+
return cleaned;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1076
1148
|
// src/core/useLatestRef.ts
|
|
1077
1149
|
|
|
1078
1150
|
function useLatestRef(value) {
|
|
@@ -1714,8 +1786,8 @@ function ConnectStep({
|
|
|
1714
1786
|
const hasReownWallet = rows.some(
|
|
1715
1787
|
(row) => row.kind === "external" || row.kind === "solana"
|
|
1716
1788
|
);
|
|
1717
|
-
const showDappImports =
|
|
1718
|
-
const extraChainCount = Math.max(0,
|
|
1789
|
+
const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _62 => _62.length]), () => ( 0))) > 0;
|
|
1790
|
+
const extraChainCount = Math.max(0, _chunk7JIDIX27cjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
1719
1791
|
const chainBadge2 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1720
1792
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
1721
1793
|
extraChainCount > 0 ? `+${extraChainCount} chains` : "All chains"
|
|
@@ -1747,7 +1819,6 @@ function ConnectStep({
|
|
|
1747
1819
|
rows.map((row) => {
|
|
1748
1820
|
const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
|
|
1749
1821
|
const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? _nullishCoalesce(row.errorReason, () => ( "Couldn't prepare wallet \u2014 tap to retry")) : shorten(row.address);
|
|
1750
|
-
const showInlineDisconnect = Boolean(onSelectTransferCrypto) && Boolean(onDisconnect) && row.state !== "loading";
|
|
1751
1822
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1752
1823
|
ListRow,
|
|
1753
1824
|
{
|
|
@@ -1756,8 +1827,7 @@ function ConnectStep({
|
|
|
1756
1827
|
subtitle: subtitleText,
|
|
1757
1828
|
onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _63 => _63(row.id)]),
|
|
1758
1829
|
disabled: row.state === "loading",
|
|
1759
|
-
trailing: renderRowTrailing(row.state)
|
|
1760
|
-
action: showInlineDisconnect && onDisconnect ? { label: "Disconnect", onClick: onDisconnect } : void 0
|
|
1830
|
+
trailing: renderRowTrailing(row.state)
|
|
1761
1831
|
},
|
|
1762
1832
|
row.id
|
|
1763
1833
|
);
|
|
@@ -1776,7 +1846,20 @@ function ConnectStep({
|
|
|
1776
1846
|
}
|
|
1777
1847
|
),
|
|
1778
1848
|
showDappImports && _optionalChain([dappImports, 'optionalAccess', _64 => _64.map, 'call', _65 => _65((row) => {
|
|
1779
|
-
if (
|
|
1849
|
+
if (!hasReownWallet) {
|
|
1850
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1851
|
+
ListRow,
|
|
1852
|
+
{
|
|
1853
|
+
leading: row.icon,
|
|
1854
|
+
title: row.label,
|
|
1855
|
+
subtitle: "Connect wallet to view balance",
|
|
1856
|
+
onClick: handleConnect,
|
|
1857
|
+
disabled: !handleConnect
|
|
1858
|
+
},
|
|
1859
|
+
row.id
|
|
1860
|
+
);
|
|
1861
|
+
}
|
|
1862
|
+
if (row.status === "loading" || row.status === "needs-connect") {
|
|
1780
1863
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1781
1864
|
ListRow,
|
|
1782
1865
|
{
|
|
@@ -1826,77 +1909,20 @@ function ConnectStep({
|
|
|
1826
1909
|
})])
|
|
1827
1910
|
] })
|
|
1828
1911
|
] }),
|
|
1912
|
+
onDisconnect && hasReownWallet && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-tight-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1913
|
+
"button",
|
|
1914
|
+
{
|
|
1915
|
+
type: "button",
|
|
1916
|
+
className: "rs-connect-wallet-manage",
|
|
1917
|
+
onClick: onDisconnect,
|
|
1918
|
+
children: "Disconnect wallet"
|
|
1919
|
+
}
|
|
1920
|
+
) }),
|
|
1829
1921
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PoweredBy, {})
|
|
1830
1922
|
] });
|
|
1831
1923
|
}
|
|
1832
1924
|
ConnectStep.displayName = "ConnectStep";
|
|
1833
1925
|
|
|
1834
|
-
// src/core/formatters.ts
|
|
1835
|
-
var currencyFormatter = new Intl.NumberFormat("en-US", {
|
|
1836
|
-
style: "currency",
|
|
1837
|
-
currency: "USD",
|
|
1838
|
-
maximumFractionDigits: 2
|
|
1839
|
-
});
|
|
1840
|
-
var tokenFormatter = new Intl.NumberFormat("en-US", {
|
|
1841
|
-
minimumFractionDigits: 2,
|
|
1842
|
-
maximumFractionDigits: 5
|
|
1843
|
-
});
|
|
1844
|
-
function formatUserError(raw) {
|
|
1845
|
-
const lower = raw.toLowerCase();
|
|
1846
|
-
if (lower.includes("user rejected") || lower.includes("user denied")) {
|
|
1847
|
-
return "Transaction cancelled";
|
|
1848
|
-
}
|
|
1849
|
-
if (lower.includes("insufficient funds")) {
|
|
1850
|
-
return "Insufficient funds for this transaction";
|
|
1851
|
-
}
|
|
1852
|
-
if (lower.includes("nonce too low") || lower.includes("nonce too high")) {
|
|
1853
|
-
return "Transaction conflict \u2014 please try again";
|
|
1854
|
-
}
|
|
1855
|
-
if (lower.includes("execution reverted")) {
|
|
1856
|
-
return "Transaction would fail on-chain";
|
|
1857
|
-
}
|
|
1858
|
-
if (lower.includes("timed out") || lower.includes("took too long")) {
|
|
1859
|
-
return "Request timed out \u2014 please try again";
|
|
1860
|
-
}
|
|
1861
|
-
if (lower.includes("econnrefused") || lower.includes("econnreset") || lower.includes("enotfound") || lower.includes("fetch failed")) {
|
|
1862
|
-
return "Service unavailable \u2014 please try again";
|
|
1863
|
-
}
|
|
1864
|
-
if (lower.includes("recent blockhash") || lower.includes("latest blockhash")) {
|
|
1865
|
-
return "Solana RPC unavailable \u2014 please retry";
|
|
1866
|
-
}
|
|
1867
|
-
if (lower.includes("network") || lower.includes("disconnected")) {
|
|
1868
|
-
return "Network error \u2014 check your connection";
|
|
1869
|
-
}
|
|
1870
|
-
if (lower.includes("rate limit") || lower.includes("429")) {
|
|
1871
|
-
return "Rate limited \u2014 please try again shortly";
|
|
1872
|
-
}
|
|
1873
|
-
let cleaned = raw;
|
|
1874
|
-
const stripMarkers = [
|
|
1875
|
-
"\n\nRequest Arguments:",
|
|
1876
|
-
"\nRaw Call Arguments:",
|
|
1877
|
-
"\nRequest body:",
|
|
1878
|
-
"\nContract Call:",
|
|
1879
|
-
"\nDocs:",
|
|
1880
|
-
"\nDetails:",
|
|
1881
|
-
"\nVersion:",
|
|
1882
|
-
"\nURL:"
|
|
1883
|
-
];
|
|
1884
|
-
for (const marker of stripMarkers) {
|
|
1885
|
-
const idx = cleaned.indexOf(marker);
|
|
1886
|
-
if (idx !== -1) {
|
|
1887
|
-
cleaned = cleaned.slice(0, idx).trim();
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
cleaned = cleaned.replace(/https?:\/\/\S+/g, "").trim();
|
|
1891
|
-
if (cleaned.length === 0) {
|
|
1892
|
-
return "An unexpected error occurred";
|
|
1893
|
-
}
|
|
1894
|
-
if (cleaned.length > 120) {
|
|
1895
|
-
return cleaned.slice(0, 120) + "...";
|
|
1896
|
-
}
|
|
1897
|
-
return cleaned;
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
1926
|
// src/components/steps/ProcessingStep.tsx
|
|
1901
1927
|
|
|
1902
1928
|
var _viem = require('viem');
|
|
@@ -2660,11 +2686,11 @@ function ProcessingStep({
|
|
|
2660
2686
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
2661
2687
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
2662
2688
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
2663
|
-
const sourceExplorerUrl =
|
|
2664
|
-
const destExplorerUrl = destinationTxHash ?
|
|
2689
|
+
const sourceExplorerUrl = _chunk7JIDIX27cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
2690
|
+
const destExplorerUrl = destinationTxHash ? _chunk7JIDIX27cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
2665
2691
|
const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
|
|
2666
|
-
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ?
|
|
2667
|
-
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ?
|
|
2692
|
+
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
|
|
2693
|
+
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0,
|
|
2668
2694
|
displaySourceToken,
|
|
2669
2695
|
displaySourceChain
|
|
2670
2696
|
) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
|
|
@@ -2687,15 +2713,15 @@ function ProcessingStep({
|
|
|
2687
2713
|
void delayPhaseId;
|
|
2688
2714
|
void hasEscalatedDelay;
|
|
2689
2715
|
const targetSymbol = (() => {
|
|
2690
|
-
const resolved =
|
|
2716
|
+
const resolved = _chunk7JIDIX27cjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
|
|
2691
2717
|
return resolved !== "Token" ? resolved : _nullishCoalesce(providedSourceSymbol, () => ( "USDC"));
|
|
2692
2718
|
})();
|
|
2693
|
-
const targetTokenIcon =
|
|
2694
|
-
const sourceChainIcon =
|
|
2695
|
-
const targetChainIcon =
|
|
2696
|
-
const sourceTokenIcon =
|
|
2697
|
-
const sourceChainName =
|
|
2698
|
-
const targetChainName =
|
|
2719
|
+
const targetTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, targetSymbol);
|
|
2720
|
+
const sourceChainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, displaySourceChain);
|
|
2721
|
+
const targetChainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, targetChain);
|
|
2722
|
+
const sourceTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, sourceSymbol);
|
|
2723
|
+
const sourceChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, displaySourceChain);
|
|
2724
|
+
const targetChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, targetChain);
|
|
2699
2725
|
const totalTimeText = formatElapsedTime(elapsedSeconds);
|
|
2700
2726
|
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _161 => _161.feeSponsored]), () => ( false));
|
|
2701
2727
|
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _162 => _162.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
@@ -2901,7 +2927,7 @@ async function executeSafeEthTransfer(params) {
|
|
|
2901
2927
|
throw new Error("Wallet not connected");
|
|
2902
2928
|
}
|
|
2903
2929
|
if (chain.id !== chainId) {
|
|
2904
|
-
throw new Error(`Switch to ${
|
|
2930
|
+
throw new Error(`Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, chainId)} to sign`);
|
|
2905
2931
|
}
|
|
2906
2932
|
const isOwner = await publicClient.readContract({
|
|
2907
2933
|
address: safeAddress,
|
|
@@ -2984,7 +3010,7 @@ async function executeSafeErc20Transfer(params) {
|
|
|
2984
3010
|
throw new Error("Wallet not connected");
|
|
2985
3011
|
}
|
|
2986
3012
|
if (chain.id !== chainId) {
|
|
2987
|
-
throw new Error(`Switch to ${
|
|
3013
|
+
throw new Error(`Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, chainId)} to sign`);
|
|
2988
3014
|
}
|
|
2989
3015
|
const isOwner = await publicClient.readContract({
|
|
2990
3016
|
address: safeAddress,
|
|
@@ -3114,7 +3140,7 @@ var clientCache = /* @__PURE__ */ new Map();
|
|
|
3114
3140
|
function getPublicClient(chainId) {
|
|
3115
3141
|
let client = clientCache.get(chainId);
|
|
3116
3142
|
if (!client) {
|
|
3117
|
-
const chain =
|
|
3143
|
+
const chain = _chunk7JIDIX27cjs.CHAIN_BY_ID[chainId];
|
|
3118
3144
|
client = _viem.createPublicClient.call(void 0, {
|
|
3119
3145
|
chain,
|
|
3120
3146
|
transport: _viem.http.call(void 0, )
|
|
@@ -3227,4 +3253,5 @@ function accountFromPrivateKey(privateKey) {
|
|
|
3227
3253
|
|
|
3228
3254
|
|
|
3229
3255
|
|
|
3230
|
-
|
|
3256
|
+
|
|
3257
|
+
exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.ConnectStep = ConnectStep; exports.Button = Button; exports.Callout = Callout; exports.debugLog = debugLog; exports.debugError = debugError; exports.toEvmCaip2 = toEvmCaip2; exports.targetChainToCaip2 = targetChainToCaip2; exports.parseEvmChainId = parseEvmChainId; exports.isSolanaCaip2 = isSolanaCaip2; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.getEventTxHash = getEventTxHash; exports.isDepositEvent = isDepositEvent; exports.txRefsMatch = txRefsMatch; exports.useLatestRef = useLatestRef; exports.ProcessingStep = ProcessingStep; exports.SAFE_ABI = SAFE_ABI; exports.executeSafeEthTransfer = executeSafeEthTransfer; exports.executeSafeErc20Transfer = executeSafeErc20Transfer; exports.buildSafeTransaction = buildSafeTransaction; exports.getPublicClient = getPublicClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isUnsupportedChainSwitchError
|
|
3
|
+
} from "./chunk-TJG2AFPS.mjs";
|
|
4
|
+
import {
|
|
5
|
+
SUPPORTED_CHAINS,
|
|
6
|
+
getChainName
|
|
7
|
+
} from "./chunk-SZIYS42B.mjs";
|
|
8
|
+
|
|
1
9
|
// src/core/reown.tsx
|
|
2
10
|
import { useState } from "react";
|
|
3
11
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
@@ -8,29 +16,50 @@ import {
|
|
|
8
16
|
createAppKit,
|
|
9
17
|
useAppKit,
|
|
10
18
|
useAppKitAccount,
|
|
19
|
+
useAppKitNetwork,
|
|
11
20
|
useAppKitState,
|
|
12
21
|
useWalletInfo,
|
|
13
22
|
modal
|
|
14
23
|
} from "@reown/appkit/react";
|
|
24
|
+
import { solana } from "@reown/appkit/networks";
|
|
25
|
+
import { useWalletClient, usePublicClient, useSwitchChain } from "wagmi";
|
|
26
|
+
|
|
27
|
+
// src/core/reown-networks.ts
|
|
15
28
|
import {
|
|
16
29
|
mainnet,
|
|
17
|
-
base,
|
|
18
|
-
arbitrum,
|
|
19
30
|
optimism,
|
|
20
31
|
polygon,
|
|
32
|
+
arbitrum,
|
|
33
|
+
base,
|
|
21
34
|
bsc,
|
|
22
|
-
|
|
35
|
+
soneium,
|
|
36
|
+
plasma
|
|
23
37
|
} from "@reown/appkit/networks";
|
|
24
|
-
|
|
38
|
+
var APPKIT_NETWORK_BY_ID = {
|
|
39
|
+
[mainnet.id]: mainnet,
|
|
40
|
+
[optimism.id]: optimism,
|
|
41
|
+
[polygon.id]: polygon,
|
|
42
|
+
[arbitrum.id]: arbitrum,
|
|
43
|
+
[base.id]: base,
|
|
44
|
+
[bsc.id]: bsc,
|
|
45
|
+
[soneium.id]: soneium,
|
|
46
|
+
[plasma.id]: plasma
|
|
47
|
+
};
|
|
48
|
+
var EVM_NETWORKS = SUPPORTED_CHAINS.map((chain) => {
|
|
49
|
+
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
50
|
+
if (!network) {
|
|
51
|
+
throw new Error(
|
|
52
|
+
`[rhinestone] No AppKit network registered for supported chain ${chain.id} (${chain.name}). Add it to APPKIT_NETWORK_BY_ID in reown-networks.ts.`
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return network;
|
|
56
|
+
});
|
|
57
|
+
function getAppKitNetwork(chainId) {
|
|
58
|
+
return APPKIT_NETWORK_BY_ID[chainId];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/core/reown.tsx
|
|
25
62
|
import { jsx } from "react/jsx-runtime";
|
|
26
|
-
var EVM_NETWORKS = [
|
|
27
|
-
mainnet,
|
|
28
|
-
base,
|
|
29
|
-
arbitrum,
|
|
30
|
-
optimism,
|
|
31
|
-
polygon,
|
|
32
|
-
bsc
|
|
33
|
-
];
|
|
34
63
|
var cachedAdapter = null;
|
|
35
64
|
var cachedAdapterKey = null;
|
|
36
65
|
function mapTheme(theme) {
|
|
@@ -94,6 +123,7 @@ function useReownWallet() {
|
|
|
94
123
|
const { walletInfo } = useWalletInfo();
|
|
95
124
|
const { data: walletClient } = useWalletClient();
|
|
96
125
|
const publicClient = usePublicClient();
|
|
126
|
+
const { switchNetwork } = useAppKitNetwork();
|
|
97
127
|
const { switchChainAsync } = useSwitchChain();
|
|
98
128
|
const isSolana = caipAddress?.startsWith("solana:") ?? false;
|
|
99
129
|
const solanaAddress = isSolana ? caipAddress?.split(":").slice(2).join(":") : void 0;
|
|
@@ -116,11 +146,21 @@ function useReownWallet() {
|
|
|
116
146
|
void modal?.disconnect();
|
|
117
147
|
},
|
|
118
148
|
switchChain: async (chainId) => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
149
|
+
const target = getAppKitNetwork(chainId);
|
|
150
|
+
try {
|
|
151
|
+
if (target) {
|
|
152
|
+
await switchNetwork(target);
|
|
153
|
+
} else {
|
|
154
|
+
await switchChainAsync({ chainId });
|
|
155
|
+
}
|
|
156
|
+
} catch (err) {
|
|
157
|
+
if (isUnsupportedChainSwitchError(err)) {
|
|
158
|
+
throw new Error(
|
|
159
|
+
`Switch to ${getChainName(chainId)} in your wallet to continue`
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
throw err;
|
|
122
163
|
}
|
|
123
|
-
await switchChainAsync({ chainId });
|
|
124
164
|
}
|
|
125
165
|
};
|
|
126
166
|
}
|
|
@@ -58,7 +58,7 @@ var TOKEN_ICONS = {
|
|
|
58
58
|
ETH: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M9.99987 19.9319C15.4852 19.9319 19.9319 15.4852 19.9319 9.9999C19.9319 4.51461 15.4852 0.0679016 9.99987 0.0679016C4.51458 0.0679016 0.0678711 4.51461 0.0678711 9.9999C0.0678711 15.4852 4.51458 19.9319 9.99987 19.9319Z' fill='%23E3E3E3'/%3E%3Cpath d='M10.0073 2.18121L14.6948 9.99371L10.0247 7.98052L10.0073 2.18121Z' fill='%232F3030'/%3E%3Cpath d='M5.31982 9.99371L9.98998 2.18121L10.0073 7.98052L5.31982 9.99371Z' fill='%23828384'/%3E%3Cpath d='M9.98998 12.8062L5.31982 10.047L10.0073 8.11871L9.98998 12.8062Z' fill='%23343535'/%3E%3Cpath d='M14.6948 10.047L10.0247 8.11871L10.0073 12.8062L14.6948 10.047Z' fill='%23131313'/%3E%3Cpath d='M10.0073 14.0046L14.6948 11.2437L10.0073 17.8062V14.0046Z' fill='%232F3030'/%3E%3Cpath d='M10.0073 14.0046L5.31982 11.2437L10.0073 17.8062V14.0046Z' fill='%23828384'/%3E%3C/svg%3E",
|
|
59
59
|
USDT: "data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='16' cy='16' r='16' fill='%2326A17B'/%3E%3Cpath fill='%23FFF' d='M17.922 17.383v-.002c-.11.008-.677.042-1.942.042-1.01 0-1.721-.03-1.971-.042v.003c-3.888-.171-6.79-.848-6.79-1.658 0-.809 2.902-1.486 6.79-1.66v2.644c.254.018.982.061 1.988.061 1.207 0 1.812-.05 1.925-.06v-2.643c3.88.173 6.775.85 6.775 1.658 0 .81-2.895 1.485-6.775 1.657m0-3.59v-2.366h5.414V7.819H8.595v3.608h5.414v2.365c-4.4.202-7.709 1.074-7.709 2.118 0 1.044 3.309 1.915 7.709 2.118v7.582h3.913v-7.584c4.393-.202 7.694-1.073 7.694-2.116 0-1.043-3.301-1.914-7.694-2.117'/%3E%3C/g%3E%3C/svg%3E",
|
|
60
60
|
USDT0: "data:image/svg+xml,%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 { fill: %23009393; } .cls-1%2C .cls-2 { stroke-width: 0px; } .cls-2 { fill: %23fff; fill-rule: evenodd; } %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Ccircle class='cls-1' cx='400' cy='400' r='400'/%3E%3Cpath class='cls-2' d='M400.49%2C428.59c68.79%2C0%2C126.28-11.63%2C140.33-27.17-11.93-13.18-55.08-23.56-109.88-26.4v32.83c-9.81.51-20.01.76-30.46.76s-20.65-.25-30.48-.76v-32.83c-54.78%2C2.84-97.95%2C13.22-109.88%2C26.4%2C14.07%2C15.54%2C71.57%2C27.17%2C140.36%2C27.17ZM522.71%2C274.06v45.21h-91.77v31.35c64.46%2C3.35%2C112.83%2C17.13%2C113.19%2C33.62v34.38c-.36%2C16.49-48.73%2C30.24-113.19%2C33.6v76.94h-60.93v-76.94c-64.46-3.35-112.81-17.11-113.17-33.6v-34.38c.36-16.49%2C48.71-30.27%2C113.17-33.62v-31.35h-91.77v-45.21h244.48ZM242.15%2C202.11h322.16c7.7%2C0%2C14.79%2C4.05%2C18.63%2C10.63l93.85%2C161.16c4.86%2C8.36%2C3.42%2C18.91-3.52%2C25.68l-258.34%2C252.18c-8.38%2C8.17-21.84%2C8.17-30.2%2C0L126.71%2C399.92c-7.09-6.94-8.43-17.79-3.2-26.19l100.33-161.49c3.91-6.28%2C10.85-10.12%2C18.32-10.12Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",
|
|
61
|
-
WETH: "data:image/svg+xml
|
|
61
|
+
WETH: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 500'><path fill-rule='evenodd' clip-rule='evenodd' fill='%2325292E' d='M250,500c138.1,0,250-111.9,250-250S388.1,0,250,0S0,111.9,0,250S111.9,500,250,500z'/><path fill-rule='evenodd' clip-rule='evenodd' fill='%23FFFFFF' d='M386.1,86.8C349.3,56,301.8,37.5,250,37.5S150.7,56,113.9,86.8c-2.8,2.3-2.9,6.5-0.3,9l4.5,4.5c2.3,2.3,6.1,2.4,8.6,0.3c33.5-27.7,76.5-44.4,123.4-44.4s89.9,16.7,123.4,44.4c2.5,2.1,6.3,2,8.6-0.3l4.5-4.5C389,93.3,388.9,89.1,386.1,86.8z M100.3,118c2.3,2.3,2.4,6.1,0.3,8.6C72.9,160.1,56.2,203.1,56.2,250s16.7,89.9,44.4,123.4c2.1,2.5,2,6.3-0.3,8.6l-4.5,4.5c-2.5,2.5-6.7,2.4-9-0.3C56,349.3,37.5,301.8,37.5,250S56,150.7,86.8,113.9c2.3-2.8,6.5-2.9,9-0.3L100.3,118z M399.4,373.4c-2.1,2.5-2,6.3,0.3,8.6l4.5,4.5c2.5,2.5,6.7,2.4,9-0.3c30.8-36.9,49.3-84.3,49.3-136.1s-18.5-99.3-49.3-136.1c-2.3-2.8-6.5-2.9-9-0.3l-4.5,4.5c-2.3,2.3-2.4,6.1-0.3,8.6c27.7,33.5,44.4,76.5,44.4,123.4S427.1,339.9,399.4,373.4z M113.9,413.2c36.9,30.8,84.3,49.3,136.1,49.3s99.3-18.5,136.1-49.3c2.8-2.3,2.9-6.5,0.3-9l-4.5-4.5c-2.3-2.3-6.1-2.4-8.6-0.3c-33.5,27.7-76.5,44.4-123.4,44.4s-89.9-16.7-123.4-44.4c-2.5-2.1-6.3-2-8.6,0.3l-4.5,4.5C111,406.7,111.1,410.9,113.9,413.2z'/><linearGradient id='wethG' gradientUnits='userSpaceOnUse' x1='249.9919' y1='238.4098' x2='249.9919' y2='119.4948' gradientTransform='matrix(1 0 0 -1 0 499.8898)'><stop offset='0' stop-color='%23FFFFFF'/><stop offset='1' stop-color='%23FFFFFF' stop-opacity='0.9'/></linearGradient><path fill='url(%23wethG)' d='M165.6,261.5l84.4,49.9l84.4-49.9L250,380.4L165.6,261.5z'/><path fill='%23FFFFFF' d='M250,292.8l-84.4-49.9L250,110l84.4,132.9L250,292.8z'/></svg>",
|
|
62
62
|
BNB: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2496 2496'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' fill='%23F0B90B' d='M1248%2C0c689.3%2C0%2C1248%2C558.7%2C1248%2C1248s-558.7%2C1248-1248%2C1248S0%2C1937.3%2C0%2C1248S558.7%2C0%2C1248%2C0z'/%3E%3Cpath fill='%23FFFFFF' d='M685.9%2C1248l0.9%2C330l280.4%2C165v193.2l-444.5-260.7v-524L685.9%2C1248z M685.9%2C918v192.3l-163.3-96.6V821.4l163.3-96.6l164.1%2C96.6L685.9%2C918z M1084.3%2C821.4l163.3-96.6l164.1%2C96.6L1247.6%2C918L1084.3%2C821.4z'/%3E%3Cpath fill='%23FFFFFF' d='M803.9%2C1509.6v-193.2l163.3%2C96.6v192.3L803.9%2C1509.6z M1084.3%2C1812.2l163.3%2C96.6l164.1-96.6v192.3l-164.1%2C96.6l-163.3-96.6V1812.2z M1645.9%2C821.4l163.3-96.6l164.1%2C96.6v192.3l-164.1%2C96.6V918L1645.9%2C821.4z M1809.2%2C1578l0.9-330l163.3-96.6v524l-444.5%2C260.7v-193.2L1809.2%2C1578z'/%3E%3Cpolygon fill='%23FFFFFF' points='1692.1%2C1509.6 1528.8%2C1605.3 1528.8%2C1413 1692.1%2C1316.4 1692.1%2C1509.6'/%3E%3Cpath fill='%23FFFFFF' d='M1692.1%2C986.4l0.9%2C193.2l-281.2%2C165v330.8l-163.3%2C95.7l-163.3-95.7v-330.8l-281.2-165V986.4L968%2C889.8l279.5%2C165.8l281.2-165.8l164.1%2C96.6H1692.1z M803.9%2C656.5l443.7-261.6l444.5%2C261.6l-163.3%2C96.6l-281.2-165.8L967.2%2C753.1L803.9%2C656.5z'/%3E%3C/svg%3E",
|
|
63
63
|
XPL: "data:image/svg+xml,%3Csvg width='166' height='166' viewBox='0 0 166 166' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='166' height='166' fill='%23162F29'/%3E%3Cpath d='M133 83.268C133 83.7749 132.993 84.2819 132.978 84.7888H108.659V83.6808H85.2523C85.2523 83.449 85.2596 83.2173 85.2596 82.9928C85.2596 82.7682 85.2596 82.5293 85.2523 82.3047H108.659V81.2039H132.957C132.986 81.8919 133 82.58 133 83.268ZM84.8395 78.2781L107.747 75.4609L107.884 76.5617L132.073 73.5852C131.841 72.3974 131.566 71.2242 131.255 70.0727L107.442 73.0058L107.58 74.1066L84.5643 76.9383C84.6657 77.3873 84.7598 77.8363 84.8395 78.2926V78.2781ZM83.6446 73.8459L105.538 68.378L105.806 69.4499L129.039 63.6489C128.561 62.5264 128.046 61.4183 127.496 60.3392L104.944 65.9736L105.212 67.0455L83.1376 72.564C83.3187 72.9913 83.4852 73.4186 83.6446 73.8531V73.8459ZM81.7036 69.6961L102.17 61.9687L102.561 63.0043L124.215 54.8279C123.513 53.7995 122.774 52.8001 121.992 51.8297L101.294 59.644L101.685 60.6796L80.9722 68.5012C81.2257 68.8922 81.4719 69.2906 81.7036 69.6961ZM79.0168 65.8578L97.0933 56.4357L97.6002 57.4206L117.589 46.9991C116.669 46.1083 115.713 45.261 114.728 44.4426L95.9418 54.2341L96.4487 55.219L78.0681 64.8004C78.3867 65.148 78.7054 65.4957 79.0096 65.8578H79.0168ZM74.657 61.7152L91.0243 51.3082L91.6182 52.2425L109.68 40.7564C108.543 40.0322 107.384 39.3586 106.189 38.7286L89.699 49.2152L90.2929 50.1495L73.4548 60.8534C73.8676 61.1286 74.2659 61.4183 74.6642 61.7152H74.657ZM70.7897 59.2963L84.5064 48.0492L85.2089 48.9038L100.656 36.23C99.3456 35.7303 97.9985 35.2813 96.637 34.8902L82.9348 46.1301L83.6373 46.9846L69.4209 58.6446C69.8844 58.8473 70.3407 59.0646 70.7897 59.2963ZM65.6695 57.3048L76.5038 46.5211L77.2787 47.3033L91.0461 33.6228C89.5542 33.3766 88.0406 33.1955 86.5052 33.0797L74.7656 44.7613L75.5406 45.5435L64.0979 56.9282C64.6266 57.0368 65.148 57.1599 65.6695 57.3048ZM59.6802 56.3995L68.3201 45.9273L69.1747 46.6298L80.4218 33C78.7126 33.0797 77.0252 33.2462 75.3667 33.4925L66.4082 44.3485L67.2627 45.051L57.9058 56.3922C58.1666 56.385 58.4345 56.3777 58.6952 56.3777C59.0284 56.3777 59.3543 56.3778 59.6802 56.3922V56.3995ZM54.502 56.7109L61.1576 46.4125L62.0846 47.0136L70.1306 34.5571C68.2911 35.0351 66.4951 35.6144 64.7425 36.2879L59.0791 45.0582L60.0061 45.6593L52.6335 57.073C53.2491 56.9282 53.872 56.805 54.502 56.7036V56.7109ZM48.7517 58.3114L53.5388 49.3384L54.5093 49.8598L60.8462 37.9899C58.8111 38.982 56.8557 40.1046 54.9873 41.3502L51.3444 48.1724L52.3221 48.6938L46.6877 59.2529C47.354 58.9125 48.042 58.6011 48.7445 58.3187L48.7517 58.3114ZM44.6237 60.4189L46.6587 54.6396L47.7016 55.009L51.6559 43.7836C49.6498 45.3769 47.7668 47.115 46.0214 48.9907L44.3195 53.8213L45.3624 54.1906L42.6973 61.7515C43.3201 61.2807 43.9574 60.8389 44.6165 60.4261L44.6237 60.4189ZM39.5469 64.5542L40.445 60.3537L41.524 60.5855L43.3346 52.1266C41.4299 54.5455 39.7425 57.1454 38.3013 59.8902L39.1052 60.064L37.4539 67.0165C38.0985 66.1547 38.801 65.3291 39.5469 64.5542ZM35.8172 69.4644V63.9024C34.4702 67.4583 33.5142 71.8833 33 76.2213C33.6301 73.8169 34.586 71.5501 35.8172 69.4644ZM33.0362 89.909C33.5649 93.6098 34.4919 97.1802 35.781 100.577V96.4704C34.5933 94.4426 33.659 92.241 33.0362 89.909ZM37.6278 99.2152L39.0689 105.936L38.2651 106.11C39.7063 108.862 41.3937 111.455 43.2984 113.873L41.4878 105.415L40.4087 105.646L39.4962 101.395C38.8372 100.7 38.2071 99.9757 37.6278 99.208V99.2152ZM42.6466 104.212L45.3262 111.817L44.2833 112.186L45.9852 117.017C47.7306 118.892 49.6136 120.63 51.6196 122.224L47.6654 110.998L46.6225 111.368L44.5802 105.559C43.9212 105.139 43.2767 104.698 42.6538 104.227L42.6466 104.212ZM46.6443 106.725L52.2932 117.313L51.3155 117.835L54.9583 124.657C56.8268 125.903 58.7822 127.025 60.8172 128.017L54.4803 116.147L53.5026 116.669L48.701 107.674C47.9985 107.392 47.3105 107.073 46.637 106.733L46.6443 106.725ZM52.5901 108.913L59.9699 120.341L59.0429 120.942L64.7063 129.712C66.4589 130.386 68.2549 130.965 70.0944 131.443L62.0484 118.986L61.1214 119.587L54.4586 109.275C53.8285 109.173 53.1984 109.05 52.5828 108.905L52.5901 108.913ZM57.8624 109.608L67.2193 120.949L66.3647 121.652L75.3233 132.508C76.9817 132.754 78.6692 132.92 80.3783 133L69.1312 119.363L68.2766 120.065L59.6367 109.593C59.3253 109.608 59.0067 109.608 58.688 109.608C58.4128 109.608 58.1304 109.608 57.8552 109.593L57.8624 109.608ZM64.0689 109.072L75.5043 120.449L74.7294 121.231L86.469 132.913C88.0043 132.797 89.518 132.616 91.0098 132.37L77.2497 118.682L76.4676 119.472L65.6405 108.695C65.1263 108.833 64.5976 108.963 64.0689 109.072ZM69.3992 107.37L83.6011 119.023L82.8986 119.877L96.6008 131.117C97.9623 130.726 99.3094 130.277 100.62 129.777L85.1654 117.103L84.4629 117.958L70.7607 106.718C70.3117 106.95 69.8554 107.167 69.3919 107.37H69.3992ZM73.4258 105.154L90.2422 115.851L89.6483 116.785L106.139 127.271C107.334 126.641 108.5 125.961 109.629 125.244L91.5675 113.758L90.9736 114.692L74.628 104.299C74.2297 104.596 73.8314 104.886 73.4186 105.161L73.4258 105.154ZM78.0608 101.214L96.4198 110.781L95.9128 111.766L114.699 121.557C115.684 120.739 116.64 119.892 117.56 119.001L97.5713 108.579L97.0643 109.564L79.0096 100.157C78.7054 100.519 78.394 100.874 78.0681 101.214H78.0608ZM80.9649 97.5061L101.649 105.32L101.258 106.356L121.956 114.17C122.731 113.2 123.469 112.2 124.179 111.172L102.525 102.996L102.134 104.031L81.6964 96.3111C81.4646 96.7167 81.2184 97.115 80.9649 97.5061ZM83.1304 93.4505L105.168 98.9545L104.9 100.026L127.452 105.661C128.01 104.582 128.524 103.474 129.002 102.351L105.769 96.5501L105.501 97.622L83.6373 92.1614C83.478 92.5959 83.3042 93.0232 83.1304 93.4505ZM84.5643 89.0762L107.544 91.9006L107.406 93.0014L131.218 95.9345C131.53 94.7758 131.805 93.6026 132.037 92.4221L107.848 89.4455L107.71 90.5463L84.8395 87.7291C84.7598 88.1854 84.6657 88.6344 84.5643 89.0834V89.0762Z' fill='white'/%3E%3C/svg%3E"
|
|
64
64
|
};
|