@rhinestone/deposit-modal 0.9.1 → 0.11.0
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-JUJI7UHE.mjs → DepositModalReown-6RVLEM3B.mjs} +96 -26
- package/dist/{DepositModalReown-YQSO4SVY.cjs → DepositModalReown-TXTLVZIQ.cjs} +97 -27
- package/dist/caip-D8aRWdEY.d.cts +40 -0
- package/dist/caip-D8aRWdEY.d.ts +40 -0
- package/dist/{chunk-A223BLVC.mjs → chunk-53IFZGSF.mjs} +177 -21
- package/dist/{chunk-VQJHYWAE.cjs → chunk-7RNEYPI4.cjs} +836 -579
- package/dist/{chunk-ITFRTPGF.cjs → chunk-BLJMYCBF.cjs} +92 -90
- package/dist/{chunk-AYWEWI47.mjs → chunk-DYTRG4C7.mjs} +1 -1
- package/dist/{chunk-QGXAAFHU.mjs → chunk-G4FVZQOM.mjs} +23 -21
- package/dist/{chunk-SQOEHQNT.cjs → chunk-GWA6GFTI.cjs} +66 -63
- package/dist/{chunk-EEEQZOTJ.cjs → chunk-HCQWFL3A.cjs} +84 -101
- package/dist/{chunk-WUQZYQRK.mjs → chunk-ITAYM7SB.mjs} +784 -167
- package/dist/{chunk-YEBXUUH3.cjs → chunk-JPRV36DT.cjs} +2 -2
- package/dist/{chunk-EAUF7SGM.cjs → chunk-JYKMR6QI.cjs} +3 -3
- package/dist/{chunk-ILT2PITN.mjs → chunk-MZ53PDIX.mjs} +1 -1
- package/dist/{chunk-6U2H3R3T.cjs → chunk-NPSC5R22.cjs} +862 -245
- package/dist/{chunk-QLZ5RZTA.mjs → chunk-QRR3Y7EK.mjs} +1 -1
- package/dist/{chunk-H577RJN5.cjs → chunk-TENL4H64.cjs} +186 -30
- package/dist/{chunk-N3OHR3T2.mjs → chunk-TRD2FCAR.mjs} +363 -106
- package/dist/{chunk-7OQO6JDC.mjs → chunk-VRNRRN2U.mjs} +12 -9
- package/dist/{chunk-GYEUZSQP.mjs → chunk-WLDTBKRA.mjs} +14 -31
- package/dist/{chunk-XJE5MRY4.cjs → chunk-XVKBCDZI.cjs} +1 -1
- package/dist/claim.cjs +6 -6
- package/dist/claim.d.cts +3 -2
- package/dist/claim.d.ts +3 -2
- package/dist/claim.mjs +5 -5
- package/dist/{caip-523Zrc3r.d.cts → constants-FuzG3h4m.d.cts} +1 -18
- package/dist/{caip-523Zrc3r.d.ts → constants-FuzG3h4m.d.ts} +1 -18
- package/dist/constants.cjs +5 -3
- package/dist/constants.d.cts +3 -2
- package/dist/constants.d.ts +3 -2
- package/dist/constants.mjs +4 -2
- package/dist/deposit.cjs +8 -8
- package/dist/deposit.d.cts +3 -2
- package/dist/deposit.d.ts +3 -2
- package/dist/deposit.mjs +7 -7
- package/dist/index.cjs +12 -10
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +11 -9
- package/dist/polymarket.cjs +5 -5
- package/dist/polymarket.mjs +2 -2
- package/dist/styles.css +14 -0
- package/dist/{types-C0SGf-21.d.cts → types-C7wag_iL.d.cts} +4 -3
- package/dist/{types-C0SGf-21.d.ts → types-D4b6Cjox.d.ts} +4 -3
- package/dist/withdraw.cjs +6 -6
- package/dist/withdraw.d.cts +3 -2
- package/dist/withdraw.d.ts +3 -2
- package/dist/withdraw.mjs +5 -5
- package/package.json +1 -1
package/dist/polymarket.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var _chunkJPRV36DTcjs = require('./chunk-JPRV36DT.cjs');
|
|
6
|
+
require('./chunk-TENL4H64.cjs');
|
|
7
7
|
|
|
8
8
|
// src/core/dapp-imports/polymarket/account.ts
|
|
9
9
|
|
|
@@ -22,12 +22,12 @@ async function getPolymarketAccount(params) {
|
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
const eoa = _viem.getAddress.call(void 0, params.eoa);
|
|
25
|
-
const proxyWallet = await
|
|
25
|
+
const proxyWallet = await _chunkJPRV36DTcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
|
|
26
26
|
if (!proxyWallet) return null;
|
|
27
27
|
throwIfAborted(signal);
|
|
28
28
|
let balances = { pusd: 0n, usdce: 0n };
|
|
29
29
|
try {
|
|
30
|
-
balances = await
|
|
30
|
+
balances = await _chunkJPRV36DTcjs.readPolymarketBalances.call(void 0, {
|
|
31
31
|
publicClient: polygonClient(rpcUrl),
|
|
32
32
|
proxyWallet
|
|
33
33
|
});
|
|
@@ -39,7 +39,7 @@ async function getPolymarketAccount(params) {
|
|
|
39
39
|
return {
|
|
40
40
|
eoa,
|
|
41
41
|
proxyWallet,
|
|
42
|
-
chainId:
|
|
42
|
+
chainId: _chunkJPRV36DTcjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
43
43
|
pusd,
|
|
44
44
|
usdce,
|
|
45
45
|
totalUsd: pusd.usd + usdce.usd
|
package/dist/polymarket.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
POLYMARKET_POLYGON_CHAIN_ID,
|
|
3
3
|
fetchPolymarketProxyWallet,
|
|
4
4
|
readPolymarketBalances
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-MZ53PDIX.mjs";
|
|
6
|
+
import "./chunk-53IFZGSF.mjs";
|
|
7
7
|
|
|
8
8
|
// src/core/dapp-imports/polymarket/account.ts
|
|
9
9
|
import {
|
package/dist/styles.css
CHANGED
|
@@ -1140,6 +1140,20 @@
|
|
|
1140
1140
|
line-height: normal;
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
1143
|
+
/* Sits above the asset list when a provider read only some of the user's
|
|
1144
|
+
sources, so the list below is a floor rather than the whole picture. Muted
|
|
1145
|
+
rather than an alert colour: nothing is broken and the listed positions are
|
|
1146
|
+
fully usable — the user just should not read the total as complete. */
|
|
1147
|
+
.rs-asset-notice {
|
|
1148
|
+
font-size: 12px;
|
|
1149
|
+
font-weight: 500;
|
|
1150
|
+
color: var(--rs-muted);
|
|
1151
|
+
line-height: 1.4;
|
|
1152
|
+
padding: 10px 12px;
|
|
1153
|
+
border: 1px solid var(--rs-border);
|
|
1154
|
+
border-radius: var(--rs-radius-md);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1143
1157
|
.rs-asset-list {
|
|
1144
1158
|
display: flex;
|
|
1145
1159
|
flex-direction: column;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TypedDataDefinition, Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
|
|
2
|
+
import { T as TargetChain } from './caip-D8aRWdEY.cjs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Public config shape exposed on DepositModalProps. Each provider defaults to
|
|
@@ -116,7 +117,7 @@ interface DepositCompleteEventData {
|
|
|
116
117
|
amount: string;
|
|
117
118
|
sourceChain: ChainId | "unknown";
|
|
118
119
|
sourceToken?: string;
|
|
119
|
-
targetChain:
|
|
120
|
+
targetChain: TargetChain;
|
|
120
121
|
targetToken: string;
|
|
121
122
|
}
|
|
122
123
|
interface DepositFailedEventData {
|
|
@@ -180,7 +181,7 @@ interface DepositModalProps {
|
|
|
180
181
|
walletClient?: WalletClient | null;
|
|
181
182
|
/** Read client paired with `walletClient`. Defaults to the modal's own. */
|
|
182
183
|
publicClient?: PublicClient | null;
|
|
183
|
-
targetChain: Chain |
|
|
184
|
+
targetChain: Chain | TargetChain;
|
|
184
185
|
targetToken: Address | string;
|
|
185
186
|
isOpen: boolean;
|
|
186
187
|
onClose: () => void;
|
|
@@ -460,7 +461,7 @@ type DepositLifecycleEvent = {
|
|
|
460
461
|
* input (QR transfer, fiat onramp, exchange connect).
|
|
461
462
|
*/
|
|
462
463
|
amountUsd?: string;
|
|
463
|
-
targetChain:
|
|
464
|
+
targetChain: TargetChain;
|
|
464
465
|
targetToken: string;
|
|
465
466
|
} | {
|
|
466
467
|
type: "failed";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TypedDataDefinition, Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
|
|
2
|
+
import { T as TargetChain } from './caip-D8aRWdEY.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Public config shape exposed on DepositModalProps. Each provider defaults to
|
|
@@ -116,7 +117,7 @@ interface DepositCompleteEventData {
|
|
|
116
117
|
amount: string;
|
|
117
118
|
sourceChain: ChainId | "unknown";
|
|
118
119
|
sourceToken?: string;
|
|
119
|
-
targetChain:
|
|
120
|
+
targetChain: TargetChain;
|
|
120
121
|
targetToken: string;
|
|
121
122
|
}
|
|
122
123
|
interface DepositFailedEventData {
|
|
@@ -180,7 +181,7 @@ interface DepositModalProps {
|
|
|
180
181
|
walletClient?: WalletClient | null;
|
|
181
182
|
/** Read client paired with `walletClient`. Defaults to the modal's own. */
|
|
182
183
|
publicClient?: PublicClient | null;
|
|
183
|
-
targetChain: Chain |
|
|
184
|
+
targetChain: Chain | TargetChain;
|
|
184
185
|
targetToken: Address | string;
|
|
185
186
|
isOpen: boolean;
|
|
186
187
|
onClose: () => void;
|
|
@@ -460,7 +461,7 @@ type DepositLifecycleEvent = {
|
|
|
460
461
|
* input (QR transfer, fiat onramp, exchange connect).
|
|
461
462
|
*/
|
|
462
463
|
amountUsd?: string;
|
|
463
|
-
targetChain:
|
|
464
|
+
targetChain: TargetChain;
|
|
464
465
|
targetToken: string;
|
|
465
466
|
} | {
|
|
466
467
|
type: "failed";
|
package/dist/withdraw.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 _chunkBLJMYCBFcjs = require('./chunk-BLJMYCBF.cjs');
|
|
4
|
+
require('./chunk-HCQWFL3A.cjs');
|
|
5
|
+
require('./chunk-NPSC5R22.cjs');
|
|
6
|
+
require('./chunk-XVKBCDZI.cjs');
|
|
7
|
+
require('./chunk-TENL4H64.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.WithdrawModal =
|
|
10
|
+
exports.WithdrawModal = _chunkBLJMYCBFcjs.WithdrawModal;
|
package/dist/withdraw.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { p as WithdrawModalProps } from './types-
|
|
3
|
-
export { a as AssetOption, e as ConnectedEventData, E as ErrorEventData, R as RpcUrlMap, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-
|
|
2
|
+
import { p as WithdrawModalProps } from './types-C7wag_iL.cjs';
|
|
3
|
+
export { a as AssetOption, e as ConnectedEventData, E as ErrorEventData, R as RpcUrlMap, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-C7wag_iL.cjs';
|
|
4
4
|
import 'viem';
|
|
5
|
+
import './caip-D8aRWdEY.cjs';
|
|
5
6
|
|
|
6
7
|
declare function WithdrawModal({ accountAddress, sourceChain: sourceChainProp, sourceToken, targetChain: targetChainProp, targetToken, recipient, defaultAmount, isOpen, onClose, inline, closeOnOverlayClick, backendUrl, rpcUrls: rpcUrlsProp, forceRegister, onSendTransaction, theme, uiConfig, className, onReady, onLifecycle, onEvent, onError, debug, ...removedProps }: WithdrawModalProps): react.JSX.Element;
|
|
7
8
|
|
package/dist/withdraw.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { p as WithdrawModalProps } from './types-
|
|
3
|
-
export { a as AssetOption, e as ConnectedEventData, E as ErrorEventData, R as RpcUrlMap, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-
|
|
2
|
+
import { p as WithdrawModalProps } from './types-D4b6Cjox.js';
|
|
3
|
+
export { a as AssetOption, e as ConnectedEventData, E as ErrorEventData, R as RpcUrlMap, m as WithdrawCompleteEventData, n as WithdrawFailedEventData, q as WithdrawSubmittedEventData, r as WithdrawTransferRequest } from './types-D4b6Cjox.js';
|
|
4
4
|
import 'viem';
|
|
5
|
+
import './caip-D8aRWdEY.js';
|
|
5
6
|
|
|
6
7
|
declare function WithdrawModal({ accountAddress, sourceChain: sourceChainProp, sourceToken, targetChain: targetChainProp, targetToken, recipient, defaultAmount, isOpen, onClose, inline, closeOnOverlayClick, backendUrl, rpcUrls: rpcUrlsProp, forceRegister, onSendTransaction, theme, uiConfig, className, onReady, onLifecycle, onEvent, onError, debug, ...removedProps }: WithdrawModalProps): react.JSX.Element;
|
|
7
8
|
|
package/dist/withdraw.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-G4FVZQOM.mjs";
|
|
4
|
+
import "./chunk-WLDTBKRA.mjs";
|
|
5
|
+
import "./chunk-ITAYM7SB.mjs";
|
|
6
|
+
import "./chunk-QRR3Y7EK.mjs";
|
|
7
|
+
import "./chunk-53IFZGSF.mjs";
|
|
8
8
|
export {
|
|
9
9
|
WithdrawModal
|
|
10
10
|
};
|