@openfort/react 1.2.0 → 1.4.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.
Files changed (146) hide show
  1. package/build/assets/logos.d.ts +3 -0
  2. package/build/assets/logos.js +2 -0
  3. package/build/assets/logos.js.map +1 -1
  4. package/build/components/Common/Modal/styles.js +3 -0
  5. package/build/components/Common/Modal/styles.js.map +1 -1
  6. package/build/components/Common/ScrollArea/index.d.ts +5 -1
  7. package/build/components/Common/ScrollArea/index.js +2 -2
  8. package/build/components/Common/ScrollArea/styles.d.ts +4 -1
  9. package/build/components/Common/ScrollArea/styles.js +19 -4
  10. package/build/components/Common/ScrollArea/styles.js.map +1 -1
  11. package/build/components/Common/SolanaChain/index.d.ts +8 -0
  12. package/build/components/Common/SolanaChain/index.js +40 -0
  13. package/build/components/Common/SolanaChain/index.js.map +1 -0
  14. package/build/components/ConnectModal/index.js +17 -5
  15. package/build/components/ConnectModal/index.js.map +1 -1
  16. package/build/components/Openfort/types.d.ts +17 -11
  17. package/build/components/Openfort/types.js +1 -0
  18. package/build/components/Openfort/types.js.map +1 -1
  19. package/build/components/PageContent/index.d.ts +2 -1
  20. package/build/components/PageContent/index.js +2 -2
  21. package/build/components/Pages/Buy/coinbaseApi.d.ts +1 -1
  22. package/build/components/Pages/Buy/coinbaseApi.js +2 -13
  23. package/build/components/Pages/Buy/coinbaseApi.js.map +1 -1
  24. package/build/components/Pages/Buy/evmCurrencies.d.ts +11 -0
  25. package/build/components/Pages/Buy/evmCurrencies.js +27 -0
  26. package/build/components/Pages/Buy/evmCurrencies.js.map +1 -0
  27. package/build/components/Pages/Buy/index.js +8 -1
  28. package/build/components/Pages/Buy/index.js.map +1 -1
  29. package/build/components/Pages/Buy/onrampApi.d.ts +8 -1
  30. package/build/components/Pages/Buy/onrampApi.js +24 -14
  31. package/build/components/Pages/Buy/onrampApi.js.map +1 -1
  32. package/build/components/Pages/Buy/solanaCurrencies.d.ts +9 -0
  33. package/build/components/Pages/Buy/solanaCurrencies.js +25 -0
  34. package/build/components/Pages/Buy/solanaCurrencies.js.map +1 -0
  35. package/build/components/Pages/Buy/stripeApi.d.ts +1 -1
  36. package/build/components/Pages/Buy/stripeApi.js +2 -13
  37. package/build/components/Pages/Buy/stripeApi.js.map +1 -1
  38. package/build/components/Pages/BuyComplete/index.js +7 -1
  39. package/build/components/Pages/BuyComplete/index.js.map +1 -1
  40. package/build/components/Pages/BuyProcessing/index.js +9 -5
  41. package/build/components/Pages/BuyProcessing/index.js.map +1 -1
  42. package/build/components/Pages/BuyProviderSelect/styles.d.ts +2 -1
  43. package/build/components/Pages/BuySelectProvider/index.js +10 -5
  44. package/build/components/Pages/BuySelectProvider/index.js.map +1 -1
  45. package/build/components/Pages/Connected/EthereumConnected.js +7 -3
  46. package/build/components/Pages/Connected/EthereumConnected.js.map +1 -1
  47. package/build/components/Pages/Connected/SolanaConnected.js +3 -2
  48. package/build/components/Pages/Connected/SolanaConnected.js.map +1 -1
  49. package/build/components/Pages/Deposit/AssetChainLogo.d.ts +5 -2
  50. package/build/components/Pages/Deposit/AssetChainLogo.js +21 -4
  51. package/build/components/Pages/Deposit/AssetChainLogo.js.map +1 -1
  52. package/build/components/Pages/Deposit/DepositAddressBlock.js +1 -1
  53. package/build/components/Pages/Deposit/DepositProgress.js +3 -2
  54. package/build/components/Pages/Deposit/DepositProgress.js.map +1 -1
  55. package/build/components/Pages/Deposit/DepositSuccess.js +2 -1
  56. package/build/components/Pages/Deposit/DepositSuccess.js.map +1 -1
  57. package/build/components/Pages/Deposit/RouteSelectors.js +11 -1
  58. package/build/components/Pages/Deposit/RouteSelectors.js.map +1 -1
  59. package/build/components/Pages/Deposit/SameChainDepositStatus.d.ts +7 -0
  60. package/build/components/Pages/Deposit/SameChainDepositStatus.js +34 -0
  61. package/build/components/Pages/Deposit/SameChainDepositStatus.js.map +1 -0
  62. package/build/components/Pages/Deposit/SameChainDepositSuccess.d.ts +11 -0
  63. package/build/components/Pages/Deposit/SameChainDepositSuccess.js +30 -0
  64. package/build/components/Pages/Deposit/SameChainDepositSuccess.js.map +1 -0
  65. package/build/components/Pages/Deposit/TestnetNotice.d.ts +10 -0
  66. package/build/components/Pages/Deposit/TestnetNotice.js +131 -0
  67. package/build/components/Pages/Deposit/TestnetNotice.js.map +1 -0
  68. package/build/components/Pages/Deposit/UnsupportedNetworkNotice.d.ts +12 -0
  69. package/build/components/Pages/Deposit/UnsupportedNetworkNotice.js +111 -0
  70. package/build/components/Pages/Deposit/UnsupportedNetworkNotice.js.map +1 -0
  71. package/build/components/Pages/Deposit/index.js +35 -5
  72. package/build/components/Pages/Deposit/index.js.map +1 -1
  73. package/build/components/Pages/Deposit/paymentOptions.d.ts +6 -0
  74. package/build/components/Pages/Deposit/paymentOptions.js +10 -4
  75. package/build/components/Pages/Deposit/paymentOptions.js.map +1 -1
  76. package/build/components/Pages/Deposit/useDepositRoute.d.ts +2 -1
  77. package/build/components/Pages/Deposit/useDepositRoute.js +36 -13
  78. package/build/components/Pages/Deposit/useDepositRoute.js.map +1 -1
  79. package/build/components/Pages/Deposit/useFundingTarget.d.ts +2 -4
  80. package/build/components/Pages/Deposit/useFundingTarget.js +3 -5
  81. package/build/components/Pages/Deposit/useFundingTarget.js.map +1 -1
  82. package/build/components/Pages/Deposit/useSameChainArrival.d.ts +19 -0
  83. package/build/components/Pages/Deposit/useSameChainArrival.js +86 -0
  84. package/build/components/Pages/Deposit/useSameChainArrival.js.map +1 -0
  85. package/build/components/Pages/DepositCex/index.js +7 -8
  86. package/build/components/Pages/DepositCex/index.js.map +1 -1
  87. package/build/components/Pages/DepositCrypto/index.js +26 -3
  88. package/build/components/Pages/DepositCrypto/index.js.map +1 -1
  89. package/build/components/Pages/DepositWallet/DepositWalletDesktop.d.ts +4 -1
  90. package/build/components/Pages/DepositWallet/DepositWalletDesktop.js +19 -27
  91. package/build/components/Pages/DepositWallet/DepositWalletDesktop.js.map +1 -1
  92. package/build/components/Pages/DepositWallet/index.d.ts +5 -5
  93. package/build/components/Pages/DepositWallet/index.js +82 -39
  94. package/build/components/Pages/DepositWallet/index.js.map +1 -1
  95. package/build/components/Pages/DepositWallet/walletDeeplinks.d.ts +6 -4
  96. package/build/components/Pages/DepositWallet/walletDeeplinks.js +3 -1
  97. package/build/components/Pages/DepositWallet/walletDeeplinks.js.map +1 -1
  98. package/build/components/Pages/SelectToken/SolanaSelectToken.d.ts +1 -0
  99. package/build/components/Pages/SelectToken/SolanaSelectToken.js +50 -0
  100. package/build/components/Pages/SelectToken/SolanaSelectToken.js.map +1 -0
  101. package/build/components/Pages/SelectToken/index.js +13 -2
  102. package/build/components/Pages/SelectToken/index.js.map +1 -1
  103. package/build/components/Pages/SelectToken/styles.d.ts +2 -1
  104. package/build/components/Pages/Send/SolanaSend.js +32 -31
  105. package/build/components/Pages/Send/SolanaSend.js.map +1 -1
  106. package/build/components/Pages/Send/utils.js +4 -1
  107. package/build/components/Pages/Send/utils.js.map +1 -1
  108. package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js +57 -13
  109. package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js.map +1 -1
  110. package/build/components/Pages/SendConfirmation/index.js +1 -1
  111. package/build/components/Pages/SendConfirmation/styles.d.ts +0 -5
  112. package/build/components/Pages/SendConfirmation/styles.js +1 -39
  113. package/build/components/Pages/SendConfirmation/styles.js.map +1 -1
  114. package/build/constants/chainConfigs.js +32 -32
  115. package/build/constants/logos.d.ts +4 -0
  116. package/build/constants/logos.js +25 -1
  117. package/build/constants/logos.js.map +1 -1
  118. package/build/ethereum/hooks/useEthereumWalletAssets.js +39 -3
  119. package/build/ethereum/hooks/useEthereumWalletAssets.js.map +1 -1
  120. package/build/hooks/openfort/useFunding.js +7 -7
  121. package/build/hooks/openfort/useFundingChains.d.ts +6 -0
  122. package/build/hooks/openfort/useFundingChains.js +22 -10
  123. package/build/hooks/openfort/useFundingChains.js.map +1 -1
  124. package/build/shared/hooks/useAsyncData.js +15 -2
  125. package/build/shared/hooks/useAsyncData.js.map +1 -1
  126. package/build/shared/utils/explorer.js +6 -4
  127. package/build/shared/utils/explorer.js.map +1 -1
  128. package/build/solana/transfer.d.ts +35 -6
  129. package/build/solana/transfer.js +112 -18
  130. package/build/solana/transfer.js.map +1 -1
  131. package/build/solana/types.d.ts +8 -0
  132. package/build/utils/validation.d.ts +9 -0
  133. package/build/utils/validation.js +14 -1
  134. package/build/utils/validation.js.map +1 -1
  135. package/build/version.d.ts +1 -1
  136. package/build/version.js +1 -1
  137. package/build/wagmi/components/ChainSelect/index.js +3 -2
  138. package/build/wagmi/components/ChainSelect/index.js.map +1 -1
  139. package/build/wagmi/components/ChainSelectList/index.js +3 -2
  140. package/build/wagmi/components/ChainSelectList/index.js.map +1 -1
  141. package/build/wagmi/components/SwitchNetworks/index.js +3 -2
  142. package/build/wagmi/components/SwitchNetworks/index.js.map +1 -1
  143. package/build/wagmi/useSwitchChainFiltered.d.ts +199 -0
  144. package/build/wagmi/useSwitchChainFiltered.js +53 -0
  145. package/build/wagmi/useSwitchChainFiltered.js.map +1 -0
  146. package/package.json +5 -1
