@openfort/react 1.5.1 → 1.6.1

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.
Files changed (90) hide show
  1. package/build/components/Common/Chain/styles.d.ts +10 -0
  2. package/build/components/Common/Chain/styles.js +103 -1
  3. package/build/components/Common/Chain/styles.js.map +1 -1
  4. package/build/components/Common/Modal/index.js +16 -0
  5. package/build/components/Common/Modal/index.js.map +1 -1
  6. package/build/components/Common/SolanaChain/index.d.ts +5 -4
  7. package/build/components/Common/SolanaChain/index.js +9 -17
  8. package/build/components/Common/SolanaChain/index.js.map +1 -1
  9. package/build/components/ConnectModal/index.js +2 -0
  10. package/build/components/ConnectModal/index.js.map +1 -1
  11. package/build/components/Openfort/OpenfortProvider.js +4 -0
  12. package/build/components/Openfort/OpenfortProvider.js.map +1 -1
  13. package/build/components/Openfort/context.d.ts +4 -1
  14. package/build/components/Openfort/types.d.ts +22 -0
  15. package/build/components/Openfort/types.js +1 -0
  16. package/build/components/Openfort/types.js.map +1 -1
  17. package/build/components/Pages/AssetInventory/SolanaAssetInventory.js +7 -7
  18. package/build/components/Pages/Buy/styles.js +10 -10
  19. package/build/components/Pages/Connected/EthereumConnected.js +7 -1
  20. package/build/components/Pages/Connected/EthereumConnected.js.map +1 -1
  21. package/build/components/Pages/Deposit/TestnetNotice.js +15 -3
  22. package/build/components/Pages/Deposit/TestnetNotice.js.map +1 -1
  23. package/build/components/Pages/Deposit/index.js +1 -2
  24. package/build/components/Pages/Deposit/index.js.map +1 -1
  25. package/build/components/Pages/Deposit/sources.d.ts +3 -0
  26. package/build/components/Pages/Deposit/sources.js +4 -1
  27. package/build/components/Pages/Deposit/sources.js.map +1 -1
  28. package/build/components/Pages/Deposit/useFundingTarget.d.ts +6 -4
  29. package/build/components/Pages/Deposit/useFundingTarget.js +18 -7
  30. package/build/components/Pages/Deposit/useFundingTarget.js.map +1 -1
  31. package/build/components/Pages/DepositCex/index.js +2 -1
  32. package/build/components/Pages/DepositCex/index.js.map +1 -1
  33. package/build/components/Pages/DepositWallet/index.js +15 -10
  34. package/build/components/Pages/DepositWallet/index.js.map +1 -1
  35. package/build/components/Pages/ExportKey/index.js +44 -4
  36. package/build/components/Pages/ExportKey/index.js.map +1 -1
  37. package/build/components/Pages/ExportKey/styles.d.ts +5 -0
  38. package/build/components/Pages/ExportKey/styles.js +47 -0
  39. package/build/components/Pages/ExportKey/styles.js.map +1 -0
  40. package/build/components/Pages/Receive/index.js +2 -2
  41. package/build/components/Pages/SelectToken/SolanaSelectToken.js +7 -7
  42. package/build/components/Pages/SelectToken/index.js +7 -3
  43. package/build/components/Pages/SelectToken/index.js.map +1 -1
  44. package/build/components/Pages/Send/EthereumSend.js +32 -6
  45. package/build/components/Pages/Send/EthereumSend.js.map +1 -1
  46. package/build/components/Pages/Send/SolanaSend.js +29 -5
  47. package/build/components/Pages/Send/SolanaSend.js.map +1 -1
  48. package/build/components/Pages/Send/styles.d.ts +17 -12
  49. package/build/components/Pages/Send/styles.js +104 -60
  50. package/build/components/Pages/Send/styles.js.map +1 -1
  51. package/build/components/Pages/SendConfirmation/ConfirmationSummary.d.ts +29 -0
  52. package/build/components/Pages/SendConfirmation/ConfirmationSummary.js +15 -0
  53. package/build/components/Pages/SendConfirmation/ConfirmationSummary.js.map +1 -0
  54. package/build/components/Pages/SendConfirmation/EstimatedFees.d.ts +3 -1
  55. package/build/components/Pages/SendConfirmation/EstimatedFees.js +22 -15
  56. package/build/components/Pages/SendConfirmation/EstimatedFees.js.map +1 -1
  57. package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js +18 -6
  58. package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js.map +1 -1
  59. package/build/components/Pages/SendConfirmation/index.js +23 -33
  60. package/build/components/Pages/SendConfirmation/index.js.map +1 -1
  61. package/build/components/Pages/SendConfirmation/styles.d.ts +9 -1
  62. package/build/components/Pages/SendConfirmation/styles.js +65 -19
  63. package/build/components/Pages/SendConfirmation/styles.js.map +1 -1
  64. package/build/components/Pages/SignMessage/index.d.ts +2 -0
  65. package/build/components/Pages/SignMessage/index.js +106 -0
  66. package/build/components/Pages/SignMessage/index.js.map +1 -0
  67. package/build/components/Pages/SignMessage/styles.d.ts +13 -0
  68. package/build/components/Pages/SignMessage/styles.js +99 -0
  69. package/build/components/Pages/SignMessage/styles.js.map +1 -0
  70. package/build/hooks/openfort/useSignMessage.d.ts +27 -0
  71. package/build/hooks/openfort/useSignMessage.js +52 -0
  72. package/build/hooks/openfort/useSignMessage.js.map +1 -0
  73. package/build/hooks/openfort/useUI.d.ts +6 -1
  74. package/build/hooks/openfort/useUI.js +15 -3
  75. package/build/hooks/openfort/useUI.js.map +1 -1
  76. package/build/index.d.ts +2 -1
  77. package/build/index.js +1 -0
  78. package/build/index.js.map +1 -1
  79. package/build/localizations/locales/en-US.js +1 -1
  80. package/build/solana/transfer.d.ts +12 -0
  81. package/build/solana/transfer.js +29 -1
  82. package/build/solana/transfer.js.map +1 -1
  83. package/build/utils/rpc.d.ts +6 -0
  84. package/build/utils/rpc.js +12 -1
  85. package/build/utils/rpc.js.map +1 -1
  86. package/build/version.d.ts +1 -1
  87. package/build/version.js +1 -1
  88. package/build/wagmi/components/ChainSelect/index.js +1 -93
  89. package/build/wagmi/components/ChainSelect/index.js.map +1 -1
  90. 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
