@rhinestone/deposit-modal 0.8.1 → 0.8.2
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-UND3DEJH.cjs → DepositModalReown-A2W6R27Q.cjs} +9 -9
- package/dist/{DepositModalReown-4BSHOQ5Y.mjs → DepositModalReown-IB5WUXVT.mjs} +6 -6
- package/dist/{WithdrawModalReown-FVXSSGY5.mjs → WithdrawModalReown-A4S4BJHG.mjs} +5 -5
- package/dist/{WithdrawModalReown-TVZWJKQI.cjs → WithdrawModalReown-KUWNNA2X.cjs} +8 -8
- package/dist/{chunk-O5OKA27M.mjs → chunk-2O2FJYRY.mjs} +1 -1
- package/dist/{chunk-HQWZCOMS.cjs → chunk-3WIHTUQ6.cjs} +99 -99
- package/dist/{chunk-D3Y7ZBED.cjs → chunk-46BRQZ2P.cjs} +486 -457
- package/dist/{chunk-2JPB3PLB.mjs → chunk-4BLOPOVO.mjs} +2 -2
- package/dist/{chunk-Q3W53BKR.cjs → chunk-5E67UM3V.cjs} +7 -7
- package/dist/{chunk-7OKA6GNA.cjs → chunk-DSXMWQYB.cjs} +110 -105
- package/dist/{chunk-7KHEIMWD.mjs → chunk-KGZU3BL2.mjs} +40 -11
- 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-TUSEN26M.mjs} +8 -3
- package/dist/{chunk-XRWQMIBY.cjs → chunk-UNVVUULP.cjs} +3 -3
- package/dist/{chunk-T43VUEJH.mjs → chunk-XK5RH4FZ.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/styles.css +118 -1
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -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-TUSEN26M.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 {
|
|
@@ -2312,6 +2312,7 @@ function SwappedIframeStep({
|
|
|
2312
2312
|
onImmersiveChange
|
|
2313
2313
|
}) {
|
|
2314
2314
|
const [widgetUrl, setWidgetUrl] = useState6(null);
|
|
2315
|
+
const [iframeSrc, setIframeSrc] = useState6(null);
|
|
2315
2316
|
const [loadError, setLoadError] = useState6(null);
|
|
2316
2317
|
const [iframeLoaded, setIframeLoaded] = useState6(false);
|
|
2317
2318
|
const [retryToken, setRetryToken] = useState6(0);
|
|
@@ -2347,6 +2348,7 @@ function SwappedIframeStep({
|
|
|
2347
2348
|
setLoadError(null);
|
|
2348
2349
|
setIframeLoaded(false);
|
|
2349
2350
|
setWidgetUrl(null);
|
|
2351
|
+
setIframeSrc(null);
|
|
2350
2352
|
setOrderState(null);
|
|
2351
2353
|
setLatestEvent(null);
|
|
2352
2354
|
setPhase("iframe");
|
|
@@ -2388,6 +2390,9 @@ function SwappedIframeStep({
|
|
|
2388
2390
|
}, IFRAME_LOAD_TIMEOUT_MS);
|
|
2389
2391
|
return () => clearTimeout(timer);
|
|
2390
2392
|
}, [widgetUrl, iframeLoaded, loadError]);
|
|
2393
|
+
useEffect6(() => {
|
|
2394
|
+
setIframeSrc(widgetUrl && !loadError ? widgetUrl : null);
|
|
2395
|
+
}, [widgetUrl, loadError, retryToken]);
|
|
2391
2396
|
useEffect6(() => {
|
|
2392
2397
|
let cancelled = false;
|
|
2393
2398
|
let timeoutId;
|
|
@@ -2550,6 +2555,13 @@ function SwappedIframeStep({
|
|
|
2550
2555
|
onImmersiveChangeRef.current?.(immersive);
|
|
2551
2556
|
}, [immersive]);
|
|
2552
2557
|
useEffect6(() => () => onImmersiveChangeRef.current?.(false), []);
|
|
2558
|
+
const handleRetry = () => {
|
|
2559
|
+
setIframeSrc(null);
|
|
2560
|
+
setWidgetUrl(null);
|
|
2561
|
+
setIframeLoaded(false);
|
|
2562
|
+
setLoadError(null);
|
|
2563
|
+
setRetryToken((n) => n + 1);
|
|
2564
|
+
};
|
|
2553
2565
|
if (phase === "tracker") {
|
|
2554
2566
|
const paymentReceived = stepStates[0] === "complete";
|
|
2555
2567
|
if (variant === "connect" && !terminalState && paymentReceived) {
|
|
@@ -2562,7 +2574,7 @@ function SwappedIframeStep({
|
|
|
2562
2574
|
currency: orderState?.orderCrypto ?? "USDC",
|
|
2563
2575
|
stepStates,
|
|
2564
2576
|
terminal: terminalState,
|
|
2565
|
-
onRetry:
|
|
2577
|
+
onRetry: handleRetry,
|
|
2566
2578
|
onClose
|
|
2567
2579
|
}
|
|
2568
2580
|
);
|
|
@@ -2576,7 +2588,7 @@ function SwappedIframeStep({
|
|
|
2576
2588
|
{
|
|
2577
2589
|
type: "button",
|
|
2578
2590
|
className: "rs-fiat-onramp-retry",
|
|
2579
|
-
onClick:
|
|
2591
|
+
onClick: handleRetry,
|
|
2580
2592
|
children: "Retry"
|
|
2581
2593
|
}
|
|
2582
2594
|
)
|
|
@@ -2586,12 +2598,20 @@ function SwappedIframeStep({
|
|
|
2586
2598
|
"iframe",
|
|
2587
2599
|
{
|
|
2588
2600
|
ref: iframeRef,
|
|
2589
|
-
src:
|
|
2601
|
+
src: iframeSrc ?? void 0,
|
|
2590
2602
|
title: iframeTitle,
|
|
2591
2603
|
className: "rs-fiat-onramp-iframe",
|
|
2592
2604
|
sandbox: "allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation",
|
|
2593
2605
|
allow: "payment; camera; microphone; clipboard-write; geolocation",
|
|
2594
|
-
onLoad: () =>
|
|
2606
|
+
onLoad: () => {
|
|
2607
|
+
try {
|
|
2608
|
+
if (iframeRef.current?.contentWindow?.location?.href === "about:blank") {
|
|
2609
|
+
return;
|
|
2610
|
+
}
|
|
2611
|
+
} catch {
|
|
2612
|
+
}
|
|
2613
|
+
setIframeLoaded(true);
|
|
2614
|
+
}
|
|
2595
2615
|
},
|
|
2596
2616
|
retryToken
|
|
2597
2617
|
)
|
|
@@ -4256,7 +4276,8 @@ function createInitialState(overrides) {
|
|
|
4256
4276
|
step: "connect",
|
|
4257
4277
|
mode: null,
|
|
4258
4278
|
isConnectSelectionConfirmed: false,
|
|
4259
|
-
hasNavigatedBack: false
|
|
4279
|
+
hasNavigatedBack: false,
|
|
4280
|
+
methodTab: "crypto"
|
|
4260
4281
|
},
|
|
4261
4282
|
wallet: {
|
|
4262
4283
|
selectedWalletId: null
|
|
@@ -4633,6 +4654,11 @@ function applyAction(state, action) {
|
|
|
4633
4654
|
step: "deposit-address"
|
|
4634
4655
|
}
|
|
4635
4656
|
};
|
|
4657
|
+
case "connect/method-tab-changed":
|
|
4658
|
+
return {
|
|
4659
|
+
...state,
|
|
4660
|
+
flow: { ...state.flow, methodTab: action.tab }
|
|
4661
|
+
};
|
|
4636
4662
|
case "connect/fiat-onramp-selected":
|
|
4637
4663
|
return {
|
|
4638
4664
|
...state,
|
|
@@ -5066,7 +5092,8 @@ function applyAction(state, action) {
|
|
|
5066
5092
|
step: "connect",
|
|
5067
5093
|
mode: null,
|
|
5068
5094
|
isConnectSelectionConfirmed: false,
|
|
5069
|
-
hasNavigatedBack: false
|
|
5095
|
+
hasNavigatedBack: false,
|
|
5096
|
+
methodTab: "crypto"
|
|
5070
5097
|
},
|
|
5071
5098
|
wallet: {
|
|
5072
5099
|
selectedWalletId: null
|
|
@@ -6980,6 +7007,8 @@ function DepositFlow({
|
|
|
6980
7007
|
ConnectStep,
|
|
6981
7008
|
{
|
|
6982
7009
|
walletRows,
|
|
7010
|
+
defaultMethodTab: flowSlice.methodTab,
|
|
7011
|
+
onMethodTabChange: (tab) => storeApi.dispatch({ type: "connect/method-tab-changed", tab }),
|
|
6983
7012
|
transferCryptoState: dappAddress ? transferCryptoState : void 0,
|
|
6984
7013
|
transferCryptoErrorReason: dappAddress ? transferCryptoEntry.message ?? void 0 : void 0,
|
|
6985
7014
|
onSelectTransferCrypto: enableQrTransfer && dappAddress ? () => {
|
|
@@ -7795,7 +7824,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
7795
7824
|
// src/DepositModal.tsx
|
|
7796
7825
|
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7797
7826
|
var ReownDepositInner = lazy2(
|
|
7798
|
-
() => import("./DepositModalReown-
|
|
7827
|
+
() => import("./DepositModalReown-IB5WUXVT.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7799
7828
|
);
|
|
7800
7829
|
function sortByCreatedAtDesc(items) {
|
|
7801
7830
|
return [...items].sort((a, b) => {
|
|
@@ -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
|
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
parseEvmChainId,
|
|
20
20
|
toEvmCaip2,
|
|
21
21
|
tokenIconUrl
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2O2FJYRY.mjs";
|
|
23
23
|
|
|
24
24
|
// src/components/ui/Modal.tsx
|
|
25
25
|
import {
|
|
@@ -2524,7 +2524,8 @@ function ConnectStep({
|
|
|
2524
2524
|
onSelectDappImport,
|
|
2525
2525
|
title = "Deposit",
|
|
2526
2526
|
subtitle,
|
|
2527
|
-
defaultMethodTab = "crypto"
|
|
2527
|
+
defaultMethodTab = "crypto",
|
|
2528
|
+
onMethodTabChange
|
|
2528
2529
|
}) {
|
|
2529
2530
|
const rows = walletRows ?? [];
|
|
2530
2531
|
const handleConnect = onConnect ?? onRequestConnect;
|
|
@@ -2736,6 +2737,10 @@ function ConnectStep({
|
|
|
2736
2737
|
const hasCash = cashRows.length > 0;
|
|
2737
2738
|
const showToggle = hasCrypto && hasCash;
|
|
2738
2739
|
const [tab, setTab] = useState(defaultMethodTab);
|
|
2740
|
+
const handleTabChange = (next) => {
|
|
2741
|
+
setTab(next);
|
|
2742
|
+
onMethodTabChange?.(next);
|
|
2743
|
+
};
|
|
2739
2744
|
const activeTab = showToggle ? tab : hasCash && !hasCrypto ? "cash" : "crypto";
|
|
2740
2745
|
const activeRows = activeTab === "cash" ? cashRows : cryptoRows;
|
|
2741
2746
|
useEffect3(() => {
|
|
@@ -2759,7 +2764,7 @@ function ConnectStep({
|
|
|
2759
2764
|
{
|
|
2760
2765
|
ariaLabel: "Deposit method type",
|
|
2761
2766
|
value: activeTab,
|
|
2762
|
-
onChange:
|
|
2767
|
+
onChange: handleTabChange,
|
|
2763
2768
|
options: [
|
|
2764
2769
|
{ value: "crypto", label: "Crypto" },
|
|
2765
2770
|
{ value: "cash", label: "Cash" }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkP5T4XSN2cjs = require('./chunk-P5T4XSN2.cjs');
|
|
4
4
|
|
|
5
5
|
// src/core/safe.ts
|
|
6
6
|
|
|
@@ -80,7 +80,7 @@ async function executeSafeEthTransfer(params) {
|
|
|
80
80
|
throw new Error("Wallet not connected");
|
|
81
81
|
}
|
|
82
82
|
if (chain.id !== chainId) {
|
|
83
|
-
throw new Error(`Switch to ${
|
|
83
|
+
throw new Error(`Switch to ${_chunkP5T4XSN2cjs.getChainName.call(void 0, chainId)} to sign`);
|
|
84
84
|
}
|
|
85
85
|
const isOwner = await publicClient.readContract({
|
|
86
86
|
address: safeAddress,
|
|
@@ -163,7 +163,7 @@ async function executeSafeErc20Transfer(params) {
|
|
|
163
163
|
throw new Error("Wallet not connected");
|
|
164
164
|
}
|
|
165
165
|
if (chain.id !== chainId) {
|
|
166
|
-
throw new Error(`Switch to ${
|
|
166
|
+
throw new Error(`Switch to ${_chunkP5T4XSN2cjs.getChainName.call(void 0, chainId)} to sign`);
|
|
167
167
|
}
|
|
168
168
|
const isOwner = await publicClient.readContract({
|
|
169
169
|
address: safeAddress,
|
|
@@ -35,12 +35,12 @@ import {
|
|
|
35
35
|
useRpcUrls,
|
|
36
36
|
useStableRpcUrls,
|
|
37
37
|
useTokenPrices
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-TUSEN26M.mjs";
|
|
39
39
|
import {
|
|
40
40
|
buildSafeTransaction,
|
|
41
41
|
executeSafeErc20Transfer,
|
|
42
42
|
executeSafeEthTransfer
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-RH6XQHMA.mjs";
|
|
44
44
|
import {
|
|
45
45
|
DEFAULT_BACKEND_URL,
|
|
46
46
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
getTokenDecimalsByAddress,
|
|
54
54
|
getTokenSymbol,
|
|
55
55
|
toEvmCaip2
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-2O2FJYRY.mjs";
|
|
57
57
|
|
|
58
58
|
// src/WithdrawModal.tsx
|
|
59
59
|
import {
|
|
@@ -1597,7 +1597,7 @@ function deriveStepView(step, _registration) {
|
|
|
1597
1597
|
// src/WithdrawModal.tsx
|
|
1598
1598
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1599
1599
|
var ReownWithdrawInner = lazy(
|
|
1600
|
-
() => import("./WithdrawModalReown-
|
|
1600
|
+
() => import("./WithdrawModalReown-A4S4BJHG.mjs").then((m) => ({
|
|
1601
1601
|
default: m.WithdrawModalReown
|
|
1602
1602
|
}))
|
|
1603
1603
|
);
|
package/dist/constants.cjs
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkP5T4XSN2cjs = require('./chunk-P5T4XSN2.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -69,4 +69,4 @@ var _chunkU7SVYWVDcjs = require('./chunk-U7SVYWVD.cjs');
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
exports.CHAIN_BY_ID =
|
|
72
|
+
exports.CHAIN_BY_ID = _chunkP5T4XSN2cjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkP5T4XSN2cjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkP5T4XSN2cjs.DEFAULT_SIGNER_ADDRESS; exports.HYPERCORE_CHAIN_ID = _chunkP5T4XSN2cjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkP5T4XSN2cjs.HYPERCORE_USDC_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkP5T4XSN2cjs.NATIVE_TOKEN_ADDRESS; exports.SOLANA_TOKENS = _chunkP5T4XSN2cjs.SOLANA_TOKENS; exports.SOURCE_CHAINS = _chunkP5T4XSN2cjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkP5T4XSN2cjs.SUPPORTED_CHAINS; exports.chainRegistry = _chunkP5T4XSN2cjs.chainRegistry; exports.findChainIdForToken = _chunkP5T4XSN2cjs.findChainIdForToken; exports.getChainBadge = _chunkP5T4XSN2cjs.getChainBadge; exports.getChainIcon = _chunkP5T4XSN2cjs.getChainIcon; exports.getChainId = _chunkP5T4XSN2cjs.getChainId; exports.getChainName = _chunkP5T4XSN2cjs.getChainName; exports.getChainObject = _chunkP5T4XSN2cjs.getChainObject; exports.getExplorerName = _chunkP5T4XSN2cjs.getExplorerName; exports.getExplorerTxUrl = _chunkP5T4XSN2cjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkP5T4XSN2cjs.getExplorerUrl; exports.getSolanaTokenByMint = _chunkP5T4XSN2cjs.getSolanaTokenByMint; exports.getSolanaTokenBySymbol = _chunkP5T4XSN2cjs.getSolanaTokenBySymbol; exports.getSupportedChainIds = _chunkP5T4XSN2cjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkP5T4XSN2cjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkP5T4XSN2cjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkP5T4XSN2cjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkP5T4XSN2cjs.getTokenAddress; exports.getTokenDecimals = _chunkP5T4XSN2cjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkP5T4XSN2cjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkP5T4XSN2cjs.getTokenIcon; exports.getTokenSymbol = _chunkP5T4XSN2cjs.getTokenSymbol; exports.getUsdcAddress = _chunkP5T4XSN2cjs.getUsdcAddress; exports.getUsdcDecimals = _chunkP5T4XSN2cjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkP5T4XSN2cjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunkP5T4XSN2cjs.tokenIconUrl;
|
package/dist/constants.mjs
CHANGED
package/dist/deposit.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
3
|
+
var _chunk46BRQZ2Pcjs = require('./chunk-46BRQZ2P.cjs');
|
|
4
|
+
require('./chunk-ORKEBFMR.cjs');
|
|
5
|
+
require('./chunk-DSXMWQYB.cjs');
|
|
6
|
+
require('./chunk-UNVVUULP.cjs');
|
|
7
|
+
require('./chunk-P5T4XSN2.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.DepositModal =
|
|
10
|
+
exports.DepositModal = _chunk46BRQZ2Pcjs.DepositModal;
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-KGZU3BL2.mjs";
|
|
4
|
+
import "./chunk-RARNNVZO.mjs";
|
|
5
|
+
import "./chunk-TUSEN26M.mjs";
|
|
6
|
+
import "./chunk-RH6XQHMA.mjs";
|
|
7
|
+
import "./chunk-2O2FJYRY.mjs";
|
|
8
8
|
export {
|
|
9
9
|
DepositModal
|
|
10
10
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk46BRQZ2Pcjs = require('./chunk-46BRQZ2P.cjs');
|
|
4
|
+
require('./chunk-ORKEBFMR.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunk3WIHTUQ6cjs = require('./chunk-3WIHTUQ6.cjs');
|
|
8
|
+
require('./chunk-DSXMWQYB.cjs');
|
|
9
|
+
require('./chunk-UNVVUULP.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -40,7 +40,7 @@ require('./chunk-XRWQMIBY.cjs');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkP5T4XSN2cjs = require('./chunk-P5T4XSN2.cjs');
|
|
44
44
|
|
|
45
45
|
// src/core/reown-disconnect.ts
|
|
46
46
|
var _react = require('@reown/appkit/react');
|
|
@@ -89,4 +89,4 @@ async function disconnectWallet() {
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
exports.CHAIN_BY_ID =
|
|
92
|
+
exports.CHAIN_BY_ID = _chunkP5T4XSN2cjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkP5T4XSN2cjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkP5T4XSN2cjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunk46BRQZ2Pcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkP5T4XSN2cjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkP5T4XSN2cjs.HYPERCORE_USDC_ADDRESS; exports.HYPERCORE_USDT0_ADDRESS = _chunkP5T4XSN2cjs.HYPERCORE_USDT0_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkP5T4XSN2cjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkP5T4XSN2cjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkP5T4XSN2cjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunk3WIHTUQ6cjs.WithdrawModal; exports.chainRegistry = _chunkP5T4XSN2cjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunkP5T4XSN2cjs.findChainIdForToken; exports.getChainBadge = _chunkP5T4XSN2cjs.getChainBadge; exports.getChainIcon = _chunkP5T4XSN2cjs.getChainIcon; exports.getChainId = _chunkP5T4XSN2cjs.getChainId; exports.getChainName = _chunkP5T4XSN2cjs.getChainName; exports.getChainObject = _chunkP5T4XSN2cjs.getChainObject; exports.getExplorerName = _chunkP5T4XSN2cjs.getExplorerName; exports.getExplorerTxUrl = _chunkP5T4XSN2cjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkP5T4XSN2cjs.getExplorerUrl; exports.getSupportedChainIds = _chunkP5T4XSN2cjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkP5T4XSN2cjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkP5T4XSN2cjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkP5T4XSN2cjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkP5T4XSN2cjs.getTokenAddress; exports.getTokenDecimals = _chunkP5T4XSN2cjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkP5T4XSN2cjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkP5T4XSN2cjs.getTokenIcon; exports.getTokenSymbol = _chunkP5T4XSN2cjs.getTokenSymbol; exports.getUsdcAddress = _chunkP5T4XSN2cjs.getUsdcAddress; exports.getUsdcDecimals = _chunkP5T4XSN2cjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkP5T4XSN2cjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunkP5T4XSN2cjs.tokenIconUrl;
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-KGZU3BL2.mjs";
|
|
4
|
+
import "./chunk-RARNNVZO.mjs";
|
|
5
5
|
import {
|
|
6
6
|
WithdrawModal
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-XK5RH4FZ.mjs";
|
|
8
|
+
import "./chunk-TUSEN26M.mjs";
|
|
9
|
+
import "./chunk-RH6XQHMA.mjs";
|
|
10
10
|
import {
|
|
11
11
|
CHAIN_BY_ID,
|
|
12
12
|
DEFAULT_BACKEND_URL,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
getUsdcDecimals,
|
|
41
41
|
isSupportedTokenAddressForChain,
|
|
42
42
|
tokenIconUrl
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-2O2FJYRY.mjs";
|
|
44
44
|
|
|
45
45
|
// src/core/reown-disconnect.ts
|
|
46
46
|
import { modal } from "@reown/appkit/react";
|
package/dist/polymarket.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
5
|
+
var _chunkORKEBFMRcjs = require('./chunk-ORKEBFMR.cjs');
|
|
6
|
+
require('./chunk-UNVVUULP.cjs');
|
|
7
|
+
require('./chunk-P5T4XSN2.cjs');
|
|
8
8
|
|
|
9
9
|
// src/core/dapp-imports/polymarket/account.ts
|
|
10
10
|
|
|
@@ -23,12 +23,12 @@ async function getPolymarketAccount(params) {
|
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
const eoa = _viem.getAddress.call(void 0, params.eoa);
|
|
26
|
-
const proxyWallet = await
|
|
26
|
+
const proxyWallet = await _chunkORKEBFMRcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
|
|
27
27
|
if (!proxyWallet) return null;
|
|
28
28
|
throwIfAborted(signal);
|
|
29
29
|
let balances = { pusd: 0n, usdce: 0n };
|
|
30
30
|
try {
|
|
31
|
-
balances = await
|
|
31
|
+
balances = await _chunkORKEBFMRcjs.readPolymarketBalances.call(void 0, {
|
|
32
32
|
publicClient: polygonClient(rpcUrl),
|
|
33
33
|
proxyWallet
|
|
34
34
|
});
|
|
@@ -40,7 +40,7 @@ async function getPolymarketAccount(params) {
|
|
|
40
40
|
return {
|
|
41
41
|
eoa,
|
|
42
42
|
proxyWallet,
|
|
43
|
-
chainId:
|
|
43
|
+
chainId: _chunkORKEBFMRcjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
44
44
|
pusd,
|
|
45
45
|
usdce,
|
|
46
46
|
totalUsd: pusd.usd + usdce.usd
|
package/dist/polymarket.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
POLYMARKET_POLYGON_CHAIN_ID,
|
|
3
3
|
fetchPolymarketProxyWallet,
|
|
4
4
|
readPolymarketBalances
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-RARNNVZO.mjs";
|
|
6
|
+
import "./chunk-RH6XQHMA.mjs";
|
|
7
|
+
import "./chunk-2O2FJYRY.mjs";
|
|
8
8
|
|
|
9
9
|
// src/core/dapp-imports/polymarket/account.ts
|
|
10
10
|
import {
|
package/dist/styles.css
CHANGED
|
@@ -4970,7 +4970,10 @@
|
|
|
4970
4970
|
}
|
|
4971
4971
|
|
|
4972
4972
|
.rs-list-row-meta-icons--cards > .rs-card-network + .rs-card-network {
|
|
4973
|
-
|
|
4973
|
+
/* Cards paint in source order, so Mastercard (last) sits on top and Amex
|
|
4974
|
+
(first) beneath. Amex's mark is right-aligned, so this overlap is kept
|
|
4975
|
+
gentle — a larger one would tuck Amex's "EX" under Visa. */
|
|
4976
|
+
margin-left: -3px;
|
|
4974
4977
|
}
|
|
4975
4978
|
|
|
4976
4979
|
.rs-list-row-meta-icons--cards .rs-card-network svg {
|
|
@@ -5103,6 +5106,22 @@
|
|
|
5103
5106
|
min-height: 586px;
|
|
5104
5107
|
border: 0;
|
|
5105
5108
|
background: var(--rs-background);
|
|
5109
|
+
/* Swapped's embedded widget has no theme URL param and follows
|
|
5110
|
+
`prefers-color-scheme`. Setting `color-scheme` on the iframe element
|
|
5111
|
+
propagates into its (cross-origin) document's `prefers-color-scheme`, so
|
|
5112
|
+
we pin it to the modal's theme — a light modal renders a light widget and
|
|
5113
|
+
a dark modal a dark one — instead of following the visitor's OS setting.
|
|
5114
|
+
This base rule forces light; because it wins over the `color-scheme: dark`
|
|
5115
|
+
inherited from `.rs-modal[data-theme="dark"]`, the dark override below is
|
|
5116
|
+
required to re-assert dark. NOTE: this only takes effect because
|
|
5117
|
+
SwappedIframeStep assigns the iframe `src` one commit after mount — the
|
|
5118
|
+
widget reads prefers-color-scheme at its first navigation, which must
|
|
5119
|
+
happen after this rule is resolved on the element. */
|
|
5120
|
+
color-scheme: light;
|
|
5121
|
+
}
|
|
5122
|
+
|
|
5123
|
+
.rs-modal[data-theme="dark"] .rs-fiat-onramp-iframe {
|
|
5124
|
+
color-scheme: dark;
|
|
5106
5125
|
}
|
|
5107
5126
|
|
|
5108
5127
|
.rs-fiat-onramp[data-variant="connect"] .rs-fiat-onramp-iframe {
|
|
@@ -5565,3 +5584,101 @@
|
|
|
5565
5584
|
border-color: #fafafa;
|
|
5566
5585
|
color: #18181b;
|
|
5567
5586
|
}
|
|
5587
|
+
|
|
5588
|
+
/* =============================================================================
|
|
5589
|
+
Mobile bottom sheet (<= 639px)
|
|
5590
|
+
=============================================================================
|
|
5591
|
+
Below the 640px breakpoint the modal docks to the bottom of the viewport and
|
|
5592
|
+
slides up as a full-width sheet — matching the 1auth dialog (bottom sheet on
|
|
5593
|
+
mobile, centered card on desktop). Everything here is scoped under
|
|
5594
|
+
`.rs-modal-overlay` so inline mode (`.rs-modal-content--inline`, which has no
|
|
5595
|
+
overlay ancestor) is untouched, and desktop (>= 640px) keeps the centered
|
|
5596
|
+
card verbatim. */
|
|
5597
|
+
@media (max-width: 639px) {
|
|
5598
|
+
.rs-modal-overlay {
|
|
5599
|
+
/* Dock the sheet to the bottom edge (desktop centers it). */
|
|
5600
|
+
align-items: flex-end;
|
|
5601
|
+
/* Fade the scrim in as the sheet rises. Animating background-color rather
|
|
5602
|
+
than opacity keeps the sheet itself fully opaque while it slides — the
|
|
5603
|
+
overlay is both scrim and flex parent, so an opacity fade would dim the
|
|
5604
|
+
sheet too. */
|
|
5605
|
+
animation: rs-backdrop-fade-in 0.2s ease-out;
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
.rs-modal-overlay .rs-modal-content {
|
|
5609
|
+
width: 100%;
|
|
5610
|
+
max-width: none;
|
|
5611
|
+
margin: 0;
|
|
5612
|
+
/* Top corners only; the bottom sits flush against the viewport edge. */
|
|
5613
|
+
border-radius: 16px 16px 0 0;
|
|
5614
|
+
/* Cap below full height so a strip of scrim shows above the sheet (the
|
|
5615
|
+
bottom-sheet "peek"); taller content scrolls inside .rs-modal-body. */
|
|
5616
|
+
max-height: min(92dvh, calc(100dvh - 24px));
|
|
5617
|
+
/* Slide up from below the fold — iOS-sheet easing, matching 1auth's
|
|
5618
|
+
dialog-slide-up. When it ends the content rests at its --open transform
|
|
5619
|
+
(scale(1) == identity), so the settled position is unchanged. */
|
|
5620
|
+
animation: rs-sheet-slide-up 0.3s cubic-bezier(0.32, 0.72, 0, 1);
|
|
5621
|
+
}
|
|
5622
|
+
|
|
5623
|
+
/* Swapped/fiat/exchange flows pre-reserve a tall desktop iframe height
|
|
5624
|
+
(min-height 585-699px) plus a 445px max-width. On a phone that would force
|
|
5625
|
+
the sheet taller than the screen and push its top chrome out of reach, so
|
|
5626
|
+
cap it to the sheet height and let the body scroll. Specificity (0,4,0)
|
|
5627
|
+
matches the tallest :has() sizing rule and, appended last, wins the tie. */
|
|
5628
|
+
.rs-modal-overlay .rs-modal-content:has(.rs-modal-body[data-flow-mode="fiat-onramp"]),
|
|
5629
|
+
.rs-modal-overlay .rs-modal-content:has(.rs-modal-body[data-flow-mode="exchange-connect"]) {
|
|
5630
|
+
max-width: none;
|
|
5631
|
+
min-height: 0;
|
|
5632
|
+
max-height: min(92dvh, calc(100dvh - 24px));
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5635
|
+
/* The history panel is a long, scrollable list overlaid position:absolute, so
|
|
5636
|
+
it can't grow the sheet itself — left alone the sheet stays as short as the
|
|
5637
|
+
screen behind it and crams the list into a sliver at the bottom. When the
|
|
5638
|
+
panel is mounted, give the sheet a tall min-height so the list uses most of
|
|
5639
|
+
the phone screen. Placed after the fiat/exchange reset above so it wins when
|
|
5640
|
+
history is opened over one of those flows. */
|
|
5641
|
+
.rs-modal-overlay .rs-modal-content:has(.rs-history-panel) {
|
|
5642
|
+
min-height: min(85dvh, calc(100dvh - 24px));
|
|
5643
|
+
}
|
|
5644
|
+
|
|
5645
|
+
/* Clear the iOS home indicator. Excludes the immersive Swapped iframe, which
|
|
5646
|
+
is intentionally full-bleed to the sheet edges. */
|
|
5647
|
+
.rs-modal-overlay .rs-modal:not(.rs-modal--swapped-iframe) {
|
|
5648
|
+
padding-bottom: calc(16px + env(safe-area-inset-bottom));
|
|
5649
|
+
}
|
|
5650
|
+
|
|
5651
|
+
/* iOS Safari zooms the page in when a focused input's font is < 16px. Bump
|
|
5652
|
+
the small text inputs (the deposit amount input is 64px, so it is
|
|
5653
|
+
unaffected) to kill the zoom-on-focus jump. */
|
|
5654
|
+
.rs-modal-overlay .rs-modal .rs-input,
|
|
5655
|
+
.rs-modal-overlay .rs-modal .rs-withdraw-input {
|
|
5656
|
+
font-size: 16px;
|
|
5657
|
+
}
|
|
5658
|
+
}
|
|
5659
|
+
|
|
5660
|
+
@keyframes rs-sheet-slide-up {
|
|
5661
|
+
from {
|
|
5662
|
+
transform: translate3d(0, 100%, 0);
|
|
5663
|
+
}
|
|
5664
|
+
to {
|
|
5665
|
+
transform: translate3d(0, 0, 0);
|
|
5666
|
+
}
|
|
5667
|
+
}
|
|
5668
|
+
|
|
5669
|
+
@keyframes rs-backdrop-fade-in {
|
|
5670
|
+
from {
|
|
5671
|
+
background-color: rgba(0, 0, 0, 0);
|
|
5672
|
+
}
|
|
5673
|
+
to {
|
|
5674
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
5675
|
+
}
|
|
5676
|
+
}
|
|
5677
|
+
|
|
5678
|
+
/* Honour "Reduce motion": snap the sheet + scrim to their settled state. */
|
|
5679
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5680
|
+
.rs-modal-overlay,
|
|
5681
|
+
.rs-modal-overlay .rs-modal-content {
|
|
5682
|
+
animation: none !important;
|
|
5683
|
+
}
|
|
5684
|
+
}
|
package/dist/withdraw.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var _chunk3WIHTUQ6cjs = require('./chunk-3WIHTUQ6.cjs');
|
|
4
|
+
require('./chunk-DSXMWQYB.cjs');
|
|
5
|
+
require('./chunk-UNVVUULP.cjs');
|
|
6
|
+
require('./chunk-P5T4XSN2.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.WithdrawModal =
|
|
9
|
+
exports.WithdrawModal = _chunk3WIHTUQ6cjs.WithdrawModal;
|