@openfort/react 1.5.1 → 1.6.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/components/Common/Chain/styles.d.ts +10 -0
- package/build/components/Common/Chain/styles.js +103 -1
- package/build/components/Common/Chain/styles.js.map +1 -1
- package/build/components/Common/Modal/index.js +2 -0
- package/build/components/Common/Modal/index.js.map +1 -1
- package/build/components/Common/SolanaChain/index.d.ts +5 -4
- package/build/components/Common/SolanaChain/index.js +9 -17
- package/build/components/Common/SolanaChain/index.js.map +1 -1
- package/build/components/ConnectModal/index.js +2 -0
- package/build/components/ConnectModal/index.js.map +1 -1
- package/build/components/Openfort/OpenfortProvider.js +4 -0
- package/build/components/Openfort/OpenfortProvider.js.map +1 -1
- package/build/components/Openfort/context.d.ts +4 -1
- package/build/components/Openfort/types.d.ts +22 -0
- package/build/components/Openfort/types.js +1 -0
- package/build/components/Openfort/types.js.map +1 -1
- package/build/components/Pages/Buy/styles.js +10 -10
- package/build/components/Pages/Connected/EthereumConnected.js +7 -1
- package/build/components/Pages/Connected/EthereumConnected.js.map +1 -1
- package/build/components/Pages/Deposit/TestnetNotice.js +15 -3
- package/build/components/Pages/Deposit/TestnetNotice.js.map +1 -1
- package/build/components/Pages/Deposit/index.js +1 -2
- package/build/components/Pages/Deposit/index.js.map +1 -1
- package/build/components/Pages/Deposit/sources.d.ts +3 -0
- package/build/components/Pages/Deposit/sources.js +4 -1
- package/build/components/Pages/Deposit/sources.js.map +1 -1
- package/build/components/Pages/Deposit/useFundingTarget.d.ts +6 -4
- package/build/components/Pages/Deposit/useFundingTarget.js +18 -7
- package/build/components/Pages/Deposit/useFundingTarget.js.map +1 -1
- package/build/components/Pages/DepositCex/index.js +2 -1
- package/build/components/Pages/DepositCex/index.js.map +1 -1
- package/build/components/Pages/Send/EthereumSend.js +10 -4
- package/build/components/Pages/Send/EthereumSend.js.map +1 -1
- package/build/components/Pages/Send/SolanaSend.js +9 -4
- package/build/components/Pages/Send/SolanaSend.js.map +1 -1
- package/build/components/Pages/Send/styles.d.ts +0 -1
- package/build/components/Pages/Send/styles.js +2 -13
- package/build/components/Pages/Send/styles.js.map +1 -1
- package/build/components/Pages/SendConfirmation/ConfirmationSummary.d.ts +27 -0
- package/build/components/Pages/SendConfirmation/ConfirmationSummary.js +15 -0
- package/build/components/Pages/SendConfirmation/ConfirmationSummary.js.map +1 -0
- package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js +3 -3
- package/build/components/Pages/SendConfirmation/index.js +14 -30
- package/build/components/Pages/SendConfirmation/index.js.map +1 -1
- package/build/components/Pages/SendConfirmation/styles.d.ts +7 -1
- package/build/components/Pages/SendConfirmation/styles.js +49 -17
- package/build/components/Pages/SendConfirmation/styles.js.map +1 -1
- package/build/components/Pages/SignMessage/index.d.ts +2 -0
- package/build/components/Pages/SignMessage/index.js +81 -0
- package/build/components/Pages/SignMessage/index.js.map +1 -0
- package/build/components/Pages/SignMessage/styles.d.ts +14 -0
- package/build/components/Pages/SignMessage/styles.js +82 -0
- package/build/components/Pages/SignMessage/styles.js.map +1 -0
- package/build/hooks/openfort/useSignMessage.d.ts +27 -0
- package/build/hooks/openfort/useSignMessage.js +52 -0
- package/build/hooks/openfort/useSignMessage.js.map +1 -0
- package/build/hooks/openfort/useUI.d.ts +6 -1
- package/build/hooks/openfort/useUI.js +12 -2
- package/build/hooks/openfort/useUI.js.map +1 -1
- package/build/index.d.ts +2 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/localizations/locales/en-US.js +1 -1
- package/build/utils/rpc.d.ts +6 -0
- package/build/utils/rpc.js +12 -1
- package/build/utils/rpc.js.map +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/build/wagmi/components/ChainSelect/index.js +1 -93
- package/build/wagmi/components/ChainSelect/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,4 +6,14 @@ export declare const ChainContainer: import("styled-components").StyledComponent
|
|
|
6
6
|
export declare const LogoContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
|
|
7
7
|
export declare const LoadingContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
|
|
8
8
|
export declare const Unsupported: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
|
|
9
|
+
/**
|
|
10
|
+
* Pill-shaped chain indicator/switch button shown in the connected header.
|
|
11
|
+
*
|
|
12
|
+
* Shared by the EVM `ChainSelect` (which adds a chevron + dropdown when more
|
|
13
|
+
* than one chain is available) and the read-only Solana indicator (which always
|
|
14
|
+
* renders in the `disabled` single-network state). The `disabled` branch
|
|
15
|
+
* collapses to an icon-only badge and shifts left to keep the icon aligned with
|
|
16
|
+
* the enabled pill.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SwitchChainButton: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>, any, {}, never>;
|
|
9
19
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { motion } from 'framer-motion';
|
|
2
2
|
import { css, keyframes } from 'styled-components';
|
|
3
|
+
import defaultTheme from '../../../constants/defaultTheme.js';
|
|
3
4
|
import styled from '../../../styles/styled/index.js';
|
|
4
5
|
|
|
5
6
|
const ChainContainer = styled.div `
|
|
@@ -89,6 +90,107 @@ const Unsupported = styled(motion.div) `
|
|
|
89
90
|
right: -30%;
|
|
90
91
|
}
|
|
91
92
|
`;
|
|
93
|
+
/**
|
|
94
|
+
* Pill-shaped chain indicator/switch button shown in the connected header.
|
|
95
|
+
*
|
|
96
|
+
* Shared by the EVM `ChainSelect` (which adds a chevron + dropdown when more
|
|
97
|
+
* than one chain is available) and the read-only Solana indicator (which always
|
|
98
|
+
* renders in the `disabled` single-network state). The `disabled` branch
|
|
99
|
+
* collapses to an icon-only badge and shifts left to keep the icon aligned with
|
|
100
|
+
* the enabled pill.
|
|
101
|
+
*/
|
|
102
|
+
const SwitchChainButton = styled(motion.button) `
|
|
103
|
+
--color: var(
|
|
104
|
+
--ck-dropdown-button-color,
|
|
105
|
+
var(--ck-button-primary-color, var(--ck-body-color))
|
|
106
|
+
);
|
|
107
|
+
--background: var(
|
|
108
|
+
--ck-dropdown-button-background,
|
|
109
|
+
var(--ck-secondary-button-background, var(--ck-body-background-secondary))
|
|
110
|
+
);
|
|
111
|
+
--box-shadow: var(
|
|
112
|
+
--ck-dropdown-button-box-shadow,
|
|
113
|
+
var(
|
|
114
|
+
--ck-secondary-button-box-shadow,
|
|
115
|
+
var(--ck-button-primary-box-shadow),
|
|
116
|
+
none
|
|
117
|
+
)
|
|
118
|
+
);
|
|
92
119
|
|
|
93
|
-
|
|
120
|
+
--hover-color: var(--ck-dropdown-button-hover-color, var(--color));
|
|
121
|
+
--hover-background: var(
|
|
122
|
+
--ck-dropdown-button-hover-background,
|
|
123
|
+
var(--background)
|
|
124
|
+
);
|
|
125
|
+
--hover-box-shadow: var(
|
|
126
|
+
--ck-dropdown-button-hover-box-shadow,
|
|
127
|
+
var(--box-shadow)
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
--active-color: var(--ck-dropdown-button-active-color, var(--hover-color));
|
|
131
|
+
--active-background: var(
|
|
132
|
+
--ck-dropdown-button-active-background,
|
|
133
|
+
var(--hover-background)
|
|
134
|
+
);
|
|
135
|
+
--active-box-shadow: var(
|
|
136
|
+
--ck-dropdown-button-active-box-shadow,
|
|
137
|
+
var(--hover-box-shadow)
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
appearance: none;
|
|
141
|
+
user-select: none;
|
|
142
|
+
position: relative;
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: space-between;
|
|
146
|
+
border-radius: 15px;
|
|
147
|
+
width: 52px;
|
|
148
|
+
height: 30px;
|
|
149
|
+
padding: 2px 6px 2px 3px;
|
|
150
|
+
font-size: 16px;
|
|
151
|
+
line-height: 19px;
|
|
152
|
+
font-weight: 500;
|
|
153
|
+
text-decoration: none;
|
|
154
|
+
white-space: nowrap;
|
|
155
|
+
transform: translateZ(0px);
|
|
156
|
+
|
|
157
|
+
transition: 100ms ease;
|
|
158
|
+
transition-property: transform, background-color, box-shadow, color;
|
|
159
|
+
|
|
160
|
+
color: var(--color);
|
|
161
|
+
background: var(--background);
|
|
162
|
+
box-shadow: var(--box-shadow);
|
|
163
|
+
|
|
164
|
+
svg {
|
|
165
|
+
position: relative;
|
|
166
|
+
display: block;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
${(props) => props.disabled
|
|
170
|
+
? css `
|
|
171
|
+
width: auto;
|
|
172
|
+
padding: 3px;
|
|
173
|
+
position: relative;
|
|
174
|
+
left: -22px;
|
|
175
|
+
`
|
|
176
|
+
: css `
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
|
|
179
|
+
@media only screen and (min-width: ${defaultTheme.mobileWidth + 1}px) {
|
|
180
|
+
&:hover,
|
|
181
|
+
&:focus-visible {
|
|
182
|
+
color: var(--hover-color);
|
|
183
|
+
background: var(--hover-background);
|
|
184
|
+
box-shadow: var(--hover-box-shadow);
|
|
185
|
+
}
|
|
186
|
+
&:active {
|
|
187
|
+
color: var(--active-color);
|
|
188
|
+
background: var(--active-background);
|
|
189
|
+
box-shadow: var(--active-box-shadow);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
`}
|
|
193
|
+
`;
|
|
194
|
+
|
|
195
|
+
export { ChainContainer, LoadingContainer, LogoContainer, SwitchChainButton, Unsupported };
|
|
94
196
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Read-only Solana network indicator for the Connected modal
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Read-only Solana network indicator for the Connected modal. Mirrors the EVM
|
|
3
|
+
* `ChainSelect` in its single-network (`disabled`) state — the same pill button
|
|
4
|
+
* and tooltip — so EVM and Solana headers stay visually consistent. There is no
|
|
5
|
+
* switch: the cluster is fixed by `walletConfig.solana` and cannot change at
|
|
6
|
+
* runtime, so the button never gains a chevron or dropdown.
|
|
6
7
|
*/
|
|
7
8
|
declare const SolanaChain: () => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default SolanaChain;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import Logos from '../../../assets/logos.js';
|
|
3
3
|
import { useSolanaContext } from '../../../solana/SolanaContext.js';
|
|
4
|
-
import
|
|
4
|
+
import { SwitchChainButton, ChainContainer, LogoContainer } from '../Chain/styles.js';
|
|
5
5
|
import Tooltip from '../Tooltip/index.js';
|
|
6
6
|
|
|
7
7
|
/** `mainnet-beta` → "Mainnet"; otherwise capitalize the cluster name. */
|
|
@@ -12,28 +12,20 @@ function formatCluster(cluster) {
|
|
|
12
12
|
return 'Mainnet';
|
|
13
13
|
return cluster.charAt(0).toUpperCase() + cluster.slice(1);
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
width: 24px;
|
|
20
|
-
height: 24px;
|
|
21
|
-
border-radius: 50%;
|
|
22
|
-
background: #131313;
|
|
23
|
-
border: 2px solid var(--ck-body-background, #fff);
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
`;
|
|
15
|
+
/** Solana mark rendered in the same circular container as the EVM `Chain` icon. */
|
|
16
|
+
const SolanaChainIcon = () => (jsx(ChainContainer, { size: 24, radius: "50%", children: jsx(LogoContainer, { initial: false, animate: { opacity: 1 }, children: jsx(Logos.Solana, { style: { width: '62%', height: 'auto' } }) }) }));
|
|
26
17
|
/**
|
|
27
|
-
* Read-only Solana network indicator for the Connected modal
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
18
|
+
* Read-only Solana network indicator for the Connected modal. Mirrors the EVM
|
|
19
|
+
* `ChainSelect` in its single-network (`disabled`) state — the same pill button
|
|
20
|
+
* and tooltip — so EVM and Solana headers stay visually consistent. There is no
|
|
21
|
+
* switch: the cluster is fixed by `walletConfig.solana` and cannot change at
|
|
22
|
+
* runtime, so the button never gains a chevron or dropdown.
|
|
31
23
|
*/
|
|
32
24
|
const SolanaChain = () => {
|
|
33
25
|
var _a;
|
|
34
26
|
const cluster = (_a = useSolanaContext()) === null || _a === void 0 ? void 0 : _a.cluster;
|
|
35
27
|
const label = cluster ? `Solana · ${formatCluster(cluster)}` : 'Solana';
|
|
36
|
-
return (jsx(
|
|
28
|
+
return (jsx(SwitchChainButton, { type: "button", disabled: true, "aria-label": label, children: jsx(Tooltip, { message: label, xOffset: -6, delay: 0.01, children: jsx(SolanaChainIcon, {}) }) }));
|
|
37
29
|
};
|
|
38
30
|
|
|
39
31
|
export { SolanaChain as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -52,6 +52,7 @@ import Send from '../Pages/Send/index.js';
|
|
|
52
52
|
import { SolanaSend } from '../Pages/Send/SolanaSend.js';
|
|
53
53
|
import SendConfirmation from '../Pages/SendConfirmation/index.js';
|
|
54
54
|
import { SolanaSendConfirmation } from '../Pages/SendConfirmation/SolanaSendConfirmation.js';
|
|
55
|
+
import SignMessage from '../Pages/SignMessage/index.js';
|
|
55
56
|
import SocialProviders from '../Pages/SocialProviders/index.js';
|
|
56
57
|
import ConnectUsing from './ConnectUsing.js';
|
|
57
58
|
import ConnectWithMobile from './ConnectWithMobile.js';
|
|
@@ -103,6 +104,7 @@ function buildSharedPages() {
|
|
|
103
104
|
depositWallet: jsx(DepositWallet, {}),
|
|
104
105
|
depositCex: jsx(DepositCex, {}),
|
|
105
106
|
exportKey: jsx(ExportKey, {}),
|
|
107
|
+
signMessage: jsx(SignMessage, {}),
|
|
106
108
|
walletOverview: jsx(Connected, {}),
|
|
107
109
|
};
|
|
108
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -145,6 +145,7 @@ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMo
|
|
|
145
145
|
const [emailInput, setEmailInput] = useState('');
|
|
146
146
|
const [phoneInput, setPhoneInput] = useState('');
|
|
147
147
|
const [sendForm, setSendForm] = useState(defaultSendFormState);
|
|
148
|
+
const [signRequest, setSignRequest] = useState(null);
|
|
148
149
|
const [buyForm, setBuyForm] = useState(defaultBuyFormState);
|
|
149
150
|
const [headerLeftSlot, setHeaderLeftSlot] = useState(null);
|
|
150
151
|
const [chainType, setChainType] = useState((_g = walletConfig === null || walletConfig === void 0 ? void 0 : walletConfig.chainType) !== null && _g !== void 0 ? _g : ChainTypeEnum.EVM);
|
|
@@ -263,6 +264,8 @@ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMo
|
|
|
263
264
|
setSendForm,
|
|
264
265
|
buyForm,
|
|
265
266
|
setBuyForm,
|
|
267
|
+
signRequest,
|
|
268
|
+
setSignRequest,
|
|
266
269
|
onConnect,
|
|
267
270
|
onDisconnect,
|
|
268
271
|
chains,
|
|
@@ -291,6 +294,7 @@ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMo
|
|
|
291
294
|
phoneInput,
|
|
292
295
|
sendForm,
|
|
293
296
|
buyForm,
|
|
297
|
+
signRequest,
|
|
294
298
|
headerLeftSlot,
|
|
295
299
|
onConnect,
|
|
296
300
|
onDisconnect,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenfortProvider.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OpenfortProvider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ import type React from 'react';
|
|
|
3
3
|
import type { Chain } from 'viem';
|
|
4
4
|
import type { useConnectCallbackProps } from '../../openfort/connectCallbackTypes';
|
|
5
5
|
import type { CustomTheme, Languages, Mode, Theme } from '../../types';
|
|
6
|
-
import type { BuyFormState, DebugModeOptions, OpenfortUIOptionsExtended, OpenfortWalletConfig, RouteOptions, SendFormState, SetRouteOptions } from './types';
|
|
6
|
+
import type { BuyFormState, DebugModeOptions, OpenfortUIOptionsExtended, OpenfortWalletConfig, RouteOptions, SendFormState, SetRouteOptions, SignRequest } from './types';
|
|
7
7
|
type Connector = {
|
|
8
8
|
id: string;
|
|
9
9
|
type?: 'wallet';
|
|
@@ -50,6 +50,9 @@ export type ContextValue = {
|
|
|
50
50
|
setSendForm: React.Dispatch<React.SetStateAction<SendFormState>>;
|
|
51
51
|
buyForm: BuyFormState;
|
|
52
52
|
setBuyForm: React.Dispatch<React.SetStateAction<BuyFormState>>;
|
|
53
|
+
/** In-flight message/typed-data sign request driving the Sign message screen. */
|
|
54
|
+
signRequest: SignRequest | null;
|
|
55
|
+
setSignRequest: React.Dispatch<React.SetStateAction<SignRequest | null>>;
|
|
53
56
|
/** Configured EVM chains (from wagmi bridge or walletConfig.ethereum). Empty when not EVM. */
|
|
54
57
|
chains: Chain[];
|
|
55
58
|
} & useConnectCallbackProps;
|
|
@@ -13,6 +13,7 @@ export declare const routes: {
|
|
|
13
13
|
readonly SOCIAL_PROVIDERS: "socialProviders";
|
|
14
14
|
readonly PROFILE: "profile";
|
|
15
15
|
readonly EXPORT_KEY: "exportKey";
|
|
16
|
+
readonly SIGN_MESSAGE: "signMessage";
|
|
16
17
|
readonly LOADING: "loading";
|
|
17
18
|
readonly LOAD_WALLETS: "loadWallets";
|
|
18
19
|
readonly RECOVER_WALLET: "recoverWallets";
|
|
@@ -473,6 +474,27 @@ export type SendFormState = {
|
|
|
473
474
|
asset: Asset;
|
|
474
475
|
};
|
|
475
476
|
export declare const defaultSendFormState: SendFormState;
|
|
477
|
+
/** EIP-712 typed-data payload accepted by `useSignMessage().signTypedData`. */
|
|
478
|
+
export type SignTypedDataPayload = {
|
|
479
|
+
domain?: Record<string, unknown>;
|
|
480
|
+
types: Record<string, {
|
|
481
|
+
name: string;
|
|
482
|
+
type: string;
|
|
483
|
+
}[]>;
|
|
484
|
+
primaryType: string;
|
|
485
|
+
message: Record<string, unknown>;
|
|
486
|
+
};
|
|
487
|
+
/** An in-flight sign request that drives the Sign message modal screen. */
|
|
488
|
+
export type SignRequest = ({
|
|
489
|
+
kind: 'message';
|
|
490
|
+
message: string;
|
|
491
|
+
} | {
|
|
492
|
+
kind: 'typedData';
|
|
493
|
+
typedData: SignTypedDataPayload;
|
|
494
|
+
}) & {
|
|
495
|
+
resolve: (signature: `0x${string}`) => void;
|
|
496
|
+
reject: (reason?: unknown) => void;
|
|
497
|
+
};
|
|
476
498
|
export type BuyProviderId = 'moonpay' | 'coinbase' | 'stripe';
|
|
477
499
|
export type BuyFormState = {
|
|
478
500
|
amount: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,8 +4,8 @@ import { ButtonContainer } from '../../Common/Button/styles.js';
|
|
|
4
4
|
const Section = styled.div `
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
margin-top:
|
|
8
|
-
gap:
|
|
7
|
+
margin-top: 16px;
|
|
8
|
+
gap: 10px;
|
|
9
9
|
`;
|
|
10
10
|
const SectionLabel = styled.span `
|
|
11
11
|
font-size: 13px;
|
|
@@ -16,16 +16,16 @@ const SectionLabel = styled.span `
|
|
|
16
16
|
`;
|
|
17
17
|
const AmountCard = styled.div `
|
|
18
18
|
display: flex;
|
|
19
|
-
align-items:
|
|
20
|
-
gap:
|
|
21
|
-
padding:
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 8px;
|
|
21
|
+
padding: 12px 14px;
|
|
22
22
|
border-radius: var(--ck-secondary-button-border-radius);
|
|
23
23
|
border: 1px solid var(--ck-body-divider);
|
|
24
24
|
background: var(--ck-secondary-button-background);
|
|
25
25
|
color: var(--ck-body-color);
|
|
26
26
|
`;
|
|
27
27
|
const CurrencySymbol = styled.span `
|
|
28
|
-
font-size:
|
|
28
|
+
font-size: 18px;
|
|
29
29
|
font-weight: 600;
|
|
30
30
|
color: var(--ck-body-color-muted);
|
|
31
31
|
line-height: 1;
|
|
@@ -35,7 +35,7 @@ const AmountInput = styled.input `
|
|
|
35
35
|
border: none;
|
|
36
36
|
background: transparent;
|
|
37
37
|
color: var(--ck-body-color);
|
|
38
|
-
font-size:
|
|
38
|
+
font-size: 24px;
|
|
39
39
|
font-weight: 600;
|
|
40
40
|
line-height: 1;
|
|
41
41
|
padding: 0;
|
|
@@ -53,12 +53,12 @@ const PresetList = styled.div `
|
|
|
53
53
|
`;
|
|
54
54
|
const PresetButton = styled.button `
|
|
55
55
|
flex: 1;
|
|
56
|
-
padding:
|
|
56
|
+
padding: 8px 12px;
|
|
57
57
|
border-radius: 999px;
|
|
58
58
|
border: none;
|
|
59
59
|
background: ${({ $active }) => ($active ? 'var(--ck-accent-color)' : 'var(--ck-secondary-button-background)')};
|
|
60
60
|
color: ${({ $active }) => ($active ? 'var(--ck-accent-text-color)' : 'var(--ck-body-color)')};
|
|
61
|
-
font-size:
|
|
61
|
+
font-size: 13px;
|
|
62
62
|
font-weight: 600;
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
|
|
@@ -71,7 +71,7 @@ const SelectorButton = styled.button `
|
|
|
71
71
|
align-items: center;
|
|
72
72
|
justify-content: space-between;
|
|
73
73
|
width: 100%;
|
|
74
|
-
padding: 14px
|
|
74
|
+
padding: 10px 14px;
|
|
75
75
|
border-radius: var(--ck-secondary-button-border-radius);
|
|
76
76
|
border: 1px solid var(--ck-body-divider);
|
|
77
77
|
background: var(--ck-secondary-button-background);
|
|
@@ -81,9 +81,15 @@ const EthereumConnected = () => {
|
|
|
81
81
|
return acc + price * balance;
|
|
82
82
|
}, 0);
|
|
83
83
|
}, [multiChainAssets]);
|
|
84
|
+
// Re-measure on mount, after paint, and when the async assets resolve. Without
|
|
85
|
+
// the post-paint pass, returning to this screen (assets already cached) measures
|
|
86
|
+
// before layout settles and the modal keeps the shorter height, clipping the
|
|
87
|
+
// actions below the fold.
|
|
84
88
|
useEffect(() => {
|
|
85
89
|
context.triggerResize();
|
|
86
|
-
|
|
90
|
+
const id = requestAnimationFrame(() => context.triggerResize());
|
|
91
|
+
return () => cancelAnimationFrame(id);
|
|
92
|
+
}, [context.triggerResize, isLoading, totalBalanceUsd]);
|
|
87
93
|
useEffect(() => {
|
|
88
94
|
if (!address) {
|
|
89
95
|
setHeaderLeftSlot(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EthereumConnected.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EthereumConnected.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ChainTypeEnum } from '@openfort/openfort-js';
|
|
2
3
|
import { useState, useEffect } from 'react';
|
|
4
|
+
import { useEthereumEmbeddedWallet } from '../../../ethereum/hooks/useEthereumEmbeddedWallet.js';
|
|
5
|
+
import { useOpenfortCore } from '../../../openfort/useOpenfort.js';
|
|
6
|
+
import { useSolanaEmbeddedWallet } from '../../../solana/hooks/useSolanaEmbeddedWallet.js';
|
|
3
7
|
import styled from '../../../styles/styled/index.js';
|
|
4
|
-
import {
|
|
8
|
+
import { isTestnetChainId } from '../../../utils/rpc.js';
|
|
5
9
|
import { useOpenfort } from '../../Openfort/useOpenfort.js';
|
|
6
10
|
|
|
7
11
|
/** Relay's own testnet guide — the authoritative explanation of the limitation. */
|
|
@@ -116,13 +120,21 @@ const DocsLink = styled.a `
|
|
|
116
120
|
* Renders nothing on live keys.
|
|
117
121
|
*/
|
|
118
122
|
function TestnetNotice() {
|
|
119
|
-
const {
|
|
123
|
+
const { triggerResize } = useOpenfort();
|
|
124
|
+
const { chainType } = useOpenfortCore();
|
|
125
|
+
const ethereumWallet = useEthereumEmbeddedWallet();
|
|
126
|
+
const solanaWallet = useSolanaEmbeddedWallet();
|
|
120
127
|
const [open, setOpen] = useState(false);
|
|
121
128
|
// Re-measure the modal when the details expand/collapse so it grows/shrinks to fit.
|
|
122
129
|
useEffect(() => {
|
|
123
130
|
triggerResize();
|
|
124
131
|
}, [open, triggerResize]);
|
|
125
|
-
|
|
132
|
+
// Testnet is a property of the active chain, not the publishable key — read it
|
|
133
|
+
// from the connected embedded wallet so the notice tracks the real deposit network.
|
|
134
|
+
const isTestnet = chainType === ChainTypeEnum.SVM
|
|
135
|
+
? solanaWallet.status === 'connected' && solanaWallet.cluster !== 'mainnet-beta'
|
|
136
|
+
: ethereumWallet.status === 'connected' && isTestnetChainId(ethereumWallet.chainId);
|
|
137
|
+
if (!isTestnet)
|
|
126
138
|
return null;
|
|
127
139
|
return (jsxs(Card, { children: [jsxs(Header, { type: "button", "aria-expanded": open, onClick: () => setOpen((v) => !v), children: [jsx(Badge, { children: jsx(FlaskIcon, {}) }), jsx(Summary, { children: "Testnet mode \u2014 funding is limited" }), jsx(Chevron, { "$open": open, children: "\u25B6" })] }), open && (jsxs(Body, { children: [jsx(Muted, { children: "Deposits route through Relay's testnet rail. It bridges the same asset but can't swap between tokens \u2014 testnets have no DEX liquidity. Card and exchange rails are mainnet-only." }), jsxs(Rules, { children: [jsx("li", { "data-ok": "true", children: "Bridging the same asset (e.g. ETH \u2192 ETH) and same-chain transfers" }), jsx("li", { "data-ok": "false", children: "Swapping to another token (e.g. \u2192 USDC) \u2014 fails with \"$0 liquidity\"" })] }), jsx(Muted, { children: "To test swaps, card or exchange deposits, use a live key on a low-cost chain like Base." }), jsx(DocsLink, { href: RELAY_TESTNET_DOCS, target: "_blank", rel: "noreferrer", children: "Why? Read Relay's testnet guide \u2197" })] }))] }));
|
|
128
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestnetNotice.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestnetNotice.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -16,7 +16,6 @@ import { EVM_BUY_CURRENCIES } from '../Buy/evmCurrencies.js';
|
|
|
16
16
|
import { SOLANA_BUY_CURRENCIES } from '../Buy/solanaCurrencies.js';
|
|
17
17
|
import { getPaymentOptions } from './paymentOptions.js';
|
|
18
18
|
import { DepositContent, OptionList, OptionButton, OptionLeft, OptionIconBadge, OptionInfo, OptionTitle, OptionSubtitle, LogoCluster } from './styles.js';
|
|
19
|
-
import { TestnetNotice } from './TestnetNotice.js';
|
|
20
19
|
import { UnsupportedNetworkNotice } from './UnsupportedNetworkNotice.js';
|
|
21
20
|
import { useFundingTarget } from './useFundingTarget.js';
|
|
22
21
|
|
|
@@ -118,7 +117,7 @@ const Deposit = () => {
|
|
|
118
117
|
}));
|
|
119
118
|
setRoute(routes.BUY);
|
|
120
119
|
};
|
|
121
|
-
return (jsxs(PageContent, { onBack: routes.CONNECTED, children: [jsx(ModalHeading, { children: "Add funds" }),
|
|
120
|
+
return (jsxs(PageContent, { onBack: routes.CONNECTED, children: [jsx(ModalHeading, { children: "Add funds" }), targetUnsupported ? (jsx(UnsupportedNetworkNotice, { targetChain: target.chain, railChains: railChains })) : (jsx(DepositContent, { children: jsx(OptionList, { children: options.map((option) => {
|
|
122
121
|
var _a;
|
|
123
122
|
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));
|
|
124
123
|
}) }) })), jsx(PoweredByFooter, {})] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -13,5 +13,8 @@ export declare const DEST_USDC = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const DEST_CHAIN_SOL = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
15
15
|
export declare const DEST_USDC_SOL = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
16
|
+
/** EVM native-asset sentinel (zero address) — the default destination currency on
|
|
17
|
+
* chains where we don't ship a stablecoin address (e.g. testnets). */
|
|
18
|
+
export declare const NATIVE_TOKEN_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
16
19
|
/** True for a CAIP-2 Solana chain id. */
|
|
17
20
|
export declare function isSolana(chain: string): boolean;
|
|
@@ -13,10 +13,13 @@ const DEST_USDC = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';
|
|
|
13
13
|
*/
|
|
14
14
|
const DEST_CHAIN_SOL = 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp';
|
|
15
15
|
const DEST_USDC_SOL = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
|
|
16
|
+
/** EVM native-asset sentinel (zero address) — the default destination currency on
|
|
17
|
+
* chains where we don't ship a stablecoin address (e.g. testnets). */
|
|
18
|
+
const NATIVE_TOKEN_ADDRESS = '0x0000000000000000000000000000000000000000';
|
|
16
19
|
/** True for a CAIP-2 Solana chain id. */
|
|
17
20
|
function isSolana(chain) {
|
|
18
21
|
return chain.startsWith('solana:');
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
export { DEST_CHAIN, DEST_CHAIN_SOL, DEST_USDC, DEST_USDC_SOL, isSolana };
|
|
24
|
+
export { DEST_CHAIN, DEST_CHAIN_SOL, DEST_USDC, DEST_USDC_SOL, NATIVE_TOKEN_ADDRESS, isSolana };
|
|
22
25
|
//# sourceMappingURL=sources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sources.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The destination route Deposit-hub funding settles into. Integrators override the
|
|
3
|
-
* chain and currency via `uiConfig.funding.{targetChain,targetCurrency}
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* chain and currency via `uiConfig.funding.{targetChain,targetCurrency}`. With no
|
|
4
|
+
* override the destination follows the wallet's ACTIVE chain — so a testnet wallet
|
|
5
|
+
* funds on its own network instead of being told "funding isn't available on Base".
|
|
6
|
+
* Currency defaults to USDC where we ship its address (Base, Solana mainnet) and to
|
|
7
|
+
* the native asset otherwise, so the destination currency is always valid on-chain.
|
|
8
|
+
* The deposit recipient is always the active embedded wallet — callers resolve it.
|
|
7
9
|
*/
|
|
8
10
|
export declare function useFundingTarget(): {
|
|
9
11
|
chain: string;
|
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
import { ChainTypeEnum } from '@openfort/openfort-js';
|
|
2
|
+
import { useEthereumEmbeddedWallet } from '../../../ethereum/hooks/useEthereumEmbeddedWallet.js';
|
|
2
3
|
import { useOpenfortCore } from '../../../openfort/useOpenfort.js';
|
|
3
4
|
import { useOpenfort } from '../../Openfort/useOpenfort.js';
|
|
4
|
-
import { DEST_CHAIN_SOL, DEST_CHAIN, DEST_USDC_SOL,
|
|
5
|
+
import { DEST_CHAIN_SOL, DEST_CHAIN, DEST_USDC, DEST_USDC_SOL, NATIVE_TOKEN_ADDRESS } from './sources.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* The destination route Deposit-hub funding settles into. Integrators override the
|
|
8
|
-
* chain and currency via `uiConfig.funding.{targetChain,targetCurrency}
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* chain and currency via `uiConfig.funding.{targetChain,targetCurrency}`. With no
|
|
10
|
+
* override the destination follows the wallet's ACTIVE chain — so a testnet wallet
|
|
11
|
+
* funds on its own network instead of being told "funding isn't available on Base".
|
|
12
|
+
* Currency defaults to USDC where we ship its address (Base, Solana mainnet) and to
|
|
13
|
+
* the native asset otherwise, so the destination currency is always valid on-chain.
|
|
14
|
+
* The deposit recipient is always the active embedded wallet — callers resolve it.
|
|
12
15
|
*/
|
|
13
16
|
function useFundingTarget() {
|
|
14
17
|
var _a, _b, _c, _d;
|
|
15
18
|
const { uiConfig } = useOpenfort();
|
|
16
19
|
const { chainType } = useOpenfortCore();
|
|
20
|
+
const ethereumWallet = useEthereumEmbeddedWallet();
|
|
17
21
|
const isSolana = chainType === ChainTypeEnum.SVM;
|
|
22
|
+
const activeChain = isSolana
|
|
23
|
+
? DEST_CHAIN_SOL
|
|
24
|
+
: ethereumWallet.status === 'connected'
|
|
25
|
+
? `eip155:${ethereumWallet.chainId}`
|
|
26
|
+
: DEST_CHAIN;
|
|
27
|
+
const chain = (_b = (_a = uiConfig.funding) === null || _a === void 0 ? void 0 : _a.targetChain) !== null && _b !== void 0 ? _b : activeChain;
|
|
28
|
+
const defaultCurrency = chain === DEST_CHAIN ? DEST_USDC : chain === DEST_CHAIN_SOL ? DEST_USDC_SOL : NATIVE_TOKEN_ADDRESS;
|
|
18
29
|
return {
|
|
19
|
-
chain
|
|
20
|
-
currency: (_d = (_c = uiConfig.funding) === null || _c === void 0 ? void 0 : _c.targetCurrency) !== null && _d !== void 0 ? _d :
|
|
30
|
+
chain,
|
|
31
|
+
currency: (_d = (_c = uiConfig.funding) === null || _c === void 0 ? void 0 : _c.targetCurrency) !== null && _d !== void 0 ? _d : defaultCurrency,
|
|
21
32
|
};
|
|
22
33
|
}
|
|
23
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFundingTarget.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFundingTarget.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -21,6 +21,7 @@ import { DepositStatus } from '../Deposit/DepositStatus.js';
|
|
|
21
21
|
import { walletListBtn } from '../Deposit/formStyles.js';
|
|
22
22
|
import { isSolana, DEST_USDC } from '../Deposit/sources.js';
|
|
23
23
|
import { StepDivider, ButtonLogo } from '../Deposit/styles.js';
|
|
24
|
+
import { TestnetNotice } from '../Deposit/TestnetNotice.js';
|
|
24
25
|
import { useFundingTarget } from '../Deposit/useFundingTarget.js';
|
|
25
26
|
import { sanitizeForParsing, sanitizeAmountInput } from '../Send/utils.js';
|
|
26
27
|
|
|
@@ -213,7 +214,7 @@ const DepositCex = () => {
|
|
|
213
214
|
// success / refunded / expired screen (shared with the crypto rail).
|
|
214
215
|
if (isDepositFlowActive(status))
|
|
215
216
|
return jsx(DepositProgress, { status: status });
|
|
216
|
-
return (jsxs(PageContent, { onBack: routes.DEPOSIT, children: [jsx(ModalHeading, { children: "Transfer from Exchange" }), jsxs(Section, { children: [jsx(SectionLabel, { children: "Amount" }), jsxs(AmountCard, { children: [jsx(CurrencySymbol, { children: "$" }), jsx(AmountInput, { value: amount, onChange: handleAmountChange, onBlur: handleAmountBlur, placeholder: "0.00", inputMode: "decimal", autoComplete: "off" })] }), jsx(PresetList, { children: PRESETS.map((preset) => (jsxs(PresetButton, { type: "button", "$active": pressedPreset === preset, onClick: () => handlePreset(preset), children: ["$", preset] }, preset))) }), amountTooLow ? (jsxs("span", { style: errorHelper, children: ["Enter at least $", MIN_AMOUNT, ".00 \u2014 the Coinbase minimum."] })) : (jsxs("span", { style: helperText, children: ["Minimum $", MIN_AMOUNT, ".00"] })), chainSupported && (jsxs("span", { style: destinationRow, children: [destAssetLogo && jsx("img", { src: destAssetLogo, alt: "", style: destinationLogo, onError: hideBrokenLogo }), destChainLogo && jsx("img", { src: destChainLogo, alt: "", style: destinationLogo, onError: hideBrokenLogo })] }))] }), !isAvailable && jsx(ModalBody, { children: "Funding isn't available right now." }), !testnet && isAvailable && !chainSupported && (jsxs(ModalBody, { children: ["Coinbase can't deliver to ", destChainName, " yet."] })), !testnet && error && jsx(ModalBody, { style: { color: '#dc2626' }, children: error.message }), jsx(StepDivider, { children: "Then open an exchange" }), jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: 8, marginTop: 12 }, children: EXCHANGES.map((ex) => ex.comingSoon ? (jsxs("button", { type: "button", disabled: true, style: {
|
|
217
|
+
return (jsxs(PageContent, { onBack: routes.DEPOSIT, children: [jsx(ModalHeading, { children: "Transfer from Exchange" }), jsx(TestnetNotice, {}), jsxs(Section, { children: [jsx(SectionLabel, { children: "Amount" }), jsxs(AmountCard, { children: [jsx(CurrencySymbol, { children: "$" }), jsx(AmountInput, { value: amount, onChange: handleAmountChange, onBlur: handleAmountBlur, placeholder: "0.00", inputMode: "decimal", autoComplete: "off" })] }), jsx(PresetList, { children: PRESETS.map((preset) => (jsxs(PresetButton, { type: "button", "$active": pressedPreset === preset, onClick: () => handlePreset(preset), children: ["$", preset] }, preset))) }), amountTooLow ? (jsxs("span", { style: errorHelper, children: ["Enter at least $", MIN_AMOUNT, ".00 \u2014 the Coinbase minimum."] })) : (jsxs("span", { style: helperText, children: ["Minimum $", MIN_AMOUNT, ".00"] })), chainSupported && (jsxs("span", { style: destinationRow, children: [destAssetLogo && jsx("img", { src: destAssetLogo, alt: "", style: destinationLogo, onError: hideBrokenLogo }), destChainLogo && jsx("img", { src: destChainLogo, alt: "", style: destinationLogo, onError: hideBrokenLogo })] }))] }), !isAvailable && jsx(ModalBody, { children: "Funding isn't available right now." }), !testnet && isAvailable && !chainSupported && (jsxs(ModalBody, { children: ["Coinbase can't deliver to ", destChainName, " yet."] })), !testnet && error && jsx(ModalBody, { style: { color: '#dc2626' }, children: error.message }), jsx(StepDivider, { children: "Then open an exchange" }), jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: 8, marginTop: 12 }, children: EXCHANGES.map((ex) => ex.comingSoon ? (jsxs("button", { type: "button", disabled: true, style: {
|
|
217
218
|
...walletListBtn,
|
|
218
219
|
display: 'flex',
|
|
219
220
|
alignItems: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|