- export { ChainContainer, LoadingContainer, LogoContainer, Unsupported };
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,6 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { AnimatePresence, motion } from 'framer-motion';
3
3
  import { useEffect, useState, useCallback, useRef } from 'react';
4
4
  import { useTransition } from 'react-transition-state';
5
+ import ResizeObserver from 'resize-observer-polyfill';
5
6
  import { useConnectionStrategy } from '../../../core/ConnectionStrategyContext.js';
6
7
  import { useEthereumBridge } from '../../../ethereum/OpenfortEthereumBridgeContext.js';
7
8
  import FocusTrap from '../../../hooks/useFocusTrap.js';
@@ -107,6 +108,7 @@ onInfo, }) => {
107
108
  };
108
109
  let blockTimeout;
109
110
  const contentRef = useCallback((node) => {
111
+ var _a;
110
112
  if (!node)
111
113
  return;
112
114
  ref.current = node;
@@ -116,6 +118,16 @@ onInfo, }) => {
116
118
  blockTimeout = setTimeout(() => setInTransition(false), 360);
117
119
  // Calculate new content bounds
118
120
  updateBounds(node);
121
+ // Auto-fit: re-measure whenever the active page's content size changes, so
122
+ // every page — and any new one — sizes the modal correctly without having
123
+ // to call triggerResize() itself.
124
+ (_a = resizeObserverRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
125
+ const observer = new ResizeObserver(() => {
126
+ if (ref.current === node)
127
+ updateBounds(node);
128
+ });
129
+ observer.observe(node);
130
+ resizeObserverRef.current = observer;
119
131
  }, [open, inTransition]);
120
132
  // Update layout on chain/network switch to avoid clipping
121
133
  const strategy = useConnectionStrategy();
