@openfort/react 1.1.3 → 1.2.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/build/assets/icons.js +1 -1
- package/build/assets/logos.d.ts +12 -0
- package/build/assets/logos.js +7 -0
- package/build/assets/logos.js.map +1 -1
- package/build/components/Common/CopyToClipboard/CopyIconButton.d.ts +3 -1
- package/build/components/Common/CopyToClipboard/CopyIconButton.js +4 -4
- package/build/components/Common/CustomQRCode/index.d.ts +1 -1
- package/build/components/Common/CustomQRCode/index.js +3 -3
- package/build/components/Common/CustomQRCode/styles.d.ts +1 -0
- package/build/components/Common/CustomQRCode/styles.js +4 -4
- package/build/components/Common/CustomQRCode/types.d.ts +2 -0
- package/build/components/Common/Modal/styles.js +4 -1
- package/build/components/Common/Modal/styles.js.map +1 -1
- package/build/components/ConnectModal/index.js +14 -2
- package/build/components/ConnectModal/index.js.map +1 -1
- package/build/components/Openfort/OpenfortProvider.js +4 -1
- package/build/components/Openfort/OpenfortProvider.js.map +1 -1
- package/build/components/Openfort/types.d.ts +86 -0
- package/build/components/Openfort/types.js +22 -1
- package/build/components/Openfort/types.js.map +1 -1
- package/build/components/Pages/AssetInventory/SolanaAssetInventory.d.ts +6 -0
- package/build/components/Pages/AssetInventory/SolanaAssetInventory.js +42 -0
- package/build/components/Pages/AssetInventory/SolanaAssetInventory.js.map +1 -0
- package/build/components/Pages/Buy/index.js +3 -2
- package/build/components/Pages/Buy/index.js.map +1 -1
- package/build/components/Pages/BuySelectProvider/index.js +1 -1
- package/build/components/Pages/Connected/EthereumConnected.js +8 -32
- package/build/components/Pages/Connected/EthereumConnected.js.map +1 -1
- package/build/components/Pages/Connected/SolanaConnected.js +9 -4
- package/build/components/Pages/Connected/SolanaConnected.js.map +1 -1
- package/build/components/Pages/Deposit/AddressPageLink.d.ts +7 -0
- package/build/components/Pages/Deposit/AddressPageLink.js +17 -0
- package/build/components/Pages/Deposit/AddressPageLink.js.map +1 -0
- package/build/components/Pages/Deposit/AssetChainLogo.d.ts +9 -0
- package/build/components/Pages/Deposit/AssetChainLogo.js +24 -0
- package/build/components/Pages/Deposit/AssetChainLogo.js.map +1 -0
- package/build/components/Pages/Deposit/DepositAddressBlock.d.ts +21 -0
- package/build/components/Pages/Deposit/DepositAddressBlock.js +28 -0
- package/build/components/Pages/Deposit/DepositAddressBlock.js.map +1 -0
- package/build/components/Pages/Deposit/DepositProgress.d.ts +15 -0
- package/build/components/Pages/Deposit/DepositProgress.js +110 -0
- package/build/components/Pages/Deposit/DepositProgress.js.map +1 -0
- package/build/components/Pages/Deposit/DepositStatus.d.ts +9 -0
- package/build/components/Pages/Deposit/DepositStatus.js +43 -0
- package/build/components/Pages/Deposit/DepositStatus.js.map +1 -0
- package/build/components/Pages/Deposit/DepositSuccess.d.ts +6 -0
- package/build/components/Pages/Deposit/DepositSuccess.js +24 -0
- package/build/components/Pages/Deposit/DepositSuccess.js.map +1 -0
- package/build/components/Pages/Deposit/Details.d.ts +12 -0
- package/build/components/Pages/Deposit/Details.js +40 -0
- package/build/components/Pages/Deposit/Details.js.map +1 -0
- package/build/components/Pages/Deposit/LogoSelect.d.ts +12 -0
- package/build/components/Pages/Deposit/LogoSelect.js +95 -0
- package/build/components/Pages/Deposit/LogoSelect.js.map +1 -0
- package/build/components/Pages/Deposit/OrDivider.d.ts +2 -0
- package/build/components/Pages/Deposit/OrDivider.js +10 -0
- package/build/components/Pages/Deposit/OrDivider.js.map +1 -0
- package/build/components/Pages/Deposit/RouteSelectors.d.ts +13 -0
- package/build/components/Pages/Deposit/RouteSelectors.js +19 -0
- package/build/components/Pages/Deposit/RouteSelectors.js.map +1 -0
- package/build/components/Pages/Deposit/cexChains.d.ts +9 -0
- package/build/components/Pages/Deposit/cexChains.js +23 -0
- package/build/components/Pages/Deposit/cexChains.js.map +1 -0
- package/build/components/Pages/Deposit/formStyles.d.ts +24 -0
- package/build/components/Pages/Deposit/formStyles.js +83 -0
- package/build/components/Pages/Deposit/formStyles.js.map +1 -0
- package/build/components/Pages/Deposit/index.d.ts +7 -0
- package/build/components/Pages/Deposit/index.js +100 -0
- package/build/components/Pages/Deposit/index.js.map +1 -0
- package/build/components/Pages/Deposit/paymentOptions.d.ts +49 -0
- package/build/components/Pages/Deposit/paymentOptions.js +63 -0
- package/build/components/Pages/Deposit/paymentOptions.js.map +1 -0
- package/build/components/Pages/Deposit/sources.d.ts +17 -0
- package/build/components/Pages/Deposit/sources.js +22 -0
- package/build/components/Pages/Deposit/sources.js.map +1 -0
- package/build/components/Pages/Deposit/styles.d.ts +25 -0
- package/build/components/Pages/Deposit/styles.js +167 -0
- package/build/components/Pages/Deposit/styles.js.map +1 -0
- package/build/components/Pages/Deposit/useDepositRoute.d.ts +35 -0
- package/build/components/Pages/Deposit/useDepositRoute.js +107 -0
- package/build/components/Pages/Deposit/useDepositRoute.js.map +1 -0
- package/build/components/Pages/Deposit/useFundingTarget.d.ts +13 -0
- package/build/components/Pages/Deposit/useFundingTarget.js +27 -0
- package/build/components/Pages/Deposit/useFundingTarget.js.map +1 -0
- package/build/components/Pages/DepositCex/index.d.ts +11 -0
- package/build/components/Pages/DepositCex/index.js +230 -0
- package/build/components/Pages/DepositCex/index.js.map +1 -0
- package/build/components/Pages/DepositCrypto/index.d.ts +8 -0
- package/build/components/Pages/DepositCrypto/index.js +31 -0
- package/build/components/Pages/DepositCrypto/index.js.map +1 -0
- package/build/components/Pages/DepositWallet/DepositWalletDesktop.d.ts +17 -0
- package/build/components/Pages/DepositWallet/DepositWalletDesktop.js +148 -0
- package/build/components/Pages/DepositWallet/DepositWalletDesktop.js.map +1 -0
- package/build/components/Pages/DepositWallet/index.d.ts +9 -0
- package/build/components/Pages/DepositWallet/index.js +102 -0
- package/build/components/Pages/DepositWallet/index.js.map +1 -0
- package/build/components/Pages/DepositWallet/walletDeeplinks.d.ts +48 -0
- package/build/components/Pages/DepositWallet/walletDeeplinks.js +107 -0
- package/build/components/Pages/DepositWallet/walletDeeplinks.js.map +1 -0
- package/build/components/Pages/ExportKey/index.js +10 -2
- package/build/components/Pages/ExportKey/index.js.map +1 -1
- package/build/components/Pages/NoAssetsAvailable/index.js +5 -21
- package/build/components/Pages/NoAssetsAvailable/index.js.map +1 -1
- package/build/components/Pages/SelectToken/styles.js +1 -1
- package/build/components/Pages/Send/SolanaSend.d.ts +1 -0
- package/build/components/Pages/Send/SolanaSend.js +88 -0
- package/build/components/Pages/Send/SolanaSend.js.map +1 -0
- package/build/components/Pages/Send/index.d.ts +2 -1
- package/build/components/Pages/Send/index.js +0 -1
- package/build/components/Pages/Send/index.js.map +1 -1
- package/build/components/Pages/SendConfirmation/EstimatedFees.js +5 -3
- package/build/components/Pages/SendConfirmation/EstimatedFees.js.map +1 -1
- package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.d.ts +1 -0
- package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js +77 -0
- package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js.map +1 -0
- package/build/components/Pages/SendConfirmation/index.js +4 -3
- package/build/components/Pages/SendConfirmation/index.js.map +1 -1
- package/build/components/Pages/SendConfirmation/styles.d.ts +5 -0
- package/build/components/Pages/SendConfirmation/styles.js +39 -1
- package/build/components/Pages/SendConfirmation/styles.js.map +1 -1
- package/build/constants/logos.js +1 -0
- package/build/constants/logos.js.map +1 -1
- package/build/ethereum/hooks/useEthereumWalletAssets.js +212 -95
- package/build/ethereum/hooks/useEthereumWalletAssets.js.map +1 -1
- package/build/hooks/openfort/fundingClient.d.ts +34 -0
- package/build/hooks/openfort/fundingClient.js +60 -0
- package/build/hooks/openfort/fundingClient.js.map +1 -0
- package/build/hooks/openfort/useFunding.d.ts +159 -0
- package/build/hooks/openfort/useFunding.js +204 -0
- package/build/hooks/openfort/useFunding.js.map +1 -0
- package/build/hooks/openfort/useFundingChains.d.ts +49 -0
- package/build/hooks/openfort/useFundingChains.js +102 -0
- package/build/hooks/openfort/useFundingChains.js.map +1 -0
- package/build/hooks/useBalance.js +6 -1
- package/build/hooks/useBalance.js.map +1 -1
- package/build/index.d.ts +4 -1
- package/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/build/shared/hooks/useAsyncData.d.ts +11 -0
- package/build/shared/hooks/useAsyncData.js +60 -13
- package/build/shared/hooks/useAsyncData.js.map +1 -1
- package/build/solana/hooks/useSolanaWalletAssets.d.ts +24 -0
- package/build/solana/hooks/useSolanaWalletAssets.js +86 -0
- package/build/solana/hooks/useSolanaWalletAssets.js.map +1 -0
- package/build/solana/transfer.d.ts +32 -0
- package/build/solana/transfer.js +125 -0
- package/build/solana/transfer.js.map +1 -0
- package/build/utils/index.d.ts +2 -1
- package/build/utils/index.js +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/build/wagmi/defaultConnectors.js +5 -1
- package/build/wagmi/defaultConnectors.js.map +1 -1
- package/package.json +10 -2
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import styled from '../../../styles/styled/index.js';
|
|
4
|
+
|
|
5
|
+
const Wrap = styled.div `
|
|
6
|
+
position: relative;
|
|
7
|
+
`;
|
|
8
|
+
const Trigger = styled.button `
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
width: 100%;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
padding: 8px 10px;
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
border: 1px solid var(--ck-body-divider, #e4e4e7);
|
|
17
|
+
background: var(--ck-body-background-secondary, #fafafa);
|
|
18
|
+
color: var(--ck-body-color, #1a1a2e);
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
`;
|
|
22
|
+
const TriggerLabel = styled.span `
|
|
23
|
+
flex: 1;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
text-align: left;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
`;
|
|
30
|
+
const Chevron = styled.span `
|
|
31
|
+
color: var(--ck-body-color-muted, #6b7280);
|
|
32
|
+
font-size: 11px;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
`;
|
|
35
|
+
const Menu = styled.div `
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: calc(100% + 4px);
|
|
38
|
+
left: 0;
|
|
39
|
+
right: 0;
|
|
40
|
+
z-index: 20;
|
|
41
|
+
max-height: 240px;
|
|
42
|
+
overflow-y: auto;
|
|
43
|
+
padding: 4px;
|
|
44
|
+
border-radius: 10px;
|
|
45
|
+
border: 1px solid var(--ck-body-divider, #e4e4e7);
|
|
46
|
+
background: var(--ck-body-background, #fff);
|
|
47
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
48
|
+
`;
|
|
49
|
+
const Item = styled.button `
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: 8px;
|
|
53
|
+
width: 100%;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
padding: 8px 10px;
|
|
56
|
+
border: none;
|
|
57
|
+
border-radius: 6px;
|
|
58
|
+
background: transparent;
|
|
59
|
+
color: var(--ck-body-color, #1a1a2e);
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
text-align: left;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
background: var(--ck-secondary-button-hover-background, #f3f3f5);
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
const logoImg = { width: 20, height: 20, borderRadius: '50%', flexShrink: 0 };
|
|
69
|
+
const hideBrokenLogo = (e) => {
|
|
70
|
+
e.currentTarget.style.display = 'none';
|
|
71
|
+
};
|
|
72
|
+
/** A select-like dropdown that shows a logo next to the trigger and each option. */
|
|
73
|
+
function LogoSelect({ value, options, onChange, }) {
|
|
74
|
+
var _a, _b;
|
|
75
|
+
const [open, setOpen] = useState(false);
|
|
76
|
+
const ref = useRef(null);
|
|
77
|
+
const active = (_a = options.find((o) => o.value === value)) !== null && _a !== void 0 ? _a : options[0];
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (!open)
|
|
80
|
+
return;
|
|
81
|
+
const onDown = (e) => {
|
|
82
|
+
if (ref.current && !ref.current.contains(e.target))
|
|
83
|
+
setOpen(false);
|
|
84
|
+
};
|
|
85
|
+
document.addEventListener('mousedown', onDown);
|
|
86
|
+
return () => document.removeEventListener('mousedown', onDown);
|
|
87
|
+
}, [open]);
|
|
88
|
+
return (jsxs(Wrap, { ref: ref, children: [jsxs(Trigger, { type: "button", onClick: () => setOpen((o) => !o), children: [(active === null || active === void 0 ? void 0 : active.logo) && jsx("img", { src: active.logo, alt: "", style: logoImg, onError: hideBrokenLogo }), jsx(TriggerLabel, { children: (_b = active === null || active === void 0 ? void 0 : active.label) !== null && _b !== void 0 ? _b : '' }), jsx(Chevron, { children: open ? '▴' : '▾' })] }), open && (jsx(Menu, { children: options.map((o) => (jsxs(Item, { type: "button", onClick: () => {
|
|
89
|
+
onChange(o.value);
|
|
90
|
+
setOpen(false);
|
|
91
|
+
}, children: [o.logo && jsx("img", { src: o.logo, alt: "", style: logoImg, onError: hideBrokenLogo }), jsx("span", { children: o.label })] }, o.value))) }))] }));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { LogoSelect };
|
|
95
|
+
//# sourceMappingURL=LogoSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogoSelect.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { orRow, orLine, orText } from './formStyles.js';
|
|
3
|
+
|
|
4
|
+
/** Separates the scan-QR / copy-address path from the open-wallet / open-exchange path. */
|
|
5
|
+
function OrDivider() {
|
|
6
|
+
return (jsxs("div", { style: orRow, children: [jsx("span", { style: orLine }), jsx("span", { style: orText, children: "or" }), jsx("span", { style: orLine })] }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { OrDivider };
|
|
10
|
+
//# sourceMappingURL=OrDivider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrDivider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FundingChain } from '../../../hooks/openfort/useFundingChains';
|
|
2
|
+
type RouteSelectorsProps = {
|
|
3
|
+
chains: FundingChain[];
|
|
4
|
+
chain: string;
|
|
5
|
+
currency: string;
|
|
6
|
+
/** Label above the chain selector ("Supported chain" vs "Network"). */
|
|
7
|
+
chainLabel: string;
|
|
8
|
+
onChainChange: (chain: string) => void;
|
|
9
|
+
onCurrencyChange: (currency: string) => void;
|
|
10
|
+
};
|
|
11
|
+
/** The source chain + currency selectors (logo-aware dropdowns), from the live Relay list. */
|
|
12
|
+
export declare function RouteSelectors({ chains, chain, currency, chainLabel, onChainChange, onCurrencyChange, }: RouteSelectorsProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { twoCol, field } from './formStyles.js';
|
|
3
|
+
import { LogoSelect } from './LogoSelect.js';
|
|
4
|
+
import { Skeleton } from './styles.js';
|
|
5
|
+
|
|
6
|
+
/** The source chain + currency selectors (logo-aware dropdowns), from the live Relay list. */
|
|
7
|
+
function RouteSelectors({ chains, chain, currency, chainLabel, onChainChange, onCurrencyChange, }) {
|
|
8
|
+
var _a, _b, _c;
|
|
9
|
+
// Chains still loading — show placeholder selectors instead of empty dropdowns.
|
|
10
|
+
if (chains.length === 0) {
|
|
11
|
+
return (jsxs("div", { style: twoCol, children: [jsxs("div", { style: field, children: [chainLabel, jsx(Skeleton, { "$h": "40px", "$r": "8px" })] }), jsxs("div", { style: field, children: ["Currency", jsx(Skeleton, { "$h": "40px", "$r": "8px" })] })] }));
|
|
12
|
+
}
|
|
13
|
+
const activeChain = (_a = chains.find((c) => c.id === chain)) !== null && _a !== void 0 ? _a : chains[0];
|
|
14
|
+
const currencies = (_b = activeChain === null || activeChain === void 0 ? void 0 : activeChain.currencies) !== null && _b !== void 0 ? _b : [];
|
|
15
|
+
return (jsxs("div", { style: twoCol, children: [jsxs("div", { style: field, children: [chainLabel, jsx(LogoSelect, { value: (_c = activeChain === null || activeChain === void 0 ? void 0 : activeChain.id) !== null && _c !== void 0 ? _c : '', onChange: onChainChange, options: chains.map((c) => ({ value: c.id, label: c.name, logo: c.logo })) })] }), jsxs("div", { style: field, children: ["Currency", jsx(LogoSelect, { value: currency, onChange: onCurrencyChange, options: currencies.map((c) => ({ value: c.symbol, label: c.symbol, logo: c.logo })) })] })] }));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { RouteSelectors };
|
|
19
|
+
//# sourceMappingURL=RouteSelectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouteSelectors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CAIP-2 chains the CEX rail (Coinbase Onramp "send") can deliver to, with their
|
|
3
|
+
* display names. Single source of truth shared by the cex pay-link page
|
|
4
|
+
* (DepositCex) and the exchange-withdraw source filter (useDepositRoute), so a
|
|
5
|
+
* new deliverable chain is added in one place.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CEX_CHAIN_NAMES: Record<string, string>;
|
|
8
|
+
/** Whether the CEX rail can deliver to the given CAIP-2 chain. */
|
|
9
|
+
export declare function isCexDeliverable(chain: string): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CAIP-2 chains the CEX rail (Coinbase Onramp "send") can deliver to, with their
|
|
3
|
+
* display names. Single source of truth shared by the cex pay-link page
|
|
4
|
+
* (DepositCex) and the exchange-withdraw source filter (useDepositRoute), so a
|
|
5
|
+
* new deliverable chain is added in one place.
|
|
6
|
+
*/
|
|
7
|
+
const CEX_CHAIN_NAMES = {
|
|
8
|
+
'eip155:1': 'Ethereum',
|
|
9
|
+
'eip155:10': 'Optimism',
|
|
10
|
+
'eip155:137': 'Polygon',
|
|
11
|
+
'eip155:8453': 'Base',
|
|
12
|
+
'eip155:42161': 'Arbitrum',
|
|
13
|
+
'eip155:43114': 'Avalanche',
|
|
14
|
+
'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': 'Solana',
|
|
15
|
+
};
|
|
16
|
+
const CEX_CHAINS = new Set(Object.keys(CEX_CHAIN_NAMES));
|
|
17
|
+
/** Whether the CEX rail can deliver to the given CAIP-2 chain. */
|
|
18
|
+
function isCexDeliverable(chain) {
|
|
19
|
+
return CEX_CHAINS.has(chain);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { CEX_CHAIN_NAMES, isCexDeliverable };
|
|
23
|
+
//# sourceMappingURL=cexChains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cexChains.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
/** Shared inline styles for the Deposit crypto/exchange forms (ConnectKit CSS vars). */
|
|
3
|
+
export declare const field: CSSProperties;
|
|
4
|
+
/** Deposit address — kept to a single line so the full address reads cleanly. */
|
|
5
|
+
export declare const codeStyle: CSSProperties;
|
|
6
|
+
/** "Your deposit address" label above the address box. */
|
|
7
|
+
export declare const depositAddressLabel: CSSProperties;
|
|
8
|
+
/** Shadow card around the deposit address + copy button. */
|
|
9
|
+
export declare const addressBox: CSSProperties;
|
|
10
|
+
/** "── or ──" separator between the scan/copy path and the open-wallet path. */
|
|
11
|
+
export declare const orRow: CSSProperties;
|
|
12
|
+
export declare const orLine: CSSProperties;
|
|
13
|
+
export declare const orText: CSSProperties;
|
|
14
|
+
/** Chain + token selectors side by side. */
|
|
15
|
+
export declare const twoCol: CSSProperties;
|
|
16
|
+
/** Full-width wallet row for the one-column "Transfer from wallet" deeplink list. */
|
|
17
|
+
export declare const walletListBtn: CSSProperties;
|
|
18
|
+
/** Collapsible "Details" panel (min / fee / processing / max). */
|
|
19
|
+
export declare const detailsBox: CSSProperties;
|
|
20
|
+
export declare const detailsToggle: CSSProperties;
|
|
21
|
+
export declare const detailsRow: CSSProperties;
|
|
22
|
+
export declare const detailsLabel: CSSProperties;
|
|
23
|
+
export declare const detailsValue: CSSProperties;
|
|
24
|
+
export declare const chevron: CSSProperties;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** Shared inline styles for the Deposit crypto/exchange forms (ConnectKit CSS vars). */
|
|
2
|
+
const field = { display: 'grid', gap: 6, fontSize: 13, textAlign: 'left' };
|
|
3
|
+
/** Deposit address — kept to a single line so the full address reads cleanly. */
|
|
4
|
+
const codeStyle = {
|
|
5
|
+
flex: 1,
|
|
6
|
+
minWidth: 0,
|
|
7
|
+
fontSize: 12,
|
|
8
|
+
fontFamily: 'monospace',
|
|
9
|
+
whiteSpace: 'nowrap',
|
|
10
|
+
overflow: 'hidden',
|
|
11
|
+
textAlign: 'center',
|
|
12
|
+
};
|
|
13
|
+
/** "Your deposit address" label above the address box. */
|
|
14
|
+
const depositAddressLabel = {
|
|
15
|
+
marginTop: 14,
|
|
16
|
+
fontSize: 13,
|
|
17
|
+
fontWeight: 600,
|
|
18
|
+
textAlign: 'left',
|
|
19
|
+
color: 'var(--ck-body-color, #1a1a2e)',
|
|
20
|
+
};
|
|
21
|
+
/** Shadow card around the deposit address + copy button. */
|
|
22
|
+
const addressBox = {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
gap: 8,
|
|
27
|
+
marginTop: 6,
|
|
28
|
+
padding: '12px 14px',
|
|
29
|
+
borderRadius: 12,
|
|
30
|
+
background: 'var(--ck-body-background, #fff)',
|
|
31
|
+
border: '1px solid var(--ck-body-divider, #ededed)',
|
|
32
|
+
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.06)',
|
|
33
|
+
};
|
|
34
|
+
/** "── or ──" separator between the scan/copy path and the open-wallet path. */
|
|
35
|
+
const orRow = { display: 'flex', alignItems: 'center', gap: 10, margin: '16px 0 4px' };
|
|
36
|
+
const orLine = { flex: 1, height: 1, background: 'var(--ck-body-divider, #ededed)' };
|
|
37
|
+
const orText = { fontSize: 12, fontWeight: 500, color: 'var(--ck-body-color-muted, #6b7280)' };
|
|
38
|
+
/** Chain + token selectors side by side. */
|
|
39
|
+
const twoCol = { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 10, marginTop: 12 };
|
|
40
|
+
/** Full-width wallet row for the one-column "Transfer from wallet" deeplink list. */
|
|
41
|
+
const walletListBtn = {
|
|
42
|
+
display: 'block',
|
|
43
|
+
width: '100%',
|
|
44
|
+
boxSizing: 'border-box',
|
|
45
|
+
textAlign: 'center',
|
|
46
|
+
padding: '14px 16px',
|
|
47
|
+
borderRadius: 10,
|
|
48
|
+
fontSize: 14,
|
|
49
|
+
fontWeight: 600,
|
|
50
|
+
textDecoration: 'none',
|
|
51
|
+
background: 'var(--ck-secondary-button-background, #f3f3f5)',
|
|
52
|
+
color: 'var(--ck-body-color, #1a1a2e)',
|
|
53
|
+
border: '1px solid var(--ck-body-divider, #e4e4e7)',
|
|
54
|
+
};
|
|
55
|
+
/** Collapsible "Details" panel (min / fee / processing / max). */
|
|
56
|
+
const detailsBox = {
|
|
57
|
+
marginTop: 14,
|
|
58
|
+
};
|
|
59
|
+
const detailsToggle = {
|
|
60
|
+
display: 'flex',
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
justifyContent: 'space-between',
|
|
63
|
+
width: '100%',
|
|
64
|
+
background: 'transparent',
|
|
65
|
+
border: 'none',
|
|
66
|
+
cursor: 'pointer',
|
|
67
|
+
padding: '6px 0',
|
|
68
|
+
color: 'var(--ck-body-color, #1a1a2e)',
|
|
69
|
+
fontSize: 14,
|
|
70
|
+
fontWeight: 600,
|
|
71
|
+
};
|
|
72
|
+
const detailsRow = {
|
|
73
|
+
display: 'flex',
|
|
74
|
+
justifyContent: 'space-between',
|
|
75
|
+
padding: '4px 0',
|
|
76
|
+
fontSize: 13,
|
|
77
|
+
};
|
|
78
|
+
const detailsLabel = { color: 'var(--ck-body-color-muted, #6b7280)' };
|
|
79
|
+
const detailsValue = { color: 'var(--ck-body-color, #1a1a2e)' };
|
|
80
|
+
const chevron = { color: 'var(--ck-body-color-muted, #6b7280)', fontSize: 12 };
|
|
81
|
+
|
|
82
|
+
export { addressBox, chevron, codeStyle, depositAddressLabel, detailsBox, detailsLabel, detailsRow, detailsToggle, detailsValue, field, orLine, orRow, orText, twoCol, walletListBtn };
|
|
83
|
+
//# sourceMappingURL=formStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formStyles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deposit hub — one entry point, a method selector. Each row shows an action
|
|
3
|
+
* icon on the left and the tokens/wallets/exchanges it covers on the right.
|
|
4
|
+
* Crypto/CEX route into the funding-session Pages; fiat rows reuse the Buy flow.
|
|
5
|
+
*/
|
|
6
|
+
declare const Deposit: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Deposit;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { DollarIcon, BuyIcon, WalletIcon, ReceiveIcon, ExternalLinkIcon } from '../../../assets/icons.js';
|
|
3
|
+
import Logos from '../../../assets/logos.js';
|
|
4
|
+
import { useFunding } from '../../../hooks/openfort/useFunding.js';
|
|
5
|
+
import { useFundingChains } from '../../../hooks/openfort/useFundingChains.js';
|
|
6
|
+
import useIsMobile from '../../../hooks/useIsMobile.js';
|
|
7
|
+
import { ModalHeading } from '../../Common/Modal/styles.js';
|
|
8
|
+
import { FundingMethod, routes } from '../../Openfort/types.js';
|
|
9
|
+
import { useOpenfort } from '../../Openfort/useOpenfort.js';
|
|
10
|
+
import { PageContent } from '../../PageContent/index.js';
|
|
11
|
+
import { getPaymentOptions } from './paymentOptions.js';
|
|
12
|
+
import { DepositContent, OptionList, OptionButton, OptionLeft, OptionIconBadge, OptionInfo, OptionTitle, OptionSubtitle, LogoCluster } from './styles.js';
|
|
13
|
+
|
|
14
|
+
/** The action icon shown in each row's left badge (icons default to 20×20). */
|
|
15
|
+
const METHOD_ICON = {
|
|
16
|
+
[FundingMethod.APPLE_PAY]: jsx(DollarIcon, {}),
|
|
17
|
+
[FundingMethod.CARD]: jsx(BuyIcon, {}),
|
|
18
|
+
[FundingMethod.WALLET]: jsx(WalletIcon, {}),
|
|
19
|
+
[FundingMethod.ADDRESS]: jsx(ReceiveIcon, {}),
|
|
20
|
+
[FundingMethod.EXCHANGE]: jsx(ExternalLinkIcon, {}),
|
|
21
|
+
};
|
|
22
|
+
/** Brand logos previewed on the right of each row (vendored SVGs, no external URLs). */
|
|
23
|
+
const BRAND_LOGOS = {
|
|
24
|
+
[FundingMethod.WALLET]: [
|
|
25
|
+
jsx(Logos.MetaMask, { background: true }, "mm"),
|
|
26
|
+
jsx(Logos.Phantom, { background: true }, "ph"),
|
|
27
|
+
jsx(Logos.Coinbase, { background: true }, "cb"),
|
|
28
|
+
jsx(Logos.Trust, {}, "tw"),
|
|
29
|
+
jsx(Logos.Rainbow, { round: true }, "rb"),
|
|
30
|
+
],
|
|
31
|
+
[FundingMethod.EXCHANGE]: [jsx(Logos.Coinbase, { background: true }, "cb"), jsx(Logos.Binance, {}, "bn")],
|
|
32
|
+
[FundingMethod.CARD]: [jsx(Logos.Visa, {}, "visa"), jsx(Logos.Mastercard, {}, "mc")],
|
|
33
|
+
[FundingMethod.APPLE_PAY]: [jsx(Logos.Apple, {}, "apple")],
|
|
34
|
+
};
|
|
35
|
+
const hideBrokenLogo = (e) => {
|
|
36
|
+
e.currentTarget.style.display = 'none';
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Deposit hub — one entry point, a method selector. Each row shows an action
|
|
40
|
+
* icon on the left and the tokens/wallets/exchanges it covers on the right.
|
|
41
|
+
* Crypto/CEX route into the funding-session Pages; fiat rows reuse the Buy flow.
|
|
42
|
+
*/
|
|
43
|
+
const Deposit = () => {
|
|
44
|
+
var _a;
|
|
45
|
+
const { setRoute, setBuyForm, uiConfig } = useOpenfort();
|
|
46
|
+
const isMobile = useIsMobile();
|
|
47
|
+
const { isAvailable } = useFunding();
|
|
48
|
+
const { chains } = useFundingChains();
|
|
49
|
+
const options = getPaymentOptions({
|
|
50
|
+
isMobile,
|
|
51
|
+
fundingAvailable: isAvailable,
|
|
52
|
+
methods: (_a = uiConfig.funding) === null || _a === void 0 ? void 0 : _a.methods,
|
|
53
|
+
});
|
|
54
|
+
// Distinct source-currency logos (USDC, USDT, ETH, …) for the "from address" row.
|
|
55
|
+
const currencyLogos = [];
|
|
56
|
+
const seenSymbols = new Set();
|
|
57
|
+
for (const c of chains) {
|
|
58
|
+
for (const cur of c.currencies) {
|
|
59
|
+
if (cur.logo && !seenSymbols.has(cur.symbol)) {
|
|
60
|
+
seenSymbols.add(cur.symbol);
|
|
61
|
+
currencyLogos.push(cur.logo);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Keep the preview compact: at most 4 logos (fewer on mobile).
|
|
66
|
+
const maxLogos = isMobile ? 3 : 4;
|
|
67
|
+
/** The logos to preview on the right of a row. */
|
|
68
|
+
const clusterFor = (id) => {
|
|
69
|
+
var _a;
|
|
70
|
+
if (id === FundingMethod.ADDRESS) {
|
|
71
|
+
return currencyLogos.slice(0, maxLogos).map((src) => jsx("img", { src: src, alt: "", onError: hideBrokenLogo }, src));
|
|
72
|
+
}
|
|
73
|
+
return ((_a = BRAND_LOGOS[id]) !== null && _a !== void 0 ? _a : []).slice(0, maxLogos);
|
|
74
|
+
};
|
|
75
|
+
const go = (target) => {
|
|
76
|
+
if (target.kind === 'crypto') {
|
|
77
|
+
setRoute(routes.DEPOSIT_CRYPTO);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (target.kind === 'wallet') {
|
|
81
|
+
setRoute(routes.DEPOSIT_WALLET);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (target.kind === 'cex') {
|
|
85
|
+
setRoute(routes.DEPOSIT_CEX);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
// Fiat rails reuse the existing Buy flow; preselect the chosen provider so
|
|
89
|
+
// Apple Pay / Card land on the right rail.
|
|
90
|
+
setBuyForm((prev) => ({ ...prev, providerId: target.providerId }));
|
|
91
|
+
setRoute(routes.BUY);
|
|
92
|
+
};
|
|
93
|
+
return (jsxs(PageContent, { onBack: routes.CONNECTED, children: [jsx(ModalHeading, { children: "Add funds" }), jsx(DepositContent, { children: jsx(OptionList, { children: options.map((option) => {
|
|
94
|
+
var _a;
|
|
95
|
+
return (jsxs(OptionButton, { type: "button", disabled: option.disabled, onClick: () => go(option.target), children: [jsxs(OptionLeft, { children: [jsx(OptionIconBadge, { children: METHOD_ICON[option.id] }), jsxs(OptionInfo, { children: [jsx(OptionTitle, { children: option.title }), jsx(OptionSubtitle, { children: (_a = option.disabledReason) !== null && _a !== void 0 ? _a : option.subtitle })] })] }), jsx(LogoCluster, { children: clusterFor(option.id) })] }, option.id));
|
|
96
|
+
}) }) })] }));
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { Deposit as default };
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type BuyProviderId, FundingMethod } from '../../Openfort/types';
|
|
2
|
+
/**
|
|
3
|
+
* What a row routes into:
|
|
4
|
+
* - `buy`: the existing fiat onramp flow, with a rail (provider) preselected.
|
|
5
|
+
* - `crypto` / `wallet` / `cex`: the new funding-session Pages.
|
|
6
|
+
*/
|
|
7
|
+
export type DepositMethodTarget = {
|
|
8
|
+
kind: 'buy';
|
|
9
|
+
providerId: BuyProviderId;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'crypto';
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'wallet';
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'cex';
|
|
16
|
+
};
|
|
17
|
+
type DepositMethod = {
|
|
18
|
+
id: FundingMethod;
|
|
19
|
+
title: string;
|
|
20
|
+
/** Speed/fee hint, e.g. "instant, ~4% fee". */
|
|
21
|
+
subtitle: string;
|
|
22
|
+
target: DepositMethodTarget;
|
|
23
|
+
/** Only show on mobile devices (e.g. Apple Pay). */
|
|
24
|
+
mobileOnly?: boolean;
|
|
25
|
+
};
|
|
26
|
+
/** Context used to order/filter the rows for the current device. */
|
|
27
|
+
type PaymentOptionsContext = {
|
|
28
|
+
isMobile: boolean;
|
|
29
|
+
/** When the funding backend is unavailable, crypto/CEX rows are disabled. */
|
|
30
|
+
fundingAvailable: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Integrator-selected methods, in display order. When set, only these show
|
|
33
|
+
* (still subject to device/availability gating). Omit to show all.
|
|
34
|
+
*/
|
|
35
|
+
methods?: FundingMethod[];
|
|
36
|
+
};
|
|
37
|
+
/** A row ready to render: resolved order, plus disabled state + reason. */
|
|
38
|
+
type ResolvedDepositOption = DepositMethod & {
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
disabledReason?: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Resolve the deposit rows for the current context: pick the integrator's
|
|
44
|
+
* `methods` (or all) in order, filter device-incompatible rails, default-order
|
|
45
|
+
* Apple Pay first on mobile when the order isn't explicit, and mark disabled
|
|
46
|
+
* rows with a reason.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getPaymentOptions(ctx: PaymentOptionsContext): ResolvedDepositOption[];
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FundingMethod } from '../../Openfort/types.js';
|
|
2
|
+
|
|
3
|
+
const ALL_METHODS = [
|
|
4
|
+
{
|
|
5
|
+
id: FundingMethod.APPLE_PAY,
|
|
6
|
+
title: 'Apple Pay',
|
|
7
|
+
subtitle: 'No min · ~3.5% fee · Instant',
|
|
8
|
+
target: { kind: 'buy', providerId: 'stripe' },
|
|
9
|
+
mobileOnly: true,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: FundingMethod.CARD,
|
|
13
|
+
title: 'Card',
|
|
14
|
+
subtitle: 'Min $10 · ~4% fee · Instant',
|
|
15
|
+
target: { kind: 'buy', providerId: 'stripe' },
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: FundingMethod.WALLET,
|
|
19
|
+
title: 'Transfer from wallet',
|
|
20
|
+
subtitle: 'Min $1 · No fee · 10 sec',
|
|
21
|
+
target: { kind: 'wallet' },
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: FundingMethod.ADDRESS,
|
|
25
|
+
title: 'Transfer from address',
|
|
26
|
+
subtitle: 'Min $1 · No fee · 10 sec',
|
|
27
|
+
target: { kind: 'crypto' },
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: FundingMethod.EXCHANGE,
|
|
31
|
+
title: 'Transfer from Exchange',
|
|
32
|
+
subtitle: 'Min $1 · Network fee · 2 min',
|
|
33
|
+
target: { kind: 'cex' },
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
/**
|
|
37
|
+
* Resolve the deposit rows for the current context: pick the integrator's
|
|
38
|
+
* `methods` (or all) in order, filter device-incompatible rails, default-order
|
|
39
|
+
* Apple Pay first on mobile when the order isn't explicit, and mark disabled
|
|
40
|
+
* rows with a reason.
|
|
41
|
+
*/
|
|
42
|
+
function getPaymentOptions(ctx) {
|
|
43
|
+
const explicitMethods = ctx.methods && ctx.methods.length > 0 ? ctx.methods : null;
|
|
44
|
+
const byId = new Map(ALL_METHODS.map((m) => [m.id, m]));
|
|
45
|
+
const base = explicitMethods
|
|
46
|
+
? explicitMethods.map((id) => byId.get(id)).filter((m) => m !== undefined)
|
|
47
|
+
: ALL_METHODS;
|
|
48
|
+
const visible = base.filter((m) => (m.mobileOnly ? ctx.isMobile : true));
|
|
49
|
+
// Honor the integrator's explicit order; otherwise float Apple Pay first on mobile.
|
|
50
|
+
const ordered = !explicitMethods && ctx.isMobile
|
|
51
|
+
? [...visible].sort((a, b) => Number(b.id === FundingMethod.APPLE_PAY) - Number(a.id === FundingMethod.APPLE_PAY))
|
|
52
|
+
: visible;
|
|
53
|
+
return ordered.map((method) => {
|
|
54
|
+
const fundingRail = method.target.kind === 'crypto' || method.target.kind === 'wallet' || method.target.kind === 'cex';
|
|
55
|
+
if (fundingRail && !ctx.fundingAvailable) {
|
|
56
|
+
return { ...method, disabled: true, disabledReason: 'Coming soon' };
|
|
57
|
+
}
|
|
58
|
+
return { ...method, disabled: false };
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { getPaymentOptions };
|
|
63
|
+
//# sourceMappingURL=paymentOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentOptions.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Funding destination defaults + small formatting helpers. The source chain/token
|
|
3
|
+
* registry is no longer hardcoded here — it's fetched live from Relay via
|
|
4
|
+
* `useFundingChains`.
|
|
5
|
+
*/
|
|
6
|
+
/** Destination default: USDC on Base (used when the integrator doesn't override). */
|
|
7
|
+
export declare const DEST_CHAIN = "eip155:8453";
|
|
8
|
+
export declare const DEST_USDC = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
9
|
+
/**
|
|
10
|
+
* Solana destination default: USDC on Solana mainnet, used for SVM wallets when the
|
|
11
|
+
* integrator doesn't override. The chain id must match the Solana entry in
|
|
12
|
+
* {@link DEFAULT_SOURCE_CHAINS} so a same-chain selection resolves to the wallet address.
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEST_CHAIN_SOL = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
15
|
+
export declare const DEST_USDC_SOL = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
16
|
+
/** True for a CAIP-2 Solana chain id. */
|
|
17
|
+
export declare function isSolana(chain: string): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Funding destination defaults + small formatting helpers. The source chain/token
|
|
3
|
+
* registry is no longer hardcoded here — it's fetched live from Relay via
|
|
4
|
+
* `useFundingChains`.
|
|
5
|
+
*/
|
|
6
|
+
/** Destination default: USDC on Base (used when the integrator doesn't override). */
|
|
7
|
+
const DEST_CHAIN = 'eip155:8453';
|
|
8
|
+
const DEST_USDC = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';
|
|
9
|
+
/**
|
|
10
|
+
* Solana destination default: USDC on Solana mainnet, used for SVM wallets when the
|
|
11
|
+
* integrator doesn't override. The chain id must match the Solana entry in
|
|
12
|
+
* {@link DEFAULT_SOURCE_CHAINS} so a same-chain selection resolves to the wallet address.
|
|
13
|
+
*/
|
|
14
|
+
const DEST_CHAIN_SOL = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp';
|
|
15
|
+
const DEST_USDC_SOL = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
|
|
16
|
+
/** True for a CAIP-2 Solana chain id. */
|
|
17
|
+
function isSolana(chain) {
|
|
18
|
+
return chain.startsWith('solana:');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { DEST_CHAIN, DEST_CHAIN_SOL, DEST_USDC, DEST_USDC_SOL, isSolana };
|
|
22
|
+
//# sourceMappingURL=sources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sources.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Sizes to the content so short method lists don't leave a cut-looking gap. */
|
|
2
|
+
export declare const DepositContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
/** Separates the chain/currency step (above) from the action buttons (below). */
|
|
4
|
+
export declare const StepDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
/** Sizes a brand logo (svg/img) to 20px for use inside wallet/exchange buttons. */
|
|
6
|
+
export declare const ButtonLogo: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
|
+
/** Loading placeholder block. */
|
|
8
|
+
export declare const Skeleton: import("styled-components").StyledComponent<"div", any, {
|
|
9
|
+
$w?: string;
|
|
10
|
+
$h?: string;
|
|
11
|
+
$r?: string;
|
|
12
|
+
}, never>;
|
|
13
|
+
export declare const OptionList: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const OptionButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
15
|
+
/** Left group: action icon badge + the title/subtitle text. */
|
|
16
|
+
export declare const OptionLeft: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
/** Holds the per-action icon on the left of each row (no background). */
|
|
18
|
+
export declare const OptionIconBadge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
|
+
/** Overlapping strip of token/wallet/exchange logos on the right of each row. */
|
|
20
|
+
export declare const LogoCluster: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
21
|
+
export declare const OptionInfo: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
22
|
+
export declare const OptionTitle: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
23
|
+
export declare const OptionSubtitle: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
24
|
+
/** Sized, centered wrapper so the QR (which sizes off its parent width) renders. */
|
|
25
|
+
export declare const QRWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|