@rhinestone/deposit-modal 0.0.0-dev-20260710154333 → 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-VTS2T7EN.mjs → DepositModalReown-H3QYGFGE.mjs} +6 -6
- package/dist/{DepositModalReown-XJCRO77O.cjs → DepositModalReown-UBYRZQFA.cjs} +9 -9
- package/dist/{WithdrawModalReown-BIWBPHRC.cjs → WithdrawModalReown-MTW2KDKU.cjs} +8 -8
- package/dist/{WithdrawModalReown-ZDYJ27YI.mjs → WithdrawModalReown-VYCUYAJV.mjs} +5 -5
- package/dist/{chunk-SX52FXKH.mjs → chunk-2O2FJYRY.mjs} +8 -1
- package/dist/{chunk-PHORMFT5.mjs → chunk-FPUOL3GB.mjs} +24 -11
- package/dist/{chunk-LSP5K5VK.cjs → chunk-I3SAYG6C.cjs} +7 -7
- package/dist/{chunk-TDNANUVX.cjs → chunk-JBK5PQI2.cjs} +234 -131
- package/dist/{chunk-QNPWCMBC.mjs → chunk-OPFYTBRR.mjs} +2 -2
- package/dist/{chunk-4IOQIWDY.cjs → chunk-ORKEBFMR.cjs} +4 -4
- package/dist/{chunk-PUMTR35E.cjs → chunk-P5T4XSN2.cjs} +9 -2
- package/dist/{chunk-YLIPI3NU.mjs → chunk-RARNNVZO.mjs} +1 -1
- package/dist/{chunk-TYB6AA6D.mjs → chunk-RH6XQHMA.mjs} +1 -1
- package/dist/{chunk-FD5EPCES.mjs → chunk-RQDAMFV7.mjs} +144 -41
- package/dist/{chunk-YSXPL5DU.cjs → chunk-TEXCR5LM.cjs} +105 -98
- package/dist/{chunk-WL7AXYQ4.cjs → chunk-UNVVUULP.cjs} +3 -3
- package/dist/{chunk-DU2AZ5N4.cjs → chunk-VX3DOVTY.cjs} +349 -336
- package/dist/{chunk-CSGUL5ER.mjs → chunk-ZNO5SGJS.mjs} +12 -5
- 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
|
}
|
|
@@ -634,6 +634,12 @@ function findChainIdForToken(address) {
|
|
|
634
634
|
}
|
|
635
635
|
return void 0;
|
|
636
636
|
}
|
|
637
|
+
function isRegistryTokenOnChain(token, chainId) {
|
|
638
|
+
const normalized = token.toLowerCase();
|
|
639
|
+
if (normalized === NATIVE_TOKEN_ADDRESS) return true;
|
|
640
|
+
const chainEntry = chainRegistry[String(chainId)];
|
|
641
|
+
return chainEntry ? chainEntry.tokens.some((t) => t.address.toLowerCase() === normalized) : false;
|
|
642
|
+
}
|
|
637
643
|
var NATIVE_SYMBOL_BY_CHAIN = {
|
|
638
644
|
[bsc2.id]: "BNB",
|
|
639
645
|
[plasma2.id]: "XPL",
|
|
@@ -781,6 +787,7 @@ export {
|
|
|
781
787
|
findTokenDecimals,
|
|
782
788
|
getTokenDecimalsByAddress,
|
|
783
789
|
findChainIdForToken,
|
|
790
|
+
isRegistryTokenOnChain,
|
|
784
791
|
getNativeSymbol,
|
|
785
792
|
getTokenSymbol,
|
|
786
793
|
getTargetTokenSymbol,
|
|
@@ -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,
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
debugError,
|
|
48
48
|
debugLog,
|
|
49
49
|
failureMessageForEvent,
|
|
50
|
+
fetchTokenPriceUsd,
|
|
50
51
|
formatQuotedReceive,
|
|
51
52
|
formatReceiveEstimate,
|
|
52
53
|
formatTokenAmount,
|
|
@@ -58,8 +59,10 @@ import {
|
|
|
58
59
|
getHyperEvmReadClient,
|
|
59
60
|
getPublicClient,
|
|
60
61
|
isDepositEvent,
|
|
62
|
+
isDisplayStablecoinSymbol,
|
|
61
63
|
isFailedEvent,
|
|
62
64
|
isNativeAsset,
|
|
65
|
+
isRecognizedToken,
|
|
63
66
|
loadSessionOwnerFromStorage,
|
|
64
67
|
portfolioToAssets,
|
|
65
68
|
rpcUrlFor,
|
|
@@ -69,10 +72,10 @@ import {
|
|
|
69
72
|
useLatestRef,
|
|
70
73
|
useRpcUrls,
|
|
71
74
|
useStableRpcUrls
|
|
72
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-RQDAMFV7.mjs";
|
|
73
76
|
import {
|
|
74
77
|
SAFE_ABI
|
|
75
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-RH6XQHMA.mjs";
|
|
76
79
|
import {
|
|
77
80
|
DEFAULT_BACKEND_URL,
|
|
78
81
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -104,7 +107,7 @@ import {
|
|
|
104
107
|
isVirtualDestination,
|
|
105
108
|
parseEvmChainId,
|
|
106
109
|
targetChainToCaip2
|
|
107
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-2O2FJYRY.mjs";
|
|
108
111
|
|
|
109
112
|
// src/DepositModal.tsx
|
|
110
113
|
import {
|
|
@@ -906,7 +909,11 @@ function ConfirmStep({
|
|
|
906
909
|
sourceSymbol: asset.symbol,
|
|
907
910
|
targetSymbol,
|
|
908
911
|
sourceAmountUsd,
|
|
909
|
-
|
|
912
|
+
sourceTrusted: isRecognizedToken(asset.token, asset.chainId),
|
|
913
|
+
// The target is the curated deposit destination, so a stablecoin target
|
|
914
|
+
// estimates at $1 when unquoted (DepositFlow skips fetching stablecoin
|
|
915
|
+
// target prices). Not applied to the source — that can be a held token.
|
|
916
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : isDisplayStablecoinSymbol(targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
|
|
910
917
|
});
|
|
911
918
|
if (estimate !== void 0) return estimate;
|
|
912
919
|
return targetSymbol;
|
|
@@ -3631,7 +3638,10 @@ function SolanaConfirmStep({
|
|
|
3631
3638
|
sourceSymbol: token.symbol,
|
|
3632
3639
|
targetSymbol,
|
|
3633
3640
|
sourceAmountUsd,
|
|
3634
|
-
|
|
3641
|
+
sourceTrusted: isRecognizedToken(token.mint, "solana"),
|
|
3642
|
+
// Curated stablecoin target estimates at $1 when unquoted; never applied
|
|
3643
|
+
// to the source (a held token). See ConfirmStep for the rationale.
|
|
3644
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : isDisplayStablecoinSymbol(targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
|
|
3635
3645
|
});
|
|
3636
3646
|
if (estimate !== void 0) return estimate;
|
|
3637
3647
|
return targetSymbol;
|
|
@@ -5797,15 +5807,18 @@ function DepositFlow({
|
|
|
5797
5807
|
return;
|
|
5798
5808
|
}
|
|
5799
5809
|
let cancelled = false;
|
|
5800
|
-
service
|
|
5810
|
+
fetchTokenPriceUsd(service, {
|
|
5811
|
+
chainId: targetChain,
|
|
5812
|
+
address: targetToken,
|
|
5813
|
+
symbol: targetSymbol
|
|
5814
|
+
}).then((price) => {
|
|
5801
5815
|
if (cancelled) return;
|
|
5802
|
-
|
|
5803
|
-
targetMarketPriceRef.current = typeof price === "number" && price > 0 ? price : null;
|
|
5816
|
+
targetMarketPriceRef.current = price;
|
|
5804
5817
|
});
|
|
5805
5818
|
return () => {
|
|
5806
5819
|
cancelled = true;
|
|
5807
5820
|
};
|
|
5808
|
-
}, [service, targetSymbol, isTargetStablecoin]);
|
|
5821
|
+
}, [service, targetSymbol, isTargetStablecoin, targetChain, targetToken]);
|
|
5809
5822
|
const walletSignerContext = useMemo7(() => {
|
|
5810
5823
|
if (flowMode === "deposit-address") {
|
|
5811
5824
|
return null;
|
|
@@ -7782,7 +7795,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7782
7795
|
// src/DepositModal.tsx
|
|
7783
7796
|
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7784
7797
|
var ReownDepositInner = lazy2(
|
|
7785
|
-
() => import("./DepositModalReown-
|
|
7798
|
+
() => import("./DepositModalReown-H3QYGFGE.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7786
7799
|
);
|
|
7787
7800
|
function sortByCreatedAtDesc(items) {
|
|
7788
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;
|