@@ -21,7 +21,7 @@ export declare const isStripeSupported: (token: Asset) => boolean;
21
21
  */
22
22
  export declare const createStripeSession: (params: Omit<CreateStripeSessionParams, "destinationCurrency" | "destinationNetwork"> & {
23
23
  token: Asset;
24
- chainId: number;
24
+ network: string;
25
25
  publishableKey: string;
26
26
  }) => Promise<StripeOnrampResponse>;
27
27
  export {};
@@ -5,17 +5,6 @@ const getBackendUrl = () => {
5
5
  const sdkConfig = SDKConfiguration.getInstance();
6
6
  return (sdkConfig === null || sdkConfig === void 0 ? void 0 : sdkConfig.backendUrl) || 'https://api.openfort.io';
7
7
  };
8
- // Map chain IDs to Stripe network names
9
- const getNetworkName = (chainId) => {
10
- const networkMap = {
11
- 1: 'ethereum',
12
- 8453: 'base',
13
- 137: 'polygon',
14
- 42161: 'arbitrum',
15
- 10: 'optimism',
16
- };
17
- return networkMap[chainId] || 'base';
18
- };
19
8
  // Stripe supported currencies
20
9
  const STRIPE_SUPPORTED_CURRENCIES = ['btc', 'eth', 'xlm', 'matic', 'pol', 'sol', 'usdc', 'avax', 'wld'];
