@rhinestone/deposit-modal 0.1.58 → 0.1.60
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-C3WPJW3E.mjs → DepositModalReown-S24YS35X.mjs} +1 -1
- package/dist/{DepositModalReown-KONUZXHJ.cjs → DepositModalReown-VP5E2JRC.cjs} +2 -2
- package/dist/{WithdrawModalReown-TUBSUJQ6.cjs → WithdrawModalReown-7JLR264N.cjs} +2 -2
- package/dist/{WithdrawModalReown-PFGUPZFN.mjs → WithdrawModalReown-Y2ETJQON.mjs} +1 -1
- package/dist/{chunk-3FEFGN7H.cjs → chunk-3CANBYBN.cjs} +56 -29
- package/dist/{chunk-VOGD6Y4U.mjs → chunk-6SM3IQKZ.mjs} +79 -6
- package/dist/{chunk-Z2TKNB6C.cjs → chunk-HX7LLE2V.cjs} +165 -92
- package/dist/{chunk-3ESBSOB7.mjs → chunk-JJMPCRKB.mjs} +29 -2
- package/dist/deposit.cjs +2 -2
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/reown.cjs +3 -3
- package/dist/reown.d.cts +1 -1
- package/dist/reown.d.ts +1 -1
- package/dist/reown.mjs +2 -2
- package/dist/styles.css +4 -4
- package/dist/{types-CL7ec666.d.cts → types-7IoN8k-P.d.cts} +58 -1
- package/dist/{types-B7UuWCtD.d.ts → types-BLIqLF0c.d.ts} +58 -1
- package/dist/withdraw.cjs +2 -2
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +1 -1
- package/package.json +1 -1
|
@@ -901,6 +901,7 @@ function WithdrawFlow({
|
|
|
901
901
|
onWithdrawSubmitted,
|
|
902
902
|
onWithdrawComplete,
|
|
903
903
|
onWithdrawFailed,
|
|
904
|
+
onEvent,
|
|
904
905
|
onError,
|
|
905
906
|
debug
|
|
906
907
|
}) {
|
|
@@ -1037,6 +1038,18 @@ function WithdrawFlow({
|
|
|
1037
1038
|
useEffect2(() => {
|
|
1038
1039
|
onStepChange?.(stepIndex, currentBackHandler);
|
|
1039
1040
|
}, [stepIndex, currentBackHandler, onStepChange]);
|
|
1041
|
+
useEffect2(() => {
|
|
1042
|
+
if (step.type === "form") {
|
|
1043
|
+
const tokenSymbol = getTokenSymbol(targetToken, targetChain);
|
|
1044
|
+
const chainName = getChainName(targetChain);
|
|
1045
|
+
onEvent?.({
|
|
1046
|
+
type: "withdraw_modal_select_amount_open",
|
|
1047
|
+
pred_balance: totalBalanceUsd,
|
|
1048
|
+
default_token: tokenSymbol,
|
|
1049
|
+
default_chain: chainName
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
}, [step.type, onEvent, totalBalanceUsd, targetChain, targetToken]);
|
|
1040
1053
|
useEffect2(() => {
|
|
1041
1054
|
logFlow("state:changed", {
|
|
1042
1055
|
step: step.type,
|
|
@@ -1089,6 +1102,16 @@ function WithdrawFlow({
|
|
|
1089
1102
|
}, []);
|
|
1090
1103
|
const handleFormSubmit = useCallback2(
|
|
1091
1104
|
async (recipient, amountValue) => {
|
|
1105
|
+
const tokenSymbol = getTokenSymbol(targetToken, targetChain);
|
|
1106
|
+
const chainName = getChainName(targetChain);
|
|
1107
|
+
onEvent?.({
|
|
1108
|
+
type: "withdraw_modal_select_amount_cta_click",
|
|
1109
|
+
pred_balance: totalBalanceUsd,
|
|
1110
|
+
selected_token: tokenSymbol,
|
|
1111
|
+
selected_chain: chainName,
|
|
1112
|
+
amount: amountValue,
|
|
1113
|
+
cta_name: "withdraw"
|
|
1114
|
+
});
|
|
1092
1115
|
const ownerAddress2 = signerContext?.ownerAddress;
|
|
1093
1116
|
if (!ownerAddress2) {
|
|
1094
1117
|
throw new Error("Wallet not connected");
|
|
@@ -1267,7 +1290,9 @@ function WithdrawFlow({
|
|
|
1267
1290
|
isSourceNative,
|
|
1268
1291
|
handleError,
|
|
1269
1292
|
logFlow,
|
|
1270
|
-
logFlowError
|
|
1293
|
+
logFlowError,
|
|
1294
|
+
onEvent,
|
|
1295
|
+
totalBalanceUsd
|
|
1271
1296
|
]
|
|
1272
1297
|
);
|
|
1273
1298
|
const handleWithdrawComplete = useCallback2(
|
|
@@ -1453,7 +1478,7 @@ function WithdrawFlow({
|
|
|
1453
1478
|
// src/WithdrawModal.tsx
|
|
1454
1479
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1455
1480
|
var ReownWithdrawInner = lazy(
|
|
1456
|
-
() => import("./WithdrawModalReown-
|
|
1481
|
+
() => import("./WithdrawModalReown-Y2ETJQON.mjs").then((m) => ({
|
|
1457
1482
|
default: m.WithdrawModalReown
|
|
1458
1483
|
}))
|
|
1459
1484
|
);
|
|
@@ -1501,6 +1526,7 @@ function WithdrawModalInner({
|
|
|
1501
1526
|
onWithdrawSubmitted,
|
|
1502
1527
|
onWithdrawComplete,
|
|
1503
1528
|
onWithdrawFailed,
|
|
1529
|
+
onEvent,
|
|
1504
1530
|
onError,
|
|
1505
1531
|
debug
|
|
1506
1532
|
}) {
|
|
@@ -1673,6 +1699,7 @@ function WithdrawModalInner({
|
|
|
1673
1699
|
onWithdrawSubmitted,
|
|
1674
1700
|
onWithdrawComplete,
|
|
1675
1701
|
onWithdrawFailed,
|
|
1702
|
+
onEvent,
|
|
1676
1703
|
onError,
|
|
1677
1704
|
debug
|
|
1678
1705
|
}
|
package/dist/deposit.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHX7LLE2Vcjs = require('./chunk-HX7LLE2V.cjs');
|
|
4
4
|
require('./chunk-TQ6IIGRS.cjs');
|
|
5
5
|
require('./chunk-R6U6BHCV.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.DepositModal =
|
|
8
|
+
exports.DepositModal = _chunkHX7LLE2Vcjs.DepositModal;
|
package/dist/deposit.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData,
|
|
2
|
+
import { e as DepositModalProps } from './types-7IoN8k-P.cjs';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, c as DepositFailedEventData, d as DepositModalBranding, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData } from './types-7IoN8k-P.cjs';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import './safe.cjs';
|
|
6
6
|
|
package/dist/deposit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData,
|
|
2
|
+
import { e as DepositModalProps } from './types-BLIqLF0c.js';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, c as DepositFailedEventData, d as DepositModalBranding, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData } from './types-BLIqLF0c.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
import './safe.js';
|
|
6
6
|
|
package/dist/deposit.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHX7LLE2Vcjs = require('./chunk-HX7LLE2V.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk3CANBYBNcjs = require('./chunk-3CANBYBN.cjs');
|
|
7
7
|
require('./chunk-TQ6IIGRS.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
@@ -66,4 +66,4 @@ var _chunkR6U6BHCVcjs = require('./chunk-R6U6BHCV.cjs');
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
exports.CHAIN_BY_ID = _chunkR6U6BHCVcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkR6U6BHCVcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkR6U6BHCVcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal =
|
|
69
|
+
exports.CHAIN_BY_ID = _chunkR6U6BHCVcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkR6U6BHCVcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkR6U6BHCVcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunkHX7LLE2Vcjs.DepositModal; exports.NATIVE_TOKEN_ADDRESS = _chunkR6U6BHCVcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkR6U6BHCVcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkR6U6BHCVcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunk3CANBYBNcjs.WithdrawModal; exports.chainRegistry = _chunkR6U6BHCVcjs.chainRegistry; exports.findChainIdForToken = _chunkR6U6BHCVcjs.findChainIdForToken; exports.getChainBadge = _chunkR6U6BHCVcjs.getChainBadge; exports.getChainIcon = _chunkR6U6BHCVcjs.getChainIcon; exports.getChainId = _chunkR6U6BHCVcjs.getChainId; exports.getChainName = _chunkR6U6BHCVcjs.getChainName; exports.getChainObject = _chunkR6U6BHCVcjs.getChainObject; exports.getExplorerName = _chunkR6U6BHCVcjs.getExplorerName; exports.getExplorerTxUrl = _chunkR6U6BHCVcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkR6U6BHCVcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkR6U6BHCVcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkR6U6BHCVcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkR6U6BHCVcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkR6U6BHCVcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkR6U6BHCVcjs.getTokenAddress; exports.getTokenDecimals = _chunkR6U6BHCVcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkR6U6BHCVcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkR6U6BHCVcjs.getTokenIcon; exports.getTokenSymbol = _chunkR6U6BHCVcjs.getTokenSymbol; exports.getUsdcAddress = _chunkR6U6BHCVcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkR6U6BHCVcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkR6U6BHCVcjs.isSupportedTokenAddressForChain;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.cjs';
|
|
2
2
|
export { WithdrawModal } from './withdraw.cjs';
|
|
3
|
-
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositEvent, c as DepositFailedEventData, d as DepositModalBranding, e as DepositModalProps, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData, M as ModalEvent, O as OrderBookSwapAction, P as PostBridgeAction, R as RouteConfig, W as WithdrawCompleteEventData, i as WithdrawEvent, j as WithdrawFailedEventData, k as WithdrawModalProps, l as WithdrawSubmittedEventData } from './types-7IoN8k-P.cjs';
|
|
4
4
|
export { CHAIN_BY_ID, DEFAULT_BACKEND_URL, DEFAULT_SIGNER_ADDRESS, NATIVE_TOKEN_ADDRESS, SOURCE_CHAINS, SUPPORTED_CHAINS, chainRegistry, findChainIdForToken, getChainBadge, getChainIcon, getChainId, getChainName, getChainObject, getExplorerName, getExplorerTxUrl, getExplorerUrl, getSupportedChainIds, getSupportedTargetTokens, getSupportedTokenSymbolsForChain, getTargetTokenSymbolsForChain, getTokenAddress, getTokenDecimals, getTokenDecimalsByAddress, getTokenIcon, getTokenSymbol, getUsdcAddress, getUsdcDecimals, isSupportedTokenAddressForChain } from './constants.cjs';
|
|
5
5
|
export { SafeTransactionRequest } from './safe.cjs';
|
|
6
6
|
import 'react/jsx-runtime';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.js';
|
|
2
2
|
export { WithdrawModal } from './withdraw.js';
|
|
3
|
-
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as
|
|
3
|
+
export { A as AssetOption, C as ChainId, a as ConnectedEventData, D as DepositCompleteEventData, b as DepositEvent, c as DepositFailedEventData, d as DepositModalBranding, e as DepositModalProps, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData, M as ModalEvent, O as OrderBookSwapAction, P as PostBridgeAction, R as RouteConfig, W as WithdrawCompleteEventData, i as WithdrawEvent, j as WithdrawFailedEventData, k as WithdrawModalProps, l as WithdrawSubmittedEventData } from './types-BLIqLF0c.js';
|
|
4
4
|
export { CHAIN_BY_ID, DEFAULT_BACKEND_URL, DEFAULT_SIGNER_ADDRESS, NATIVE_TOKEN_ADDRESS, SOURCE_CHAINS, SUPPORTED_CHAINS, chainRegistry, findChainIdForToken, getChainBadge, getChainIcon, getChainId, getChainName, getChainObject, getExplorerName, getExplorerTxUrl, getExplorerUrl, getSupportedChainIds, getSupportedTargetTokens, getSupportedTokenSymbolsForChain, getTargetTokenSymbolsForChain, getTokenAddress, getTokenDecimals, getTokenDecimalsByAddress, getTokenIcon, getTokenSymbol, getUsdcAddress, getUsdcDecimals, isSupportedTokenAddressForChain } from './constants.js';
|
|
5
5
|
export { SafeTransactionRequest } from './safe.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
package/dist/index.mjs
CHANGED
package/dist/reown.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHX7LLE2Vcjs = require('./chunk-HX7LLE2V.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk3CANBYBNcjs = require('./chunk-3CANBYBN.cjs');
|
|
7
7
|
require('./chunk-TQ6IIGRS.cjs');
|
|
8
8
|
require('./chunk-R6U6BHCV.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.DepositModal =
|
|
12
|
+
exports.DepositModal = _chunkHX7LLE2Vcjs.DepositModal; exports.WithdrawModal = _chunk3CANBYBNcjs.WithdrawModal;
|
package/dist/reown.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.cjs';
|
|
2
2
|
export { WithdrawModal } from './withdraw.cjs';
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData,
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, c as DepositFailedEventData, d as DepositModalBranding, e as DepositModalProps, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, j as WithdrawFailedEventData, k as WithdrawModalProps, l as WithdrawSubmittedEventData } from './types-7IoN8k-P.cjs';
|
|
4
4
|
export { SafeTransactionRequest } from './safe.cjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'viem';
|
package/dist/reown.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DepositModal } from './deposit.js';
|
|
2
2
|
export { WithdrawModal } from './withdraw.js';
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData,
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, D as DepositCompleteEventData, c as DepositFailedEventData, d as DepositModalBranding, e as DepositModalProps, f as DepositModalTheme, g as DepositModalUIConfig, h as DepositSubmittedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, j as WithdrawFailedEventData, k as WithdrawModalProps, l as WithdrawSubmittedEventData } from './types-BLIqLF0c.js';
|
|
4
4
|
export { SafeTransactionRequest } from './safe.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'viem';
|
package/dist/reown.mjs
CHANGED
package/dist/styles.css
CHANGED
|
@@ -2824,8 +2824,8 @@
|
|
|
2824
2824
|
}
|
|
2825
2825
|
|
|
2826
2826
|
.rs-success-badge {
|
|
2827
|
-
width:
|
|
2828
|
-
height:
|
|
2827
|
+
width: 44px;
|
|
2828
|
+
height: 44px;
|
|
2829
2829
|
border-radius: 50%;
|
|
2830
2830
|
background-color: var(--rs-success);
|
|
2831
2831
|
color: white;
|
|
@@ -2837,8 +2837,8 @@
|
|
|
2837
2837
|
}
|
|
2838
2838
|
|
|
2839
2839
|
.rs-success-badge svg {
|
|
2840
|
-
width:
|
|
2841
|
-
height:
|
|
2840
|
+
width: 22px;
|
|
2841
|
+
height: 22px;
|
|
2842
2842
|
}
|
|
2843
2843
|
|
|
2844
2844
|
@keyframes rs-success-glow {
|
|
@@ -91,6 +91,7 @@ interface DepositModalProps {
|
|
|
91
91
|
sourceToken?: Address;
|
|
92
92
|
defaultAmount?: string;
|
|
93
93
|
recipient: Address;
|
|
94
|
+
postBridgeActions?: PostBridgeAction[];
|
|
94
95
|
backendUrl?: string;
|
|
95
96
|
solanaRpcUrl?: string;
|
|
96
97
|
rhinestoneApiKey?: string;
|
|
@@ -112,6 +113,7 @@ interface DepositModalProps {
|
|
|
112
113
|
onDepositSubmitted?: (data: DepositSubmittedEventData) => void;
|
|
113
114
|
onDepositComplete?: (data: DepositCompleteEventData) => void;
|
|
114
115
|
onDepositFailed?: (data: DepositFailedEventData) => void;
|
|
116
|
+
onEvent?: (event: DepositEvent) => void;
|
|
115
117
|
onError?: (data: ErrorEventData) => void;
|
|
116
118
|
debug?: boolean;
|
|
117
119
|
}
|
|
@@ -152,6 +154,7 @@ interface WithdrawModalProps {
|
|
|
152
154
|
onWithdrawSubmitted?: (data: WithdrawSubmittedEventData) => void;
|
|
153
155
|
onWithdrawComplete?: (data: WithdrawCompleteEventData) => void;
|
|
154
156
|
onWithdrawFailed?: (data: WithdrawFailedEventData) => void;
|
|
157
|
+
onEvent?: (event: WithdrawEvent) => void;
|
|
155
158
|
onError?: (data: ErrorEventData) => void;
|
|
156
159
|
debug?: boolean;
|
|
157
160
|
}
|
|
@@ -165,5 +168,59 @@ interface AssetOption {
|
|
|
165
168
|
balance?: string;
|
|
166
169
|
balanceUsd?: number;
|
|
167
170
|
}
|
|
171
|
+
interface OrderBookSwapAction {
|
|
172
|
+
type: "orderbook-swap";
|
|
173
|
+
contract: Address;
|
|
174
|
+
outputToken: Address;
|
|
175
|
+
}
|
|
176
|
+
type PostBridgeAction = OrderBookSwapAction;
|
|
177
|
+
type DepositEvent = {
|
|
178
|
+
type: "deposit_modal_connected_wallet_select_source_open";
|
|
179
|
+
total_balance_in_external_wallet: number | null;
|
|
180
|
+
pred_balance: number | null;
|
|
181
|
+
} | {
|
|
182
|
+
type: "deposit_modal_connected_wallet_select_source_cta_click";
|
|
183
|
+
total_balance_in_external_wallet: number | null;
|
|
184
|
+
pred_balance: number | null;
|
|
185
|
+
cta_name: "token_selected";
|
|
186
|
+
token_name: string;
|
|
187
|
+
token_balance: string;
|
|
188
|
+
} | {
|
|
189
|
+
type: "deposit_modal_transfer_crypto_open";
|
|
190
|
+
default_chain: string;
|
|
191
|
+
default_token: string;
|
|
192
|
+
pred_balance: number | null;
|
|
193
|
+
} | {
|
|
194
|
+
type: "deposit_modal_transfer_crypto_cta_click";
|
|
195
|
+
default_chain: string;
|
|
196
|
+
default_token: string;
|
|
197
|
+
pred_balance: number | null;
|
|
198
|
+
cta_name: "copy";
|
|
199
|
+
} | {
|
|
200
|
+
type: "deposit_modal_connected_wallet_enter_value_open";
|
|
201
|
+
send_token: string;
|
|
202
|
+
receive_token: string;
|
|
203
|
+
pred_balance: number | null;
|
|
204
|
+
} | {
|
|
205
|
+
type: "deposit_modal_connected_wallet_enter_value_cta_click";
|
|
206
|
+
send_token: string;
|
|
207
|
+
receive_token: string;
|
|
208
|
+
pred_balance: number | null;
|
|
209
|
+
cta_name: "continue" | "25%" | "50%" | "75%" | "Max";
|
|
210
|
+
};
|
|
211
|
+
type WithdrawEvent = {
|
|
212
|
+
type: "withdraw_modal_select_amount_open";
|
|
213
|
+
pred_balance: number | null;
|
|
214
|
+
default_token: string;
|
|
215
|
+
default_chain: string;
|
|
216
|
+
} | {
|
|
217
|
+
type: "withdraw_modal_select_amount_cta_click";
|
|
218
|
+
pred_balance: number | null;
|
|
219
|
+
selected_token: string;
|
|
220
|
+
selected_chain: string;
|
|
221
|
+
amount: string;
|
|
222
|
+
cta_name: "withdraw";
|
|
223
|
+
};
|
|
224
|
+
type ModalEvent = DepositEvent | WithdrawEvent;
|
|
168
225
|
|
|
169
|
-
export type { AssetOption as A, ChainId as C, DepositCompleteEventData as D, ErrorEventData as E, RouteConfig as R, WithdrawCompleteEventData as W, ConnectedEventData as a,
|
|
226
|
+
export type { AssetOption as A, ChainId as C, DepositCompleteEventData as D, ErrorEventData as E, ModalEvent as M, OrderBookSwapAction as O, PostBridgeAction as P, RouteConfig as R, WithdrawCompleteEventData as W, ConnectedEventData as a, DepositEvent as b, DepositFailedEventData as c, DepositModalBranding as d, DepositModalProps as e, DepositModalTheme as f, DepositModalUIConfig as g, DepositSubmittedEventData as h, WithdrawEvent as i, WithdrawFailedEventData as j, WithdrawModalProps as k, WithdrawSubmittedEventData as l };
|
|
@@ -91,6 +91,7 @@ interface DepositModalProps {
|
|
|
91
91
|
sourceToken?: Address;
|
|
92
92
|
defaultAmount?: string;
|
|
93
93
|
recipient: Address;
|
|
94
|
+
postBridgeActions?: PostBridgeAction[];
|
|
94
95
|
backendUrl?: string;
|
|
95
96
|
solanaRpcUrl?: string;
|
|
96
97
|
rhinestoneApiKey?: string;
|
|
@@ -112,6 +113,7 @@ interface DepositModalProps {
|
|
|
112
113
|
onDepositSubmitted?: (data: DepositSubmittedEventData) => void;
|
|
113
114
|
onDepositComplete?: (data: DepositCompleteEventData) => void;
|
|
114
115
|
onDepositFailed?: (data: DepositFailedEventData) => void;
|
|
116
|
+
onEvent?: (event: DepositEvent) => void;
|
|
115
117
|
onError?: (data: ErrorEventData) => void;
|
|
116
118
|
debug?: boolean;
|
|
117
119
|
}
|
|
@@ -152,6 +154,7 @@ interface WithdrawModalProps {
|
|
|
152
154
|
onWithdrawSubmitted?: (data: WithdrawSubmittedEventData) => void;
|
|
153
155
|
onWithdrawComplete?: (data: WithdrawCompleteEventData) => void;
|
|
154
156
|
onWithdrawFailed?: (data: WithdrawFailedEventData) => void;
|
|
157
|
+
onEvent?: (event: WithdrawEvent) => void;
|
|
155
158
|
onError?: (data: ErrorEventData) => void;
|
|
156
159
|
debug?: boolean;
|
|
157
160
|
}
|
|
@@ -165,5 +168,59 @@ interface AssetOption {
|
|
|
165
168
|
balance?: string;
|
|
166
169
|
balanceUsd?: number;
|
|
167
170
|
}
|
|
171
|
+
interface OrderBookSwapAction {
|
|
172
|
+
type: "orderbook-swap";
|
|
173
|
+
contract: Address;
|
|
174
|
+
outputToken: Address;
|
|
175
|
+
}
|
|
176
|
+
type PostBridgeAction = OrderBookSwapAction;
|
|
177
|
+
type DepositEvent = {
|
|
178
|
+
type: "deposit_modal_connected_wallet_select_source_open";
|
|
179
|
+
total_balance_in_external_wallet: number | null;
|
|
180
|
+
pred_balance: number | null;
|
|
181
|
+
} | {
|
|
182
|
+
type: "deposit_modal_connected_wallet_select_source_cta_click";
|
|
183
|
+
total_balance_in_external_wallet: number | null;
|
|
184
|
+
pred_balance: number | null;
|
|
185
|
+
cta_name: "token_selected";
|
|
186
|
+
token_name: string;
|
|
187
|
+
token_balance: string;
|
|
188
|
+
} | {
|
|
189
|
+
type: "deposit_modal_transfer_crypto_open";
|
|
190
|
+
default_chain: string;
|
|
191
|
+
default_token: string;
|
|
192
|
+
pred_balance: number | null;
|
|
193
|
+
} | {
|
|
194
|
+
type: "deposit_modal_transfer_crypto_cta_click";
|
|
195
|
+
default_chain: string;
|
|
196
|
+
default_token: string;
|
|
197
|
+
pred_balance: number | null;
|
|
198
|
+
cta_name: "copy";
|
|
199
|
+
} | {
|
|
200
|
+
type: "deposit_modal_connected_wallet_enter_value_open";
|
|
201
|
+
send_token: string;
|
|
202
|
+
receive_token: string;
|
|
203
|
+
pred_balance: number | null;
|
|
204
|
+
} | {
|
|
205
|
+
type: "deposit_modal_connected_wallet_enter_value_cta_click";
|
|
206
|
+
send_token: string;
|
|
207
|
+
receive_token: string;
|
|
208
|
+
pred_balance: number | null;
|
|
209
|
+
cta_name: "continue" | "25%" | "50%" | "75%" | "Max";
|
|
210
|
+
};
|
|
211
|
+
type WithdrawEvent = {
|
|
212
|
+
type: "withdraw_modal_select_amount_open";
|
|
213
|
+
pred_balance: number | null;
|
|
214
|
+
default_token: string;
|
|
215
|
+
default_chain: string;
|
|
216
|
+
} | {
|
|
217
|
+
type: "withdraw_modal_select_amount_cta_click";
|
|
218
|
+
pred_balance: number | null;
|
|
219
|
+
selected_token: string;
|
|
220
|
+
selected_chain: string;
|
|
221
|
+
amount: string;
|
|
222
|
+
cta_name: "withdraw";
|
|
223
|
+
};
|
|
224
|
+
type ModalEvent = DepositEvent | WithdrawEvent;
|
|
168
225
|
|
|
169
|
-
export type { AssetOption as A, ChainId as C, DepositCompleteEventData as D, ErrorEventData as E, RouteConfig as R, WithdrawCompleteEventData as W, ConnectedEventData as a,
|
|
226
|
+
export type { AssetOption as A, ChainId as C, DepositCompleteEventData as D, ErrorEventData as E, ModalEvent as M, OrderBookSwapAction as O, PostBridgeAction as P, RouteConfig as R, WithdrawCompleteEventData as W, ConnectedEventData as a, DepositEvent as b, DepositFailedEventData as c, DepositModalBranding as d, DepositModalProps as e, DepositModalTheme as f, DepositModalUIConfig as g, DepositSubmittedEventData as h, WithdrawEvent as i, WithdrawFailedEventData as j, WithdrawModalProps as k, WithdrawSubmittedEventData as l };
|
package/dist/withdraw.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3CANBYBNcjs = require('./chunk-3CANBYBN.cjs');
|
|
4
4
|
require('./chunk-TQ6IIGRS.cjs');
|
|
5
5
|
require('./chunk-R6U6BHCV.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.WithdrawModal =
|
|
8
|
+
exports.WithdrawModal = _chunk3CANBYBNcjs.WithdrawModal;
|
package/dist/withdraw.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData,
|
|
2
|
+
import { k as WithdrawModalProps } from './types-7IoN8k-P.cjs';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, j as WithdrawFailedEventData, l as WithdrawSubmittedEventData } from './types-7IoN8k-P.cjs';
|
|
4
4
|
export { SafeTransactionRequest } from './safe.cjs';
|
|
5
5
|
import 'viem';
|
|
6
6
|
|
package/dist/withdraw.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData,
|
|
2
|
+
import { k as WithdrawModalProps } from './types-BLIqLF0c.js';
|
|
3
|
+
export { A as AssetOption, a as ConnectedEventData, E as ErrorEventData, W as WithdrawCompleteEventData, j as WithdrawFailedEventData, l as WithdrawSubmittedEventData } from './types-BLIqLF0c.js';
|
|
4
4
|
export { SafeTransactionRequest } from './safe.js';
|
|
5
5
|
import 'viem';
|
|
6
6
|
|
package/dist/withdraw.mjs
CHANGED