@rhinestone/deposit-modal 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-RZ6VSMKP.mjs → DepositModalReown-4BSHOQ5Y.mjs} +6 -6
- package/dist/{DepositModalReown-J5YFZKFS.cjs → DepositModalReown-UND3DEJH.cjs} +9 -9
- package/dist/{WithdrawModalReown-4YUV2WWV.mjs → WithdrawModalReown-FVXSSGY5.mjs} +5 -5
- package/dist/{WithdrawModalReown-B6BGY52S.cjs → WithdrawModalReown-TVZWJKQI.cjs} +8 -8
- package/dist/{chunk-LXTAAHPC.mjs → chunk-2JPB3PLB.mjs} +2 -2
- package/dist/{chunk-4IOQIWDY.cjs → chunk-4NN7UTWQ.cjs} +4 -4
- package/dist/{chunk-5S5BQ2GM.mjs → chunk-7KHEIMWD.mjs} +24 -11
- package/dist/{chunk-IRI34U6N.cjs → chunk-7OKA6GNA.cjs} +255 -137
- package/dist/{chunk-XLXJW44N.cjs → chunk-D3Y7ZBED.cjs} +349 -336
- package/dist/{chunk-YLIPI3NU.mjs → chunk-DABKCJVL.mjs} +1 -1
- package/dist/{chunk-JRFPKFL6.cjs → chunk-HQWZCOMS.cjs} +105 -98
- package/dist/{chunk-RXWJ267K.mjs → chunk-NASHLEVQ.mjs} +165 -47
- package/dist/{chunk-SX52FXKH.mjs → chunk-O5OKA27M.mjs} +7 -0
- package/dist/{chunk-VURI4G2Z.cjs → chunk-Q3W53BKR.cjs} +7 -7
- package/dist/{chunk-7JJ4EFDY.mjs → chunk-T43VUEJH.mjs} +12 -5
- package/dist/{chunk-PUMTR35E.cjs → chunk-U7SVYWVD.cjs} +8 -1
- package/dist/{chunk-TYB6AA6D.mjs → chunk-WK5AFRSP.mjs} +1 -1
- package/dist/{chunk-WL7AXYQ4.cjs → chunk-XRWQMIBY.cjs} +3 -3
- 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/styles.css +29 -0
- 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-7KHEIMWD.mjs";
|
|
4
|
+
import "./chunk-DABKCJVL.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-2JPB3PLB.mjs";
|
|
9
|
+
import "./chunk-NASHLEVQ.mjs";
|
|
10
|
+
import "./chunk-WK5AFRSP.mjs";
|
|
11
|
+
import "./chunk-O5OKA27M.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 _chunkD3Y7ZBEDcjs = require('./chunk-D3Y7ZBED.cjs');
|
|
4
|
+
require('./chunk-4NN7UTWQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
8
|
+
var _chunkQ3W53BKRcjs = require('./chunk-Q3W53BKR.cjs');
|
|
9
|
+
require('./chunk-7OKA6GNA.cjs');
|
|
10
|
+
require('./chunk-XRWQMIBY.cjs');
|
|
11
|
+
require('./chunk-U7SVYWVD.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 = _chunkQ3W53BKRcjs.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
|
+
_chunkD3Y7ZBEDcjs.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
|
+
_chunkQ3W53BKRcjs.ReownWalletProvider,
|
|
52
52
|
{
|
|
53
53
|
projectId: props.reownAppId,
|
|
54
54
|
theme: props.theme,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T43VUEJH.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-2JPB3PLB.mjs";
|
|
8
|
+
import "./chunk-NASHLEVQ.mjs";
|
|
9
|
+
import "./chunk-WK5AFRSP.mjs";
|
|
10
|
+
import "./chunk-O5OKA27M.mjs";
|
|
11
11
|
|
|
12
12
|
// src/WithdrawModalReown.tsx
|
|
13
13
|
import { useCallback } from "react";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHQWZCOMScjs = require('./chunk-HQWZCOMS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
7
|
+
var _chunkQ3W53BKRcjs = require('./chunk-Q3W53BKR.cjs');
|
|
8
|
+
require('./chunk-7OKA6GNA.cjs');
|
|
9
|
+
require('./chunk-XRWQMIBY.cjs');
|
|
10
|
+
require('./chunk-U7SVYWVD.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 = _chunkQ3W53BKRcjs.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
|
+
_chunkHQWZCOMScjs.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
|
+
_chunkQ3W53BKRcjs.ReownWalletProvider,
|
|
36
36
|
{
|
|
37
37
|
projectId: props.reownAppId,
|
|
38
38
|
theme: props.theme,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isUnsupportedChainSwitchError,
|
|
3
3
|
rpcUrlFor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NASHLEVQ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
SUPPORTED_CHAINS,
|
|
7
7
|
getChainName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-O5OKA27M.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 _chunkXRWQMIBYcjs = require('./chunk-XRWQMIBY.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: _chunkXRWQMIBYcjs.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: _chunkXRWQMIBYcjs.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: _chunkXRWQMIBYcjs.SAFE_ABI,
|
|
140
140
|
logs: receipt.logs.filter(
|
|
141
141
|
(log) => log.address.toLowerCase() === safeAddress.toLowerCase()
|
|
142
142
|
),
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
executePolymarketSafeTransfer,
|
|
8
8
|
fetchPolymarketProxyWallet,
|
|
9
9
|
readPolymarketBalances
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DABKCJVL.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-NASHLEVQ.mjs";
|
|
73
76
|
import {
|
|
74
77
|
SAFE_ABI
|
|
75
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-WK5AFRSP.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-O5OKA27M.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-4BSHOQ5Y.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7786
7799
|
);
|
|
7787
7800
|
function sortByCreatedAtDesc(items) {
|
|
7788
7801
|
return [...items].sort((a, b) => {
|