@@ -123,10 +135,12 @@ onInfo, }) => {
123
135
  const chainId = (_j = (_f = strategy === null || strategy === void 0 ? void 0 : strategy.getChainId()) !== null && _f !== void 0 ? _f : (_h = (_g = bridge === null || bridge === void 0 ? void 0 : bridge.account) === null || _g === void 0 ? void 0 : _g.chain) === null || _h === void 0 ? void 0 : _h.id) !== null && _j !== void 0 ? _j : bridge === null || bridge === void 0 ? void 0 : bridge.chainId;
124
136
  const switchChain = (_k = bridge === null || bridge === void 0 ? void 0 : bridge.switchChain) === null || _k === void 0 ? void 0 : _k.switchChain;
125
137
  const ref = useRef(null);
138
+ const resizeObserverRef = useRef(null);
126
139
  useEffect(() => {
127
140
  if (ref.current)
128
141
  updateBounds(ref.current);
129
142
  }, [chainId, switchChain, mobile, context.uiConfig, context.resize]);
143
+ useEffect(() => () => { var _a; return (_a = resizeObserverRef.current) === null || _a === void 0 ? void 0 : _a.disconnect(); }, []);
130
144
  useEffect(() => {
131
145
  if (!mounted) {
132
146
  setDimensions({
@@ -186,6 +200,8 @@ onInfo, }) => {
186
200
  case routes.SWITCHNETWORKS:
187
201
  case routes.ETH_SWITCH_NETWORK:
188
202
  return locales.switchNetworkScreen_heading;
203
+ case routes.SIGN_MESSAGE:
204
+ return 'Sign message';
189
205
  default:
190
206
  return '';
191
207
  }
@@ -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 the Solana logo,
3
- * with the active cluster shown on hover. There is no switch: the cluster is
4
- * fixed by `walletConfig.solana`, and switching between Solana and EVM is
5
- * intentionally unsupported.
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 styled from '../../../styles/styled/index.js';
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
- const Badge = styled.div `
16
- display: flex;
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 the Solana logo,
28
- * with the active cluster shown on hover. There is no switch: the cluster is
29
- * fixed by `walletConfig.solana`, and switching between Solana and EVM is
30
- * intentionally unsupported.
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(Tooltip, { message: label, children: jsx(Badge, { "aria-label": label, children: jsx(Logos.Solana, { style: { width: '62%', height: 'auto' } }) }) }));
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: 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;
@@ -3,6 +3,7 @@ const routes = {
3
3
  SOCIAL_PROVIDERS: 'socialProviders',
4
4
  PROFILE: 'profile',
5
5
  EXPORT_KEY: 'exportKey',
6
+ SIGN_MESSAGE: 'signMessage',
6
7
  LOADING: 'loading',
7
8
  LOAD_WALLETS: 'loadWallets',
8
9
  RECOVER_WALLET: 'recoverWallets',
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,19 +1,19 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useEffect, useState } from 'react';
2
+ import { useEffect } from 'react';
3
3
  import { formatUnits } from 'viem';
4
- import { TOKEN_LOGO, symbolToColor } from '../../../constants/logos.js';
4
+ import { currencyLogoUrl } from '../../../constants/logos.js';
5
5
  import { useSolanaWalletAssets } from '../../../solana/hooks/useSolanaWalletAssets.js';
6
6
  import { ModalHeading } from '../../Common/Modal/styles.js';
7
7
  import { routes } from '../../Openfort/types.js';
8
8
  import { useOpenfort } from '../../Openfort/useOpenfort.js';
9
- import { SelectTokenContent, EmptyState, ContentWrapper, TokenList, TokenContainer, TokenLeftGroup, TokenInfo, TokenSymbol, TokenName, TokenLogoArea, TokenLogoImg, TokenLogoFallback } from '../SelectToken/styles.js';
9
+ import { AssetChainLogo } from '../Deposit/AssetChainLogo.js';
10
+ import { SelectTokenContent, EmptyState, ContentWrapper, TokenList, TokenContainer, TokenLeftGroup, TokenInfo, TokenSymbol, TokenName, TokenLogoArea } from '../SelectToken/styles.js';
10
11
 
11
12
  const ZERO = BigInt(0);
13
+ /** Token logo with the Solana chain badge, matching the EVM inventory. */
12
14
  function SolanaTokenLogo({ symbol }) {
13
- var _a;
14
- const [imgError, setImgError] = useState(false);
15
- const url = (_a = TOKEN_LOGO[symbol.toUpperCase()]) !== null && _a !== void 0 ? _a : null;
16
- return (jsx(TokenLogoArea, { children: url && !imgError ? (jsx(TokenLogoImg, { src: url, alt: symbol, onError: () => setImgError(true) })) : (jsx(TokenLogoFallback, { "$bg": symbolToColor(symbol), children: symbol.charAt(0).toUpperCase() })) }));
15
+ var _a, _b;
16
+ return (jsx(TokenLogoArea, { children: jsx(AssetChainLogo, { assetLogo: (_a = currencyLogoUrl(symbol)) !== null && _a !== void 0 ? _a : '', chainLogo: (_b = currencyLogoUrl('SOL')) !== null && _b !== void 0 ? _b : '', symbol: symbol }) }));
17
17
  }
18
18
  /**
19
19
  * SVM counterpart of {@link AssetInventory}: lists the connected Solana wallet's
@@ -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: 20px;
8
- gap: 12px;
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: baseline;
20
- gap: 12px;
21
- padding: 18px 20px;
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: 28px;
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: 44px;
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: 10px 14px;
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: 14px;
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 16px;
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
- }, [context.triggerResize]);
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 { getPublishableKeyEnvironment } from '../../../utils/validation.js';
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 { publishableKey, triggerResize } = useOpenfort();
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
- if (getPublishableKeyEnvironment(publishableKey) !== 'test')
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" }), jsx(TestnetNotice, {}), targetUnsupported ? (jsx(UnsupportedNetworkNotice, { targetChain: target.chain, railChains: railChains })) : (jsx(DepositContent, { children: jsx(OptionList, { children: options.map((option) => {
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}`; both
4
- * default to USDC on the active chain type (Base for EVM, Solana mainnet for SVM)
5
- * so the flow works with zero configuration. The deposit recipient is always the
6
- * active embedded wallet for the destination chain family callers resolve it.
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;