@rhinestone/deposit-modal 0.0.0-dev-20260710155932 → 0.0.0-dev-20260710200610
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-4BSHOQ5Y.mjs → DepositModalReown-H3QYGFGE.mjs} +6 -6
- package/dist/{DepositModalReown-UND3DEJH.cjs → DepositModalReown-UBYRZQFA.cjs} +9 -9
- package/dist/{WithdrawModalReown-TVZWJKQI.cjs → WithdrawModalReown-MTW2KDKU.cjs} +8 -8
- package/dist/{WithdrawModalReown-FVXSSGY5.mjs → WithdrawModalReown-VYCUYAJV.mjs} +5 -5
- package/dist/{chunk-O5OKA27M.mjs → chunk-2O2FJYRY.mjs} +1 -1
- package/dist/{chunk-7KHEIMWD.mjs → chunk-FPUOL3GB.mjs} +5 -5
- package/dist/{chunk-Q3W53BKR.cjs → chunk-I3SAYG6C.cjs} +7 -7
- package/dist/{chunk-7OKA6GNA.cjs → chunk-JBK5PQI2.cjs} +31 -31
- package/dist/{chunk-2JPB3PLB.mjs → chunk-OPFYTBRR.mjs} +2 -2
- package/dist/{chunk-4NN7UTWQ.cjs → chunk-ORKEBFMR.cjs} +4 -4
- package/dist/{chunk-U7SVYWVD.cjs → chunk-P5T4XSN2.cjs} +1 -1
- package/dist/{chunk-DABKCJVL.mjs → chunk-RARNNVZO.mjs} +1 -1
- package/dist/{chunk-WK5AFRSP.mjs → chunk-RH6XQHMA.mjs} +1 -1
- package/dist/{chunk-NASHLEVQ.mjs → chunk-RQDAMFV7.mjs} +1 -1
- package/dist/{chunk-HQWZCOMS.cjs → chunk-TEXCR5LM.cjs} +99 -99
- package/dist/{chunk-XRWQMIBY.cjs → chunk-UNVVUULP.cjs} +3 -3
- package/dist/{chunk-D3Y7ZBED.cjs → chunk-VX3DOVTY.cjs} +335 -335
- package/dist/{chunk-T43VUEJH.mjs → chunk-ZNO5SGJS.mjs} +4 -4
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +7 -7
- package/dist/index.mjs +6 -6
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +3 -3
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-FPUOL3GB.mjs";
|
|
4
|
+
import "./chunk-RARNNVZO.mjs";
|
|
5
5
|
import {
|
|
6
6
|
ReownWalletProvider,
|
|
7
7
|
useReownWallet
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-OPFYTBRR.mjs";
|
|
9
|
+
import "./chunk-RQDAMFV7.mjs";
|
|
10
|
+
import "./chunk-RH6XQHMA.mjs";
|
|
11
|
+
import "./chunk-2O2FJYRY.mjs";
|
|
12
12
|
|
|
13
13
|
// src/DepositModalReown.tsx
|
|
14
14
|
import { useCallback, useMemo } from "react";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkVX3DOVTYcjs = require('./chunk-VX3DOVTY.cjs');
|
|
4
|
+
require('./chunk-ORKEBFMR.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
8
|
+
var _chunkI3SAYG6Ccjs = require('./chunk-I3SAYG6C.cjs');
|
|
9
|
+
require('./chunk-JBK5PQI2.cjs');
|
|
10
|
+
require('./chunk-UNVVUULP.cjs');
|
|
11
|
+
require('./chunk-P5T4XSN2.cjs');
|
|
12
12
|
|
|
13
13
|
// src/DepositModalReown.tsx
|
|
14
14
|
var _react = require('react');
|
|
@@ -16,7 +16,7 @@ var _react3 = require('@reown/appkit/react');
|
|
|
16
16
|
var _react5 = require('@reown/appkit-adapter-solana/react');
|
|
17
17
|
var _jsxruntime = require('react/jsx-runtime');
|
|
18
18
|
function DepositModalWithReown(props) {
|
|
19
|
-
const reown =
|
|
19
|
+
const reown = _chunkI3SAYG6Ccjs.useReownWallet.call(void 0, );
|
|
20
20
|
const enableSolana = _nullishCoalesce(props.enableSolana, () => ( true));
|
|
21
21
|
const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0,
|
|
22
22
|
enableSolana ? "solana" : "eip155"
|
|
@@ -37,7 +37,7 @@ function DepositModalWithReown(props) {
|
|
|
37
37
|
reown.disconnect();
|
|
38
38
|
}, [reown.disconnect]);
|
|
39
39
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
40
|
-
|
|
40
|
+
_chunkVX3DOVTYcjs.DepositModalInner,
|
|
41
41
|
{
|
|
42
42
|
...props,
|
|
43
43
|
reownWallet: reownWithSolana,
|
|
@@ -48,7 +48,7 @@ function DepositModalWithReown(props) {
|
|
|
48
48
|
}
|
|
49
49
|
function DepositModalReown(props) {
|
|
50
50
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
51
|
-
|
|
51
|
+
_chunkI3SAYG6Ccjs.ReownWalletProvider,
|
|
52
52
|
{
|
|
53
53
|
projectId: props.reownAppId,
|
|
54
54
|
theme: props.theme,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTEXCR5LMcjs = require('./chunk-TEXCR5LM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
7
|
+
var _chunkI3SAYG6Ccjs = require('./chunk-I3SAYG6C.cjs');
|
|
8
|
+
require('./chunk-JBK5PQI2.cjs');
|
|
9
|
+
require('./chunk-UNVVUULP.cjs');
|
|
10
|
+
require('./chunk-P5T4XSN2.cjs');
|
|
11
11
|
|
|
12
12
|
// src/WithdrawModalReown.tsx
|
|
13
13
|
var _react = require('react');
|
|
14
14
|
var _jsxruntime = require('react/jsx-runtime');
|
|
15
15
|
function WithdrawModalWithReown(props) {
|
|
16
|
-
const reown =
|
|
16
|
+
const reown = _chunkI3SAYG6Ccjs.useReownWallet.call(void 0, );
|
|
17
17
|
const handleConnect = _react.useCallback.call(void 0, () => {
|
|
18
18
|
reown.openConnect();
|
|
19
19
|
}, [reown.openConnect]);
|
|
@@ -21,7 +21,7 @@ function WithdrawModalWithReown(props) {
|
|
|
21
21
|
reown.disconnect();
|
|
22
22
|
}, [reown.disconnect]);
|
|
23
23
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
24
|
-
|
|
24
|
+
_chunkTEXCR5LMcjs.WithdrawModalInner,
|
|
25
25
|
{
|
|
26
26
|
...props,
|
|
27
27
|
reownWallet: reown,
|
|
@@ -32,7 +32,7 @@ function WithdrawModalWithReown(props) {
|
|
|
32
32
|
}
|
|
33
33
|
function WithdrawModalReown(props) {
|
|
34
34
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
35
|
-
|
|
35
|
+
_chunkI3SAYG6Ccjs.ReownWalletProvider,
|
|
36
36
|
{
|
|
37
37
|
projectId: props.reownAppId,
|
|
38
38
|
theme: props.theme,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZNO5SGJS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-OPFYTBRR.mjs";
|
|
8
|
+
import "./chunk-RQDAMFV7.mjs";
|
|
9
|
+
import "./chunk-RH6XQHMA.mjs";
|
|
10
|
+
import "./chunk-2O2FJYRY.mjs";
|
|
11
11
|
|
|
12
12
|
// src/WithdrawModalReown.tsx
|
|
13
13
|
import { useCallback } from "react";
|
|
@@ -117,7 +117,7 @@ var ICON_SLUG_ALIASES = {
|
|
|
117
117
|
xdai: "dai"
|
|
118
118
|
};
|
|
119
119
|
function tokenIconUrl(symbol) {
|
|
120
|
-
const key = symbol.toLowerCase();
|
|
120
|
+
const key = symbol.toLowerCase().replace(/₮/g, "t");
|
|
121
121
|
const slug = ICON_SLUG_ALIASES[key] ?? key;
|
|
122
122
|
return `https://s3.rhinestone.dev/tokens/${slug}.svg`;
|
|
123
123
|
}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
executePolymarketSafeTransfer,
|
|
8
8
|
fetchPolymarketProxyWallet,
|
|
9
9
|
readPolymarketBalances
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RARNNVZO.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AlertTriangleIcon,
|
|
13
13
|
ArrowUpRightIcon,
|
|
@@ -72,10 +72,10 @@ import {
|
|
|
72
72
|
useLatestRef,
|
|
73
73
|
useRpcUrls,
|
|
74
74
|
useStableRpcUrls
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-RQDAMFV7.mjs";
|
|
76
76
|
import {
|
|
77
77
|
SAFE_ABI
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-RH6XQHMA.mjs";
|
|
79
79
|
import {
|
|
80
80
|
DEFAULT_BACKEND_URL,
|
|
81
81
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
isVirtualDestination,
|
|
108
108
|
parseEvmChainId,
|
|
109
109
|
targetChainToCaip2
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-2O2FJYRY.mjs";
|
|
111
111
|
|
|
112
112
|
// src/DepositModal.tsx
|
|
113
113
|
import {
|
|
@@ -7795,7 +7795,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7795
7795
|
// src/DepositModal.tsx
|
|
7796
7796
|
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7797
7797
|
var ReownDepositInner = lazy2(
|
|
7798
|
-
() => import("./DepositModalReown-
|
|
7798
|
+
() => import("./DepositModalReown-H3QYGFGE.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7799
7799
|
);
|
|
7800
7800
|
function sortByCreatedAtDesc(items) {
|
|
7801
7801
|
return [...items].sort((a, b) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkJBK5PQI2cjs = require('./chunk-JBK5PQI2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkP5T4XSN2cjs = require('./chunk-P5T4XSN2.cjs');
|
|
9
9
|
|
|
10
10
|
// src/core/reown.tsx
|
|
11
11
|
var _react = require('react');
|
|
@@ -59,7 +59,7 @@ var APPKIT_NETWORK_BY_ID = {
|
|
|
59
59
|
[_networks.katana.id]: _networks.katana,
|
|
60
60
|
[_networks.hyperEvm.id]: _networks.hyperEvm
|
|
61
61
|
};
|
|
62
|
-
var EVM_NETWORKS =
|
|
62
|
+
var EVM_NETWORKS = _chunkP5T4XSN2cjs.SUPPORTED_CHAINS.map((chain) => {
|
|
63
63
|
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
64
64
|
if (!network) {
|
|
65
65
|
throw new Error(
|
|
@@ -78,14 +78,14 @@ function buildTransports(rpcUrls) {
|
|
|
78
78
|
const transports = {};
|
|
79
79
|
for (const network of EVM_NETWORKS) {
|
|
80
80
|
const id = Number(network.id);
|
|
81
|
-
transports[id] = _viem.http.call(void 0,
|
|
81
|
+
transports[id] = _viem.http.call(void 0, _chunkJBK5PQI2cjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
82
82
|
}
|
|
83
83
|
return transports;
|
|
84
84
|
}
|
|
85
85
|
function getEvmRpcFingerprint(rpcUrls) {
|
|
86
86
|
return EVM_NETWORKS.map((network) => {
|
|
87
87
|
const id = Number(network.id);
|
|
88
|
-
return `${id}=${_nullishCoalesce(
|
|
88
|
+
return `${id}=${_nullishCoalesce(_chunkJBK5PQI2cjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
89
89
|
}).join("|");
|
|
90
90
|
}
|
|
91
91
|
var cachedAdapter = null;
|
|
@@ -179,9 +179,9 @@ function useReownWallet() {
|
|
|
179
179
|
await switchChainAsync({ chainId });
|
|
180
180
|
}
|
|
181
181
|
} catch (err) {
|
|
182
|
-
if (
|
|
182
|
+
if (_chunkJBK5PQI2cjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
183
183
|
throw new Error(
|
|
184
|
-
`Switch to ${
|
|
184
|
+
`Switch to ${_chunkP5T4XSN2cjs.getChainName.call(void 0, chainId)} in your wallet to continue`
|
|
185
185
|
);
|
|
186
186
|
}
|
|
187
187
|
throw err;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkP5T4XSN2cjs = require('./chunk-P5T4XSN2.cjs');
|
|
23
23
|
|
|
24
24
|
// src/components/ui/Modal.tsx
|
|
25
25
|
|
|
@@ -955,7 +955,7 @@ function createDepositService(baseUrl, options) {
|
|
|
955
955
|
},
|
|
956
956
|
async checkLiquidity(params) {
|
|
957
957
|
if (params.destinationChainId === "solana") {
|
|
958
|
-
const token =
|
|
958
|
+
const token = _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
|
|
959
959
|
return {
|
|
960
960
|
hasLiquidity: true,
|
|
961
961
|
symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _25 => _25.symbol]), () => ( "Token")),
|
|
@@ -1012,7 +1012,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1012
1012
|
const body = {
|
|
1013
1013
|
account: params.account,
|
|
1014
1014
|
// HyperCore has its own CAIP-2 namespace — never the eip155 placeholder.
|
|
1015
|
-
sourceChainId: params.sourceChainId === "hypercore" ?
|
|
1015
|
+
sourceChainId: params.sourceChainId === "hypercore" ? _chunkP5T4XSN2cjs.HYPERCORE_MAINNET_CAIP2 : `eip155:${params.sourceChainId}`,
|
|
1016
1016
|
sourceToken: params.sourceToken,
|
|
1017
1017
|
amount: params.amount
|
|
1018
1018
|
};
|
|
@@ -1335,14 +1335,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1335
1335
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _32 => _32.balance, 'optionalAccess', _33 => _33.unlocked]), () => ( "0"));
|
|
1336
1336
|
const normalizedName = tokenData.tokenName.trim();
|
|
1337
1337
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
1338
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
1339
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
1338
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkP5T4XSN2cjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
1339
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkP5T4XSN2cjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
1340
1340
|
if (!resolvedTokenAddress) {
|
|
1341
1341
|
continue;
|
|
1342
1342
|
}
|
|
1343
|
-
const registrySymbol =
|
|
1343
|
+
const registrySymbol = _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
1344
1344
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
1345
|
-
const decimals = registrySymbol !== "Token" ?
|
|
1345
|
+
const decimals = registrySymbol !== "Token" ? _chunkP5T4XSN2cjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
1346
1346
|
tokens.push({
|
|
1347
1347
|
chainId: chainBalance.chainId,
|
|
1348
1348
|
address: resolvedTokenAddress,
|
|
@@ -1362,13 +1362,13 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1362
1362
|
function normalizeDirectToken(token) {
|
|
1363
1363
|
const rawChainId = _nullishCoalesce(extractNumber(token, "chainId"), () => ( extractNumber(token.chain, "id")));
|
|
1364
1364
|
const rawChainString = _nullishCoalesce(extractString(token, "chainId"), () => ( extractString(token.chain, "id")));
|
|
1365
|
-
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ?
|
|
1365
|
+
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkP5T4XSN2cjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : (
|
|
1366
1366
|
// HyperCore (`hypercore:mainnet`) is a non-EVM source; keep its USDC
|
|
1367
1367
|
// instead of dropping it as an unparseable chain string.
|
|
1368
|
-
|
|
1368
|
+
_chunkP5T4XSN2cjs.isHyperCoreCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "hypercore" ? "hypercore" : _chunkP5T4XSN2cjs.parseEvmChainId.call(void 0, rawChainString)
|
|
1369
1369
|
) : null)));
|
|
1370
1370
|
if (chainId === null) return null;
|
|
1371
|
-
const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ?
|
|
1371
|
+
const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ? _chunkP5T4XSN2cjs.HYPERCORE_CHAIN_ID : void 0;
|
|
1372
1372
|
const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
|
|
1373
1373
|
if (!symbol) return null;
|
|
1374
1374
|
const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _34 => _34(token, "balance"), 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]))), () => ( _optionalChain([extractNumber, 'call', _37 => _37(token, "amount"), 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]))), () => ( _optionalChain([extractNumber, 'call', _40 => _40(token, "value"), 'optionalAccess', _41 => _41.toString, 'call', _42 => _42()]))), () => ( _optionalChain([extractNumber, 'call', _43 => _43(token, "rawBalance"), 'optionalAccess', _44 => _44.toString, 'call', _45 => _45()])));
|
|
@@ -1376,14 +1376,14 @@ function normalizeDirectToken(token) {
|
|
|
1376
1376
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
1377
1377
|
token.token,
|
|
1378
1378
|
"address"
|
|
1379
|
-
))), () => ( (registryChainId !== void 0 ?
|
|
1379
|
+
))), () => ( (registryChainId !== void 0 ? _chunkP5T4XSN2cjs.getTokenAddress.call(void 0, symbol, registryChainId) : void 0)));
|
|
1380
1380
|
if (!address) return null;
|
|
1381
1381
|
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));
|
|
1382
1382
|
const isSolanaToken = chainId === "solana";
|
|
1383
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
1383
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, address, registryChainId);
|
|
1384
1384
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
1385
1385
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
1386
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
1386
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkP5T4XSN2cjs.getTokenDecimalsByAddress.call(void 0, address, registryChainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
1387
1387
|
return {
|
|
1388
1388
|
chainId,
|
|
1389
1389
|
address,
|
|
@@ -1524,7 +1524,7 @@ function getPublicClient(chainId, rpcUrls) {
|
|
|
1524
1524
|
const cacheKey = `${chainId}|${_nullishCoalesce(url, () => ( ""))}`;
|
|
1525
1525
|
let client = clientCache.get(cacheKey);
|
|
1526
1526
|
if (!client) {
|
|
1527
|
-
const chain =
|
|
1527
|
+
const chain = _chunkP5T4XSN2cjs.CHAIN_BY_ID[chainId];
|
|
1528
1528
|
client = _viem.createPublicClient.call(void 0, {
|
|
1529
1529
|
chain,
|
|
1530
1530
|
transport: _viem.http.call(void 0, url)
|
|
@@ -2495,7 +2495,7 @@ var EXCHANGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fr
|
|
|
2495
2495
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeIcons, {}),
|
|
2496
2496
|
"+6"
|
|
2497
2497
|
] });
|
|
2498
|
-
var EXTRA_CHAIN_COUNT = Math.max(0,
|
|
2498
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, _chunkP5T4XSN2cjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
2499
2499
|
var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2500
2500
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
2501
2501
|
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
|
|
@@ -2808,7 +2808,7 @@ function TokenIcon({ symbol, className, fallback }) {
|
|
|
2808
2808
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2809
2809
|
"img",
|
|
2810
2810
|
{
|
|
2811
|
-
src:
|
|
2811
|
+
src: _chunkP5T4XSN2cjs.tokenIconUrl.call(void 0, symbol),
|
|
2812
2812
|
alt: "",
|
|
2813
2813
|
className: `rs-token-icon ${_nullishCoalesce(className, () => ( ""))}`.trimEnd(),
|
|
2814
2814
|
decoding: "async",
|
|
@@ -2824,10 +2824,10 @@ TokenIcon.displayName = "TokenIcon";
|
|
|
2824
2824
|
// src/core/useTokenPrices.ts
|
|
2825
2825
|
|
|
2826
2826
|
function isErc20(token) {
|
|
2827
|
-
return typeof token.chainId === "number" && !!token.address && token.address.toLowerCase() !==
|
|
2827
|
+
return typeof token.chainId === "number" && !!token.address && token.address.toLowerCase() !== _chunkP5T4XSN2cjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
2828
2828
|
}
|
|
2829
2829
|
function caip2For(token) {
|
|
2830
|
-
return `${
|
|
2830
|
+
return `${_chunkP5T4XSN2cjs.toEvmCaip2.call(void 0, token.chainId)}:${token.address.toLowerCase()}`;
|
|
2831
2831
|
}
|
|
2832
2832
|
async function fetchTokenPriceUsd(service, token) {
|
|
2833
2833
|
if (isErc20(token)) {
|
|
@@ -3307,18 +3307,18 @@ var EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
|
|
|
3307
3307
|
function resolveTokenDisplay(token, chain, fallback) {
|
|
3308
3308
|
if (token !== void 0) {
|
|
3309
3309
|
if (chain === "solana") {
|
|
3310
|
-
const solanaToken =
|
|
3310
|
+
const solanaToken = _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, token);
|
|
3311
3311
|
if (solanaToken) {
|
|
3312
3312
|
return { symbol: solanaToken.symbol, decimals: solanaToken.decimals };
|
|
3313
3313
|
}
|
|
3314
3314
|
} else if (chain === "hypercore") {
|
|
3315
|
-
const t =
|
|
3315
|
+
const t = _chunkP5T4XSN2cjs.HYPERCORE_SOURCE_TOKENS.find(
|
|
3316
3316
|
(x) => x.address.toLowerCase() === token.toLowerCase()
|
|
3317
3317
|
);
|
|
3318
3318
|
if (t) return { symbol: t.symbol, decimals: t.decimals };
|
|
3319
3319
|
} else if (EVM_ADDRESS_RE.test(token)) {
|
|
3320
|
-
const symbol =
|
|
3321
|
-
const decimals =
|
|
3320
|
+
const symbol = _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, token, chain);
|
|
3321
|
+
const decimals = _chunkP5T4XSN2cjs.findTokenDecimals.call(void 0, token, chain);
|
|
3322
3322
|
if (symbol !== "Token" || decimals !== void 0) {
|
|
3323
3323
|
return {
|
|
3324
3324
|
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _118 => _118.symbol]), () => ( symbol)),
|
|
@@ -3367,13 +3367,13 @@ function priceUsdFor(symbol, prices) {
|
|
|
3367
3367
|
}
|
|
3368
3368
|
function isRecognizedToken(address, chain) {
|
|
3369
3369
|
if (address === void 0 || chain === void 0) return false;
|
|
3370
|
-
if (chain === "solana") return
|
|
3370
|
+
if (chain === "solana") return _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, address) !== void 0;
|
|
3371
3371
|
if (chain === "hypercore") {
|
|
3372
|
-
return
|
|
3372
|
+
return _chunkP5T4XSN2cjs.HYPERCORE_SOURCE_TOKENS.some(
|
|
3373
3373
|
(t) => t.address.toLowerCase() === address.toLowerCase()
|
|
3374
3374
|
);
|
|
3375
3375
|
}
|
|
3376
|
-
return EVM_ADDRESS_RE.test(address) &&
|
|
3376
|
+
return EVM_ADDRESS_RE.test(address) && _chunkP5T4XSN2cjs.isRegistryTokenOnChain.call(void 0, address, chain);
|
|
3377
3377
|
}
|
|
3378
3378
|
function estimateReceiveAmount(params) {
|
|
3379
3379
|
const {
|
|
@@ -4089,8 +4089,8 @@ function ProcessingStep({
|
|
|
4089
4089
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
4090
4090
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
4091
4091
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
4092
|
-
const sourceExplorerUrl =
|
|
4093
|
-
const destExplorerUrl = destinationTxHash ?
|
|
4092
|
+
const sourceExplorerUrl = _chunkP5T4XSN2cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
4093
|
+
const destExplorerUrl = destinationTxHash ? _chunkP5T4XSN2cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
4094
4094
|
const sourceDisplay = (() => {
|
|
4095
4095
|
const resolved = resolveTokenDisplay(displaySourceToken, displaySourceChain, {
|
|
4096
4096
|
symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
|
|
@@ -4164,10 +4164,10 @@ function ProcessingStep({
|
|
|
4164
4164
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
4165
4165
|
void delayPhaseId;
|
|
4166
4166
|
void hasEscalatedDelay;
|
|
4167
|
-
const sourceChainIcon =
|
|
4168
|
-
const targetChainIcon =
|
|
4169
|
-
const sourceChainName =
|
|
4170
|
-
const targetChainName =
|
|
4167
|
+
const sourceChainIcon = _chunkP5T4XSN2cjs.getChainIcon.call(void 0, displaySourceChain);
|
|
4168
|
+
const targetChainIcon = _chunkP5T4XSN2cjs.getChainIcon.call(void 0, targetChain);
|
|
4169
|
+
const sourceChainName = _chunkP5T4XSN2cjs.getChainName.call(void 0, displaySourceChain);
|
|
4170
|
+
const targetChainName = _chunkP5T4XSN2cjs.getChainName.call(void 0, targetChain);
|
|
4171
4171
|
const timerText = formatTimer(elapsedSeconds);
|
|
4172
4172
|
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _181 => _181.feeSponsored]), () => ( false));
|
|
4173
4173
|
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _182 => _182.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isUnsupportedChainSwitchError,
|
|
3
3
|
rpcUrlFor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RQDAMFV7.mjs";
|
|
5
5
|
import {
|
|
6
6
|
SUPPORTED_CHAINS,
|
|
7
7
|
getChainName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2O2FJYRY.mjs";
|
|
9
9
|
|
|
10
10
|
// src/core/reown.tsx
|
|
11
11
|
import { useState } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUNVVUULPcjs = require('./chunk-UNVVUULP.cjs');
|
|
4
4
|
|
|
5
5
|
// src/core/dapp-imports/polymarket/constants.ts
|
|
6
6
|
var POLYMARKET_POLYGON_CHAIN_ID = 137;
|
|
@@ -100,7 +100,7 @@ async function executePolymarketSafeTransfer(params) {
|
|
|
100
100
|
}
|
|
101
101
|
const isOwner = await publicClient.readContract({
|
|
102
102
|
address: safeAddress,
|
|
103
|
-
abi:
|
|
103
|
+
abi: _chunkUNVVUULPcjs.SAFE_ABI,
|
|
104
104
|
functionName: "isOwner",
|
|
105
105
|
args: [account.address]
|
|
106
106
|
});
|
|
@@ -117,7 +117,7 @@ async function executePolymarketSafeTransfer(params) {
|
|
|
117
117
|
account,
|
|
118
118
|
chain,
|
|
119
119
|
address: safeAddress,
|
|
120
|
-
abi:
|
|
120
|
+
abi: _chunkUNVVUULPcjs.SAFE_ABI,
|
|
121
121
|
functionName: "execTransaction",
|
|
122
122
|
args: [
|
|
123
123
|
safeTx.to,
|
|
@@ -136,7 +136,7 @@ async function executePolymarketSafeTransfer(params) {
|
|
|
136
136
|
hash: txHash
|
|
137
137
|
});
|
|
138
138
|
const parsed = _viem.parseEventLogs.call(void 0, {
|
|
139
|
-
abi:
|
|
139
|
+
abi: _chunkUNVVUULPcjs.SAFE_ABI,
|
|
140
140
|
logs: receipt.logs.filter(
|
|
141
141
|
(log) => log.address.toLowerCase() === safeAddress.toLowerCase()
|
|
142
142
|
),
|
|
@@ -117,7 +117,7 @@ var ICON_SLUG_ALIASES = {
|
|
|
117
117
|
xdai: "dai"
|
|
118
118
|
};
|
|
119
119
|
function tokenIconUrl(symbol) {
|
|
120
|
-
const key = symbol.toLowerCase();
|
|
120
|
+
const key = symbol.toLowerCase().replace(/₮/g, "t");
|
|
121
121
|
const slug = _nullishCoalesce(ICON_SLUG_ALIASES[key], () => ( key));
|
|
122
122
|
return `https://s3.rhinestone.dev/tokens/${slug}.svg`;
|
|
123
123
|
}
|