21
10
  // Check if a token is supported by Stripe
@@ -38,12 +27,12 @@ const getCurrencyCode = (token) => {
38
27
  * Calls backend API to create a prefilled session with wallet addresses and amounts
39
28
  */
40
29
  const createStripeSession = async (params) => {
41
- const { token, chainId, publishableKey, destinationAddress, sourceAmount, sourceCurrency, redirectUrl } = params;
30
+ const { token, network, publishableKey, destinationAddress, sourceAmount, sourceCurrency, redirectUrl } = params;
42
31
  if (!publishableKey) {
43
32
  throw new Error('Publishable key is required for authentication');
44
33
  }
45
34
  const destinationCurrency = getCurrencyCode(token);
46
- const destinationNetwork = getNetworkName(chainId);
35
+ const destinationNetwork = network;
47
36
  // Build request body for backend API
48
37
  const requestBody = {
49
38
  provider: 'stripe',
@@ -1 +1 @@
1
- {"version":3,"file":"stripeApi.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"stripeApi.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -39,7 +39,13 @@ const BuyComplete = () => {
39
39
  const handleBack = () => {
40
40
  setRoute(routes.CONNECTED);
41
41
  };
42
- const blockExplorerUrl = address && chainId ? getExplorerUrl(ChainTypeEnum.EVM, { chainId, address }) : '';
42
+ const blockExplorerUrl = !address
43
+ ? ''
44
+ : chainType === ChainTypeEnum.SVM
45
+ ? getExplorerUrl(ChainTypeEnum.SVM, { address, cluster: solanaWallet.cluster })
46
+ : chainId
47
+ ? getExplorerUrl(ChainTypeEnum.EVM, { chainId, address })
48
+ : '';
43
49
  return (jsx(PageContent, { onBack: handleBack, children: jsxs(ModalContent, { style: { paddingBottom: 18, textAlign: 'center' }, children: [jsx(ModalH1, { children: "Provider Finished" }), jsx(ModalBody, { style: { marginTop: 24 }, children: "The provider flow has been completed. You can view your wallet on the block explorer to check your transactions." }), jsxs(Section, { style: { marginTop: 24 }, children: [blockExplorerUrl && (jsx(ContinueButtonWrapper, { style: { marginTop: 0 }, children: jsx(Button, { variant: "secondary", onClick: () => window.open(blockExplorerUrl, '_blank', 'noopener,noreferrer'), children: jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '8px' }, children: [jsx("span", { children: "View Wallet Transactions" }), jsx(ExternalLinkIcon, {})] }) }) })), jsx(ContinueButtonWrapper, { style: { marginTop: blockExplorerUrl ? 4 : 0 }, children: jsx(Button, { variant: "primary", onClick: handleDone, children: "Done" }) })] })] }) }));
44
50
  };
45
51
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -13,6 +13,8 @@ import { routes } from '../../Openfort/types.js';
13
13
  import { useOpenfort } from '../../Openfort/useOpenfort.js';
14
14
  import { PageContent } from '../../PageContent/index.js';
15
15
  import { createCoinbaseSession } from '../Buy/coinbaseApi.js';
16
+ import { resolveOnrampNetwork } from '../Buy/onrampApi.js';
17
+ import { SOLANA_BUY_CURRENCIES } from '../Buy/solanaCurrencies.js';
16
18
  import { createStripeSession } from '../Buy/stripeApi.js';
17
19
  import { ContinueButtonWrapper, PendingContainer, StackedButtonWrapper } from '../Buy/styles.js';
18
20
  import { isSameToken } from '../Send/utils.js';
@@ -27,11 +29,13 @@ const BuyProcessing = () => {
27
29
  const isConnected = wallet.status === 'connected';
28
30
  const address = isConnected ? wallet.address : undefined;
29
31
  const chainId = isConnected && chainType === ChainTypeEnum.EVM ? wallet.chainId : undefined;
32
+ const network = resolveOnrampNetwork(chainType, chainId);
30
33
  const [popupWindow, setPopupWindow] = useState(null);
31
34
  const [showContinueButton, setShowContinueButton] = useState(false);
32
35
  const [isCreatingSession, setIsCreatingSession] = useState(true);
33
36
  const [sessionError, setSessionError] = useState(false);
34
- const { data: assets } = useEthereumWalletAssets();
37
+ const { data: ethAssets } = useEthereumWalletAssets();
38
+ const assets = chainType === ChainTypeEnum.SVM ? SOLANA_BUY_CURRENCIES : ethAssets;
35
39
  const matchedToken = useMemo(() => assets === null || assets === void 0 ? void 0 : assets.find((asset) => isSameToken(asset, buyForm.asset)), [assets, buyForm.asset]);
36
40
  const selectedTokenOption = matchedToken !== null && matchedToken !== void 0 ? matchedToken : assets === null || assets === void 0 ? void 0 : assets[0];
37
41
  const selectedToken = selectedTokenOption !== null && selectedTokenOption !== void 0 ? selectedTokenOption : buyForm.asset;
@@ -47,7 +51,7 @@ const BuyProcessing = () => {
47
51
  // Create session and open popup once wallet is ready
48
52
  const sessionStartedRef = useRef(false);
49
53
  useEffect(() => {
50
- if (!address || !chainId)
54
+ if (!address || !network)
51
55
  return;
52
56
  if (sessionStartedRef.current)
53
57
  return;
@@ -65,7 +69,7 @@ const BuyProcessing = () => {
65
69
  if (buyForm.providerId === 'coinbase') {
66
70
  const session = await createCoinbaseSession({
67
71
  token: selectedToken,
68
- chainId,
72
+ network,
69
73
  publishableKey,
70
74
  destinationAddress: address,
71
75
  sourceAmount: fiatAmount.toFixed(2),
@@ -77,7 +81,7 @@ const BuyProcessing = () => {
77
81
  else if (buyForm.providerId === 'stripe') {
78
82
  const session = await createStripeSession({
79
83
  token: selectedToken,
80
- chainId,
84
+ network,
81
85
  publishableKey,
82
86
  destinationAddress: address,
83
87
  sourceAmount: fiatAmount.toFixed(2),
@@ -129,7 +133,7 @@ const BuyProcessing = () => {
129
133
  }
130
134
  };
131
135
  createSessionAndOpenPopup();
132
- }, [address, chainId]); // Run when wallet becomes ready
136
+ }, [address, network]); // Run when wallet becomes ready
133
137
  // Trigger resize on mount and when state changes
134
138
  useEffect(() => {
135
139
  triggerResize();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,10 @@
1
- export declare const ProviderSelectContent: import("styled-components").StyledComponent<({ children, width, onBack, logoutOnBack, header }: {
1
+ export declare const ProviderSelectContent: import("styled-components").StyledComponent<({ children, width, onBack, logoutOnBack, header, className, }: {
2
2
  children?: React.ReactNode;
3
3
  width?: number | string;
4
4
  onBack?: import("../../PageContent").SetOnBackFunction;
5
5
  logoutOnBack?: boolean;
6
6
  header?: string;
7
+ className?: string;
7
8
  }) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
8
9
  export declare const ProviderList: import("styled-components").StyledComponent<"div", any, {}, never>;
9
10
  export declare const ProviderButton: import("styled-components").StyledComponent<"button", any, {
@@ -11,8 +11,9 @@ import { routes } from '../../Openfort/types.js';
11
11
  import { useOpenfort } from '../../Openfort/useOpenfort.js';
12
12
  import { PageContent } from '../../PageContent/index.js';
13
13
  import { isCoinbaseSupported } from '../Buy/coinbaseApi.js';
14
- import { getAllQuotes } from '../Buy/onrampApi.js';
14
+ import { resolveOnrampNetwork, getAllQuotes } from '../Buy/onrampApi.js';
15
15
  import { getProviders } from '../Buy/providers.js';
16
+ import { SOLANA_BUY_CURRENCIES } from '../Buy/solanaCurrencies.js';
16
17
  import { isStripeSupported } from '../Buy/stripeApi.js';
17
18
  import { ProviderList, ProviderButton, ProviderInfo, ProviderNameRow, ProviderName, ProviderBadge, ProviderMeta, ProviderRight, ProviderQuote, ProviderFiat, ContinueButtonWrapper } from '../Buy/styles.js';
18
19
  import { createCurrencyFormatter, formatTokenAmount } from '../Buy/utils.js';
@@ -28,6 +29,9 @@ const BuySelectProvider = () => {
28
29
  const isConnected = wallet.status === 'connected';
29
30
  const address = isConnected ? wallet.address : undefined;
30
31
  const chainId = isConnected && chainType === ChainTypeEnum.EVM ? wallet.chainId : undefined;
32
+ // The onramp destination network: 'solana' for SVM, else the EVM network (undefined
33
+ // until the EVM chainId resolves, which keeps quote fetching gated as before).
34
+ const network = resolveOnrampNetwork(chainType, chainId);
31
35
  const [quotes, setQuotes] = useState({});
32
36
  const [isLoadingQuote, setIsLoadingQuote] = useState(false);
33
37
  const [coinbaseError, setCoinbaseError] = useState(false);
@@ -43,7 +47,8 @@ const BuySelectProvider = () => {
43
47
  return null;
44
48
  return numeric;
45
49
  }, [buyForm.amount]);
46
- const { data: assets } = useEthereumWalletAssets();
50
+ const { data: ethAssets } = useEthereumWalletAssets();
51
+ const assets = chainType === ChainTypeEnum.SVM ? SOLANA_BUY_CURRENCIES : ethAssets;
47
52
  const matchedToken = useMemo(() => assets === null || assets === void 0 ? void 0 : assets.find((asset) => isSameToken(asset, buyForm.asset)), [assets, buyForm.asset]);
48
53
  const selectedTokenOption = matchedToken !== null && matchedToken !== void 0 ? matchedToken : assets === null || assets === void 0 ? void 0 : assets[0];
49
54
  const selectedToken = selectedTokenOption !== null && selectedTokenOption !== void 0 ? selectedTokenOption : buyForm.asset;
@@ -77,7 +82,7 @@ const BuySelectProvider = () => {
77
82
  // Fetch quotes from all providers
78
83
  useEffect(() => {
79
84
  const fetchQuotes = async () => {
80
- if (!address || !chainId || !fiatAmount || fiatAmount <= 0) {
85
+ if (!address || !network || !fiatAmount || fiatAmount <= 0) {
81
86
  setQuotes({});
82
87
  setCoinbaseError(false);
83
88
  setStripeError(false);
@@ -89,7 +94,7 @@ const BuySelectProvider = () => {
89
94
  try {
90
95
  const allQuotes = await getAllQuotes({
91
96
  token: selectedToken,
92
- chainId,
97
+ network,
93
98
  publishableKey,
94
99
  sourceAmount: fiatAmount.toFixed(2),
95
100
  sourceCurrency: buyForm.currency,
@@ -120,7 +125,7 @@ const BuySelectProvider = () => {
120
125
  selectedToken.metadata,
121
126
  selectedToken.type,
122
127
  buyForm.currency,
123
- chainId,
128
+ network,
124
129
  address,
125
130
  publishableKey,
126
131
  refetchTrigger,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -63,10 +63,14 @@ const EthereumConnected = () => {
63
63
  });
64
64
  const ensName = identity.status === 'success' ? identity.name : undefined;
65
65
  const { data: assets, isLoading } = useEthereumWalletAssets();
66
+ // Total is summed from the multi-chain assets so the headline matches the
67
+ // "Your assets" breakdown. The single-chain path omits fiat for native ETH,
68
+ // which would otherwise drop it from the total.
69
+ const { data: multiChainAssets } = useEthereumWalletAssets({ multiChain: true });
66
70
  const totalBalanceUsd = useMemo(() => {
67
- if (!assets)
71
+ if (!multiChainAssets)
68
72
  return 0;
69
- return assets.reduce((acc, asset) => {
73
+ return multiChainAssets.reduce((acc, asset) => {
70
74
  var _a, _b, _c, _d;
71
75
  if (!asset.metadata || !asset.balance)
72
76
  return acc;
@@ -76,7 +80,7 @@ const EthereumConnected = () => {
76
80
  const balance = Number(formatUnits((_d = asset.balance) !== null && _d !== void 0 ? _d : BigInt(0), getAssetDecimals(asset)));
77
81
  return acc + price * balance;
78
82
  }, 0);
79
- }, [assets]);
83
+ }, [multiChainAssets]);
80
84
  useEffect(() => {
81
85
  context.triggerResize();
82
86
  }, [context.triggerResize]);
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumConnected.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"EthereumConnected.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -15,12 +15,13 @@ import Avatar from '../../Common/Avatar/index.js';
15
15
  import Button from '../../Common/Button/index.js';
16
16
  import { TextLinkButton } from '../../Common/Button/styles.js';
17
17
  import { CopyText } from '../../Common/CopyToClipboard/CopyText.js';
18
+ import SolanaChain from '../../Common/SolanaChain/index.js';
18
19
  import { useThemeContext } from '../../ConnectKitThemeProvider/ConnectKitThemeProvider.js';
19
20
  import { routes } from '../../Openfort/types.js';
20
21
  import { useOpenfort } from '../../Openfort/useOpenfort.js';
21
22
  import { PageContent } from '../../PageContent/index.js';
22
23
  import { ConnectedPageLayout } from './ConnectedPageLayout.js';
23
- import { LinkedProvidersToggle, Balance, ActionButton } from './styles.js';
24
+ import { LinkedProvidersToggle, Balance, ChainSelectorContainer, ActionButton } from './styles.js';
24
25
  import { truncateSolanaAddress } from '../../../utils/format.js';
25
26
 
26
27
  const SolanaConnected = () => {
@@ -90,7 +91,7 @@ const SolanaConnected = () => {
90
91
  : undefined;
91
92
  const avatar = address ? CustomAvatar ? jsx(CustomAvatar, { address: address }) : jsx(Avatar, { address: address }) : jsx("span", {});
92
93
  const balanceNode = balanceSol != null && !isBalanceLoading ? (jsx(TextLinkButton, { type: "button", onClick: () => setRoute(routes.SOL_ASSET_INVENTORY), children: jsxs(Balance, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2 }, children: [nFormatter(Number(balanceSol)), " SOL"] }, "solana-balance") })) : null;
93
- return (jsx(PageContent, { onBack: null, header: locales.profileScreen_heading, children: jsx(ConnectedPageLayout, { address: address !== null && address !== void 0 ? address : '', displayName: jsx(CopyText, { value: address !== null && address !== void 0 ? address : '', children: truncateSolanaAddress(address !== null && address !== void 0 ? address : '', separator) }), avatar: avatar, balance: balanceNode, actions: jsxs(Fragment, { children: [jsx(ActionButton, { icon: jsx(SendIcon, {}), onClick: () => {
94
+ return (jsx(PageContent, { onBack: null, header: locales.profileScreen_heading, children: jsx(ConnectedPageLayout, { address: address !== null && address !== void 0 ? address : '', displayName: jsx(CopyText, { value: address !== null && address !== void 0 ? address : '', children: truncateSolanaAddress(address !== null && address !== void 0 ? address : '', separator) }), avatar: avatar, beforeAvatar: jsx(ChainSelectorContainer, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.2 }, children: jsx(SolanaChain, {}) }), balance: balanceNode, actions: jsxs(Fragment, { children: [jsx(ActionButton, { icon: jsx(SendIcon, {}), onClick: () => {
94
95
  // Nothing to send on an empty wallet — prompt to add funds first (mirrors EVM).
95
96
  const hasBalance = lamports != null && BigInt(lamports) > BigInt(0);
96
97
  context.setRoute(hasBalance ? routes.SOL_SEND : routes.NO_ASSETS_AVAILABLE);
@@ -1 +1 @@
1
- {"version":3,"file":"SolanaConnected.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"SolanaConnected.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,12 @@
1
1
  /**
2
2
  * Center logo for the deposit QR: the asset logo with the chain logo as a small
3
3
  * badge bottom-left, so scanners can confirm the right token + network at a glance.
4
- * Kept fully within the logo slot (no overflow) so it never covers QR data modules.
4
+ * Falls back to a colored monogram when the token has no usable logo, so the QR
5
+ * centre is never blank (and never collapses to just the chain badge). Kept fully
6
+ * within the logo slot (no overflow) so it never covers QR data modules.
5
7
  */
6
- export declare function AssetChainLogo({ assetLogo, chainLogo }: {
8
+ export declare function AssetChainLogo({ assetLogo, chainLogo, symbol, }: {
7
9
  assetLogo: string;
8
10
  chainLogo: string;
11
+ symbol?: string;
9
12
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useState } from 'react';
3
+ import { symbolToColor } from '../../../constants/logos.js';
2
4
 
3
5
  const hide = (e) => {
4
6
  e.currentTarget.style.display = 'none';
@@ -6,10 +8,25 @@ const hide = (e) => {
6
8
  /**
7
9
  * Center logo for the deposit QR: the asset logo with the chain logo as a small
8
10
  * badge bottom-left, so scanners can confirm the right token + network at a glance.
9
- * Kept fully within the logo slot (no overflow) so it never covers QR data modules.
11
+ * Falls back to a colored monogram when the token has no usable logo, so the QR
12
+ * centre is never blank (and never collapses to just the chain badge). Kept fully
13
+ * within the logo slot (no overflow) so it never covers QR data modules.
10
14
  */
11
- function AssetChainLogo({ assetLogo, chainLogo }) {
12
- return (jsxs("div", { style: { position: 'relative', width: '100%' }, children: [jsx("img", { src: assetLogo, alt: "", onError: hide, style: { display: 'block', width: '100%', borderRadius: '50%' } }), jsx("img", { src: chainLogo, alt: "", onError: hide, style: {
15
+ function AssetChainLogo({ assetLogo, chainLogo, symbol, }) {
16
+ const [assetFailed, setAssetFailed] = useState(false);
17
+ const showMonogram = !assetLogo || assetFailed;
18
+ return (jsxs("div", { style: { position: 'relative', width: '100%' }, children: [showMonogram ? (jsx("div", { style: {
19
+ display: 'flex',
20
+ alignItems: 'center',
21
+ justifyContent: 'center',
22
+ width: '100%',
23
+ aspectRatio: '1 / 1',
24
+ borderRadius: '50%',
25
+ background: symbolToColor(symbol || '?'),
26
+ color: '#fff',
27
+ fontWeight: 600,
28
+ fontSize: 28,
29
+ }, children: (symbol || '?').charAt(0).toUpperCase() })) : (jsx("img", { src: assetLogo, alt: "", onError: () => setAssetFailed(true), style: { display: 'block', width: '100%', borderRadius: '50%' } })), chainLogo && (jsx("img", { src: chainLogo, alt: "", onError: hide, style: {
13
30
  position: 'absolute',
14
31
  bottom: 0,
15
32
  left: 0,
@@ -17,7 +34,7 @@ function AssetChainLogo({ assetLogo, chainLogo }) {
17
34
  borderRadius: '50%',
18
35
  border: '2px solid #fff',
19
36
  background: '#fff',
20
- } })] }));
37
+ } }))] }));
21
38
  }
22
39
 
23
40
  export { AssetChainLogo };
@@ -1 +1 @@
1
- {"version":3,"file":"AssetChainLogo.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"AssetChainLogo.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -21,7 +21,7 @@ function DepositAddressBlock({ assetLogo, chainLogo, receiverAddress, pm, source
21
21
  , {
22
22
  // Encode the EIP-681 / Solana Pay URI (address + amount + network) so a
23
23
  // scanner prefills the send; fall back to the bare address same-chain.
24
- value: (_a = pm === null || pm === void 0 ? void 0 : pm.addressUri) !== null && _a !== void 0 ? _a : receiverAddress, image: jsx(AssetChainLogo, { assetLogo: assetLogo !== null && assetLogo !== void 0 ? assetLogo : '', chainLogo: chainLogo !== null && chainLogo !== void 0 ? chainLogo : '' }), imageClip: false }) }), jsx("div", { style: depositAddressLabel, children: "Your deposit address" }), jsxs("div", { style: addressBox, children: [jsx("code", { style: codeStyle, children: receiverAddress }), jsx(CopyIconButton, { value: receiverAddress, size: 28 })] }), status && jsx(DepositStatus, { status: status }), !sameChain && pm && jsx(DepositDetails, { pm: pm, sourceCurrency: sourceCurrency })] }));
24
+ value: (_a = pm === null || pm === void 0 ? void 0 : pm.addressUri) !== null && _a !== void 0 ? _a : receiverAddress, image: jsx(AssetChainLogo, { assetLogo: assetLogo !== null && assetLogo !== void 0 ? assetLogo : '', chainLogo: chainLogo !== null && chainLogo !== void 0 ? chainLogo : '', symbol: sourceCurrency === null || sourceCurrency === void 0 ? void 0 : sourceCurrency.symbol }), imageClip: false }) }), jsx("div", { style: depositAddressLabel, children: "Your deposit address" }), jsxs("div", { style: addressBox, children: [jsx("code", { style: codeStyle, children: receiverAddress }), jsx(CopyIconButton, { value: receiverAddress, size: 28 })] }), status && jsx(DepositStatus, { status: status }), !sameChain && pm && jsx(DepositDetails, { pm: pm, sourceCurrency: sourceCurrency })] }));
25
25
  }
26
26
 
27
27
  export { DepositAddressBlock };
@@ -4,6 +4,7 @@ import styled from '../../../styles/styled/index.js';
4
4
  import { logger } from '../../../utils/logger.js';
5
5
  import Button from '../../Common/Button/index.js';
6
6
  import { ModalHeading, ModalBody } from '../../Common/Modal/styles.js';
7
+ import PoweredByFooter from '../../Common/PoweredByFooter/index.js';
7
8
  import { Spinner } from '../../Common/Spinner/index.js';
8
9
  import { routes } from '../../Openfort/types.js';
9
10
  import { useOpenfort } from '../../Openfort/useOpenfort.js';
@@ -96,14 +97,14 @@ function DepositProgress({ status }) {
96
97
  return jsx(DepositSuccess, {});
97
98
  if (status === 'bounced' || status === 'expired') {
98
99
  const ui = OUTCOME[status];
99
- return (jsxs(PageContent, { children: [jsx(ModalHeading, { children: ui === null || ui === void 0 ? void 0 : ui.heading }), jsx(ModalBody, { children: ui === null || ui === void 0 ? void 0 : ui.body }), jsx(Button, { variant: "primary", onClick: () => setRoute(status === 'expired' ? routes.DEPOSIT : routes.CONNECTED), children: status === 'expired' ? 'Start over' : 'See balance' })] }));
100
+ return (jsxs(PageContent, { children: [jsx(ModalHeading, { children: ui === null || ui === void 0 ? void 0 : ui.heading }), jsx(ModalBody, { children: ui === null || ui === void 0 ? void 0 : ui.body }), jsx(Button, { variant: "primary", onClick: () => setRoute(status === 'expired' ? routes.DEPOSIT : routes.CONNECTED), children: status === 'expired' ? 'Start over' : 'See balance' }), jsx(PoweredByFooter, {})] }));
100
101
  }
101
102
  // processing → bridging active (step 1); succeeded (pre-confirmed) → delivering active (step 2).
102
103
  const activeStep = status === 'succeeded' ? 2 : 1;
103
104
  return (jsxs(PageContent, { children: [jsx(ModalHeading, { children: "Completing your deposit" }), jsx(ModalBody, { children: "Keep this open \u2014 your funds are on the way." }), jsx(StepList, { children: STEPS.map((step, i) => {
104
105
  const state = stepStateFor(i, activeStep);
105
106
  return (jsxs(StepRow, { "$state": state, children: [state === 'active' ? jsx(Spinner, {}) : jsx(StepMark, { "$state": state, children: state === 'done' ? '✓' : '' }), jsx("span", { children: step.label })] }, step.key));
106
- }) })] }));
107
+ }) }), jsx(PoweredByFooter, {})] }));
107
108
  }
108
109
 
109
110
  export { DepositProgress, isDepositFlowActive };
@@ -1 +1 @@
1
- {"version":3,"file":"DepositProgress.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DepositProgress.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,6 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useEffect } from 'react';
3
3
  import Button from '../../Common/Button/index.js';
4
4
  import Loader from '../../Common/Loading/index.js';
5
+ import PoweredByFooter from '../../Common/PoweredByFooter/index.js';
5
6
  import { routes } from '../../Openfort/types.js';
6
7
  import { useOpenfort } from '../../Openfort/useOpenfort.js';
7
8
  import { PageContent } from '../../PageContent/index.js';
@@ -17,7 +18,7 @@ function DepositSuccess() {
17
18
  useEffect(() => {
18
19
  triggerResize();
19
20
  }, [triggerResize]);
20
- return (jsxs(PageContent, { children: [jsx(Loader, { isSuccess: true, header: "Deposit received", description: "Funds delivered to your wallet" }), jsx(Button, { variant: "primary", onClick: () => setRoute(routes.ASSET_INVENTORY), children: "See balance" })] }));
21
+ return (jsxs(PageContent, { children: [jsx(Loader, { isSuccess: true, header: "Deposit received", description: "Funds delivered to your wallet" }), jsx(Button, { variant: "primary", onClick: () => setRoute(routes.ASSET_INVENTORY), children: "See balance" }), jsx(PoweredByFooter, {})] }));
21
22
  }
22
23
 
23
24
  export { DepositSuccess };
@@ -1 +1 @@
1
- {"version":3,"file":"DepositSuccess.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DepositSuccess.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { chainLogoUrl, currencyLogoUrl } from '../../../constants/logos.js';
3
+ import { caipToChainId } from '../DepositWallet/walletDeeplinks.js';
2
4
  import { twoCol, field } from './formStyles.js';
3
5
  import { LogoSelect } from './LogoSelect.js';
4
6
  import { Skeleton } from './styles.js';
@@ -12,7 +14,15 @@ function RouteSelectors({ chains, chain, currency, chainLabel, onChainChange, on
12
14
  }
13
15
  const activeChain = (_a = chains.find((c) => c.id === chain)) !== null && _a !== void 0 ? _a : chains[0];
14
16
  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 })) })] })] }));
17
+ 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) => ({
18
+ value: c.id,
19
+ label: c.name,
20
+ logo: chainLogoUrl(caipToChainId(c.id), c.logo),
21
+ })) })] }), jsxs("div", { style: field, children: ["Currency", jsx(LogoSelect, { value: currency, onChange: onCurrencyChange, options: currencies.map((c) => ({
22
+ value: c.symbol,
23
+ label: c.symbol,
24
+ logo: currencyLogoUrl(c.symbol, c.logo),
25
+ })) })] })] }));
16
26
  }
17
27
 
18
28
  export { RouteSelectors };
@@ -1 +1 @@
1
- {"version":3,"file":"RouteSelectors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RouteSelectors.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * "Waiting for your deposit…" banner shown under the deposit address for a
3
+ * same-chain "transfer from address". Arrival detection lives in
4
+ * {@link import('./useSameChainArrival').useSameChainArrival}; on arrival the
5
+ * page swaps to {@link import('./SameChainDepositSuccess').SameChainDepositSuccess}.
6
+ */
7
+ export declare function SameChainDepositStatus(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useEffect } from 'react';
3
+ import styled from '../../../styles/styled/index.js';
4
+ import { Spinner } from '../../Common/Spinner/index.js';
5
+ import { useOpenfort } from '../../Openfort/useOpenfort.js';
6
+
7
+ const Banner = styled.div `
8
+ display: flex;
9
+ align-items: center;
10
+ gap: 8px;
11
+ margin-top: 14px;
12
+ padding: 10px 12px;
13
+ border-radius: 10px;
14
+ border: 1px solid var(--ck-body-divider, #e4e4e7);
15
+ background: var(--ck-body-background-secondary, #fafafa);
16
+ font-size: 14px;
17
+ color: var(--ck-body-color-muted, #6b7280);
18
+ `;
19
+ /**
20
+ * "Waiting for your deposit…" banner shown under the deposit address for a
21
+ * same-chain "transfer from address". Arrival detection lives in
22
+ * {@link import('./useSameChainArrival').useSameChainArrival}; on arrival the
23
+ * page swaps to {@link import('./SameChainDepositSuccess').SameChainDepositSuccess}.
24
+ */
25
+ function SameChainDepositStatus() {
26
+ const { triggerResize } = useOpenfort();
27
+ useEffect(() => {
28
+ triggerResize();
29
+ }, [triggerResize]);
30
+ return (jsxs(Banner, { children: [jsx(Spinner, {}), jsx("span", { children: "Waiting for your deposit\u2026" })] }));
31
+ }
32
+
33
+ export { SameChainDepositStatus };
34
+ //# sourceMappingURL=SameChainDepositStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SameChainDepositStatus.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Terminal success screen for a same-chain "transfer from address" deposit.
3
+ * The deposit lands in the wallet itself (no rail session), so arrival is
4
+ * detected by a native balance increase and we don't hold the inbound tx hash —
5
+ * "View on Explorer" therefore opens the wallet's address page, where the
6
+ * incoming transfer is listed.
7
+ */
8
+ export declare function SameChainDepositSuccess({ address, chainId }: {
9
+ address: string;
10
+ chainId: number;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { ChainTypeEnum } from '@openfort/openfort-js';
3
+ import { useEffect } from 'react';
4
+ import { getExplorerUrl } from '../../../shared/utils/explorer.js';
5
+ import Button from '../../Common/Button/index.js';
6
+ import Loader from '../../Common/Loading/index.js';
7
+ import PoweredByFooter from '../../Common/PoweredByFooter/index.js';
8
+ import { routes } from '../../Openfort/types.js';
9
+ import { useOpenfort } from '../../Openfort/useOpenfort.js';
10
+ import { PageContent } from '../../PageContent/index.js';
11
+
12
+ /**
13
+ * Terminal success screen for a same-chain "transfer from address" deposit.
14
+ * The deposit lands in the wallet itself (no rail session), so arrival is
15
+ * detected by a native balance increase and we don't hold the inbound tx hash —
16
+ * "View on Explorer" therefore opens the wallet's address page, where the
17
+ * incoming transfer is listed.
18
+ */
19
+ function SameChainDepositSuccess({ address, chainId }) {
20
+ const { setRoute, triggerResize } = useOpenfort();
21
+ // Collapse the modal from the tall deposit form down to the compact card.
22
+ useEffect(() => {
23
+ triggerResize();
24
+ }, [triggerResize]);
25
+ const explorerUrl = getExplorerUrl(ChainTypeEnum.EVM, { chainId, address });
26
+ return (jsxs(PageContent, { children: [jsx(Loader, { isSuccess: true, header: "Deposit received", description: "Funds are in your wallet" }), explorerUrl && (jsx(Button, { variant: "primary", onClick: () => window.open(explorerUrl, '_blank', 'noopener,noreferrer'), children: "View on Explorer" })), jsx(Button, { variant: "secondary", onClick: () => setRoute(routes.CONNECTED), children: "Back to profile" }), jsx(PoweredByFooter, {})] }));
27
+ }
28
+
29
+ export { SameChainDepositSuccess };
30
+ //# sourceMappingURL=SameChainDepositSuccess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SameChainDepositSuccess.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A dev-facing notice shown only for test keys (`pk_test_…`) in the Deposit flow.
3
+ *
4
+ * Collapsed by default to a single summary line; expands to explain that funding
5
+ * routes through Relay, whose testnet rail bridges the same asset but cannot swap
6
+ * to a different token (testnets lack DEX liquidity, so e.g. `ETH → USDC` fails),
7
+ * and that card/exchange rails are mainnet-only. Links to Relay's testnet guide.
8
+ * Renders nothing on live keys.
9
+ */
10
+ export declare function TestnetNotice(): import("react/jsx-runtime").JSX.Element | null;