@openfort/react 1.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/icons.js +1 -1
- package/build/assets/logos.d.ts +12 -0
- package/build/assets/logos.js +7 -0
- package/build/assets/logos.js.map +1 -1
- package/build/components/Common/CopyToClipboard/CopyIconButton.d.ts +3 -1
- package/build/components/Common/CopyToClipboard/CopyIconButton.js +4 -4
- package/build/components/Common/CustomQRCode/index.d.ts +1 -1
- package/build/components/Common/CustomQRCode/index.js +3 -3
- package/build/components/Common/CustomQRCode/styles.d.ts +1 -0
- package/build/components/Common/CustomQRCode/styles.js +4 -4
- package/build/components/Common/CustomQRCode/types.d.ts +2 -0
- package/build/components/Common/Modal/styles.js +4 -1
- package/build/components/Common/Modal/styles.js.map +1 -1
- package/build/components/ConnectModal/index.js +14 -2
- package/build/components/ConnectModal/index.js.map +1 -1
- package/build/components/Openfort/OpenfortProvider.js +4 -1
- package/build/components/Openfort/OpenfortProvider.js.map +1 -1
- package/build/components/Openfort/types.d.ts +86 -0
- package/build/components/Openfort/types.js +22 -1
- package/build/components/Openfort/types.js.map +1 -1
- package/build/components/Pages/AssetInventory/SolanaAssetInventory.d.ts +6 -0
- package/build/components/Pages/AssetInventory/SolanaAssetInventory.js +42 -0
- package/build/components/Pages/AssetInventory/SolanaAssetInventory.js.map +1 -0
- package/build/components/Pages/Buy/index.js +3 -2
- package/build/components/Pages/Buy/index.js.map +1 -1
- package/build/components/Pages/BuySelectProvider/index.js +1 -1
- package/build/components/Pages/Connected/EthereumConnected.js +8 -32
- package/build/components/Pages/Connected/EthereumConnected.js.map +1 -1
- package/build/components/Pages/Connected/SolanaConnected.js +9 -4
- package/build/components/Pages/Connected/SolanaConnected.js.map +1 -1
- package/build/components/Pages/Deposit/AddressPageLink.d.ts +7 -0
- package/build/components/Pages/Deposit/AddressPageLink.js +17 -0
- package/build/components/Pages/Deposit/AddressPageLink.js.map +1 -0
- package/build/components/Pages/Deposit/AssetChainLogo.d.ts +9 -0
- package/build/components/Pages/Deposit/AssetChainLogo.js +24 -0
- package/build/components/Pages/Deposit/AssetChainLogo.js.map +1 -0
- package/build/components/Pages/Deposit/DepositAddressBlock.d.ts +21 -0
- package/build/components/Pages/Deposit/DepositAddressBlock.js +28 -0
- package/build/components/Pages/Deposit/DepositAddressBlock.js.map +1 -0
- package/build/components/Pages/Deposit/DepositProgress.d.ts +15 -0
- package/build/components/Pages/Deposit/DepositProgress.js +110 -0
- package/build/components/Pages/Deposit/DepositProgress.js.map +1 -0
- package/build/components/Pages/Deposit/DepositStatus.d.ts +9 -0
- package/build/components/Pages/Deposit/DepositStatus.js +43 -0
- package/build/components/Pages/Deposit/DepositStatus.js.map +1 -0
- package/build/components/Pages/Deposit/DepositSuccess.d.ts +6 -0
- package/build/components/Pages/Deposit/DepositSuccess.js +24 -0
- package/build/components/Pages/Deposit/DepositSuccess.js.map +1 -0
- package/build/components/Pages/Deposit/Details.d.ts +12 -0
- package/build/components/Pages/Deposit/Details.js +40 -0
- package/build/components/Pages/Deposit/Details.js.map +1 -0
- package/build/components/Pages/Deposit/LogoSelect.d.ts +12 -0
- package/build/components/Pages/Deposit/LogoSelect.js +95 -0
- package/build/components/Pages/Deposit/LogoSelect.js.map +1 -0
- package/build/components/Pages/Deposit/OrDivider.d.ts +2 -0
- package/build/components/Pages/Deposit/OrDivider.js +10 -0
- package/build/components/Pages/Deposit/OrDivider.js.map +1 -0
- package/build/components/Pages/Deposit/RouteSelectors.d.ts +13 -0
- package/build/components/Pages/Deposit/RouteSelectors.js +19 -0
- package/build/components/Pages/Deposit/RouteSelectors.js.map +1 -0
- package/build/components/Pages/Deposit/cexChains.d.ts +9 -0
- package/build/components/Pages/Deposit/cexChains.js +23 -0
- package/build/components/Pages/Deposit/cexChains.js.map +1 -0
- package/build/components/Pages/Deposit/formStyles.d.ts +24 -0
- package/build/components/Pages/Deposit/formStyles.js +83 -0
- package/build/components/Pages/Deposit/formStyles.js.map +1 -0
- package/build/components/Pages/Deposit/index.d.ts +7 -0
- package/build/components/Pages/Deposit/index.js +100 -0
- package/build/components/Pages/Deposit/index.js.map +1 -0
- package/build/components/Pages/Deposit/paymentOptions.d.ts +49 -0
- package/build/components/Pages/Deposit/paymentOptions.js +63 -0
- package/build/components/Pages/Deposit/paymentOptions.js.map +1 -0
- package/build/components/Pages/Deposit/sources.d.ts +17 -0
- package/build/components/Pages/Deposit/sources.js +22 -0
- package/build/components/Pages/Deposit/sources.js.map +1 -0
- package/build/components/Pages/Deposit/styles.d.ts +25 -0
- package/build/components/Pages/Deposit/styles.js +167 -0
- package/build/components/Pages/Deposit/styles.js.map +1 -0
- package/build/components/Pages/Deposit/useDepositRoute.d.ts +35 -0
- package/build/components/Pages/Deposit/useDepositRoute.js +107 -0
- package/build/components/Pages/Deposit/useDepositRoute.js.map +1 -0
- package/build/components/Pages/Deposit/useFundingTarget.d.ts +13 -0
- package/build/components/Pages/Deposit/useFundingTarget.js +27 -0
- package/build/components/Pages/Deposit/useFundingTarget.js.map +1 -0
- package/build/components/Pages/DepositCex/index.d.ts +11 -0
- package/build/components/Pages/DepositCex/index.js +230 -0
- package/build/components/Pages/DepositCex/index.js.map +1 -0
- package/build/components/Pages/DepositCrypto/index.d.ts +8 -0
- package/build/components/Pages/DepositCrypto/index.js +31 -0
- package/build/components/Pages/DepositCrypto/index.js.map +1 -0
- package/build/components/Pages/DepositWallet/DepositWalletDesktop.d.ts +17 -0
- package/build/components/Pages/DepositWallet/DepositWalletDesktop.js +148 -0
- package/build/components/Pages/DepositWallet/DepositWalletDesktop.js.map +1 -0
- package/build/components/Pages/DepositWallet/index.d.ts +9 -0
- package/build/components/Pages/DepositWallet/index.js +102 -0
- package/build/components/Pages/DepositWallet/index.js.map +1 -0
- package/build/components/Pages/DepositWallet/walletDeeplinks.d.ts +48 -0
- package/build/components/Pages/DepositWallet/walletDeeplinks.js +107 -0
- package/build/components/Pages/DepositWallet/walletDeeplinks.js.map +1 -0
- package/build/components/Pages/ExportKey/index.js +10 -2
- package/build/components/Pages/ExportKey/index.js.map +1 -1
- package/build/components/Pages/NoAssetsAvailable/index.js +5 -21
- package/build/components/Pages/NoAssetsAvailable/index.js.map +1 -1
- package/build/components/Pages/SelectToken/styles.js +1 -1
- package/build/components/Pages/Send/SolanaSend.d.ts +1 -0
- package/build/components/Pages/Send/SolanaSend.js +88 -0
- package/build/components/Pages/Send/SolanaSend.js.map +1 -0
- package/build/components/Pages/Send/index.d.ts +2 -1
- package/build/components/Pages/Send/index.js +0 -1
- package/build/components/Pages/Send/index.js.map +1 -1
- package/build/components/Pages/SendConfirmation/EstimatedFees.js +5 -3
- package/build/components/Pages/SendConfirmation/EstimatedFees.js.map +1 -1
- package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.d.ts +1 -0
- package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js +77 -0
- package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js.map +1 -0
- package/build/components/Pages/SendConfirmation/index.js +4 -3
- package/build/components/Pages/SendConfirmation/index.js.map +1 -1
- package/build/components/Pages/SendConfirmation/styles.d.ts +5 -0
- package/build/components/Pages/SendConfirmation/styles.js +39 -1
- package/build/components/Pages/SendConfirmation/styles.js.map +1 -1
- package/build/constants/logos.js +1 -0
- package/build/constants/logos.js.map +1 -1
- package/build/ethereum/hooks/useEthereumWalletAssets.js +212 -95
- package/build/ethereum/hooks/useEthereumWalletAssets.js.map +1 -1
- package/build/hooks/openfort/fundingClient.d.ts +34 -0
- package/build/hooks/openfort/fundingClient.js +60 -0
- package/build/hooks/openfort/fundingClient.js.map +1 -0
- package/build/hooks/openfort/useFunding.d.ts +159 -0
- package/build/hooks/openfort/useFunding.js +204 -0
- package/build/hooks/openfort/useFunding.js.map +1 -0
- package/build/hooks/openfort/useFundingChains.d.ts +49 -0
- package/build/hooks/openfort/useFundingChains.js +102 -0
- package/build/hooks/openfort/useFundingChains.js.map +1 -0
- package/build/hooks/useBalance.js +6 -1
- package/build/hooks/useBalance.js.map +1 -1
- package/build/index.d.ts +4 -1
- package/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/build/shared/hooks/useAsyncData.d.ts +11 -0
- package/build/shared/hooks/useAsyncData.js +60 -13
- package/build/shared/hooks/useAsyncData.js.map +1 -1
- package/build/solana/hooks/useSolanaWalletAssets.d.ts +24 -0
- package/build/solana/hooks/useSolanaWalletAssets.js +86 -0
- package/build/solana/hooks/useSolanaWalletAssets.js.map +1 -0
- package/build/solana/transfer.d.ts +32 -0
- package/build/solana/transfer.js +125 -0
- package/build/solana/transfer.js.map +1 -0
- package/build/utils/index.d.ts +2 -1
- package/build/utils/index.js +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/build/wagmi/defaultConnectors.js +5 -1
- package/build/wagmi/defaultConnectors.js.map +1 -1
- package/package.json +10 -2
package/build/assets/icons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
3
|
const SendIcon = ({ ...props }) => (jsxs("svg", { "aria-hidden": "true", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [jsx("path", { d: "M5 19L19 5", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M9 5H19V15", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
4
4
|
const ReceiveIcon = ({ ...props }) => (jsxs("svg", { "aria-hidden": "true", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [jsx("path", { d: "M19 5L5 19", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M15 19H5V9", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
package/build/assets/logos.d.ts
CHANGED
|
@@ -125,5 +125,17 @@ declare const _default: {
|
|
|
125
125
|
CoinbasePay: ({ ...props }: {
|
|
126
126
|
[x: string]: any;
|
|
127
127
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
128
|
+
Apple: ({ ...props }: {
|
|
129
|
+
[x: string]: any;
|
|
130
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
131
|
+
Binance: ({ ...props }: {
|
|
132
|
+
[x: string]: any;
|
|
133
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
134
|
+
Visa: ({ ...props }: {
|
|
135
|
+
[x: string]: any;
|
|
136
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
Mastercard: ({ ...props }: {
|
|
138
|
+
[x: string]: any;
|
|
139
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
128
140
|
};
|
|
129
141
|
export default _default;
|
package/build/assets/logos.js
CHANGED
|
@@ -103,6 +103,9 @@ const Openfort = ({ ...props }) => (jsx("svg", { viewBox: "0 0 22 24", width: "2
|
|
|
103
103
|
const Stripe = ({ ...props }) => (jsxs("svg", { ...props, width: "360", height: "151", viewBox: "0 0 360 151", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M360 78.2001C360 52.6001 347.6 32.4001 323.9 32.4001C300.1 32.4001 285.7 52.6001 285.7 78.0001C285.7 108.1 302.7 123.3 327.1 123.3C339 123.3 348 120.6 354.8 116.8V96.8001C348 100.2 340.2 102.3 330.3 102.3C320.6 102.3 312 98.9002 310.9 87.1002H359.8C359.8 85.8002 360 80.6002 360 78.2001ZM310.6 68.7001C310.6 57.4002 317.5 52.7001 323.8 52.7001C329.9 52.7001 336.4 57.4002 336.4 68.7001H310.6Z", fill: "currentColor" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M247.1 32.4001C237.3 32.4001 231 37.0001 227.5 40.2001L226.2 34.0001H204.2V150.6L229.2 145.3L229.3 117C232.9 119.6 238.2 123.3 247 123.3C264.9 123.3 281.2 108.9 281.2 77.2001C281.1 48.2001 264.6 32.4001 247.1 32.4001ZM241.1 101.3C235.2 101.3 231.7 99.2001 229.3 96.6002L229.2 59.5001C231.8 56.6001 235.4 54.6002 241.1 54.6002C250.2 54.6002 256.5 64.8001 256.5 77.9001C256.5 91.3001 250.3 101.3 241.1 101.3Z", fill: "currentColor" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M169.8 26.5L194.9 21.1V0.800049L169.8 6.10005V26.5Z", fill: "currentColor" }), jsx("path", { d: "M194.9 34.1001H169.8V121.6H194.9V34.1001Z", fill: "currentColor" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M142.9 41.5001L141.3 34.1001H119.7V121.6H144.7V62.3001C150.6 54.6001 160.6 56.0001 163.7 57.1001V34.1001C160.5 32.9001 148.8 30.7001 142.9 41.5001Z", fill: "currentColor" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M92.8999 12.4001L68.4999 17.6001L68.3999 97.7001C68.3999 112.5 79.4999 123.4 94.2999 123.4C102.5 123.4 108.5 121.9 111.8 120.1V99.8001C108.6 101.1 92.7999 105.7 92.7999 90.9001V55.4001H111.8V34.1002H92.7999L92.8999 12.4001Z", fill: "currentColor" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M25.3 59.5001C25.3 55.6001 28.5 54.1002 33.8 54.1002C41.4 54.1002 51 56.4001 58.6 60.5001V37.0001C50.3 33.7001 42.1 32.4001 33.8 32.4001C13.5 32.4001 0 43.0001 0 60.7001C0 88.3001 38 83.9001 38 95.8001C38 100.4 34 101.9 28.4 101.9C20.1 101.9 9.5 98.5002 1.1 93.9002V117.7C10.4 121.7 19.8 123.4 28.4 123.4C49.2 123.4 63.5 113.1 63.5 95.2001C63.4 65.4001 25.3 70.7001 25.3 59.5001Z", fill: "currentColor" })] }));
|
|
104
104
|
const CoinbasePay = ({ ...props }) => (jsx("svg", { ...props, version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", x: "0px", y: "0px", viewBox: "0 0 1101.64 196.79", style: { enableBackground: 'new 0 0 1101.64 196.79' }, xmlSpace: "preserve", children: jsx("path", { fill: "currentColor", d: "M222.34,54.94c-40.02,0-71.29,30.38-71.29,71.05s30.48,70.79,71.29,70.79c40.81,0,71.82-30.64,71.82-71.05\n C294.16,85.58,263.68,54.94,222.34,54.94z M222.61,167.47c-22.79,0-39.49-17.7-39.49-41.47c0-24.04,16.43-41.73,39.22-41.73\n c23.06,0,39.75,17.96,39.75,41.73S245.4,167.47,222.61,167.47z M302.9,85.85h19.88v108.3h31.8V57.58H302.9V85.85z M71.02,84.26\n c16.7,0,29.95,10.3,34.98,25.62h33.66c-6.1-32.75-33.13-54.94-68.37-54.94C31.27,54.94,0,85.32,0,126s30.48,70.79,71.29,70.79\n c34.45,0,62.01-22.19,68.11-55.21H106c-4.77,15.32-18.02,25.89-34.72,25.89c-23.06,0-39.22-17.7-39.22-41.47\n C32.07,101.96,47.97,84.26,71.02,84.26z M907.12,112.79l-23.32-3.43c-11.13-1.58-19.08-5.28-19.08-14\n c0-9.51,10.34-14.26,24.38-14.26c15.37,0,25.18,6.6,27.3,17.43h30.74c-3.45-27.47-24.65-43.58-57.24-43.58\n c-33.66,0-55.92,17.17-55.92,41.47c0,23.24,14.58,36.72,43.99,40.94l23.32,3.43c11.4,1.58,17.76,6.08,17.76,14.53\n c0,10.83-11.13,15.32-26.5,15.32c-18.82,0-29.42-7.66-31.01-19.28h-31.27c2.92,26.68,23.85,45.43,62.01,45.43\n c34.72,0,57.77-15.85,57.77-43.06C950.05,129.43,933.36,116.75,907.12,112.79z M338.68,1.32c-11.66,0-20.41,8.45-20.41,20.07\n s8.74,20.07,20.41,20.07c11.66,0,20.41-8.45,20.41-20.07S350.34,1.32,338.68,1.32z M805.36,104.34c0-29.58-18.02-49.39-56.18-49.39\n c-36.04,0-56.18,18.23-60.16,46.23h31.54c1.59-10.83,10.07-19.81,28.09-19.81c16.17,0,24.12,7.13,24.12,15.85\n c0,11.36-14.58,14.26-32.6,16.11c-24.38,2.64-54.59,11.09-54.59,42.79c0,24.57,18.29,40.41,47.44,40.41\n c22.79,0,37.1-9.51,44.26-24.57c1.06,13.47,11.13,22.19,25.18,22.19h18.55v-28.26h-15.64V104.34z M774.09,138.68\n c0,18.23-15.9,31.7-35.25,31.7c-11.93,0-22-5.02-22-15.58c0-13.47,16.17-17.17,31.01-18.75c14.31-1.32,22.26-4.49,26.24-10.57\n V138.68z M605.28,54.94c-17.76,0-32.6,7.4-43.2,19.81V0h-31.8v194.15h31.27v-17.96c10.6,12.94,25.71,20.6,43.73,20.6\n c38.16,0,67.05-30.11,67.05-70.79S642.91,54.94,605.28,54.94z M600.51,167.47c-22.79,0-39.49-17.7-39.49-41.47\n s16.96-41.73,39.75-41.73c23.06,0,39.22,17.7,39.22,41.73C639.99,149.77,623.3,167.47,600.51,167.47z M454.22,54.94\n c-20.67,0-34.19,8.45-42.14,20.34v-17.7h-31.54v136.56h31.8v-74.22c0-20.87,13.25-35.66,32.86-35.66c18.29,0,29.68,12.94,29.68,31.7\n v78.19h31.8v-80.56C506.69,79.24,488.94,54.94,454.22,54.94z M1101.64,121.51c0-39.09-28.62-66.56-67.05-66.56\n c-40.81,0-70.76,30.64-70.76,71.05c0,42.53,32.07,70.79,71.29,70.79c33.13,0,59.1-19.55,65.72-47.28h-33.13\n c-4.77,12.15-16.43,19.02-32.07,19.02c-20.41,0-35.78-12.68-39.22-34.87h105.21V121.51z M998.28,110.94\n c5.04-19.02,19.35-28.26,35.78-28.26c18.02,0,31.8,10.3,34.98,28.26H998.28z" }) }));
|
|
105
105
|
const Apple = ({ ...props }) => (jsx("svg", { fill: "currentColor", width: "800px", height: "800px", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M18.71 19.5C17.88 20.74 17 21.95 15.66 21.97C14.32 22 13.89 21.18 12.37 21.18C10.84 21.18 10.37 21.95 9.09997 22C7.78997 22.05 6.79997 20.68 5.95997 19.47C4.24997 17 2.93997 12.45 4.69997 9.39C5.56997 7.87 7.12997 6.91 8.81997 6.88C10.1 6.86 11.32 7.75 12.11 7.75C12.89 7.75 14.37 6.68 15.92 6.84C16.57 6.87 18.39 7.1 19.56 8.82C19.47 8.88 17.39 10.1 17.41 12.63C17.44 15.65 20.06 16.66 20.09 16.67C20.06 16.74 19.67 18.11 18.71 19.5ZM13 3.5C13.73 2.67 14.94 2.04 15.94 2C16.07 3.17 15.6 4.35 14.9 5.19C14.21 6.04 13.07 6.7 11.95 6.61C11.8 5.46 12.36 4.26 13 3.5Z" }) }));
|
|
106
|
+
const Binance = ({ ...props }) => (jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...props, children: [jsx("circle", { cx: "12", cy: "12", r: "12", fill: "#F3BA2F" }), jsx("path", { fill: "#fff", d: "M12 6.6l1.86 1.86L12 10.32 10.14 8.46 12 6.6zM8.46 10.14 10.32 12l-1.86 1.86L6.6 12l1.86-1.86zm7.08 0L17.4 12l-1.86 1.86L13.68 12l1.86-1.86zM12 13.68l1.86 1.86L12 17.4l-1.86-1.86L12 13.68zM12 10.32 13.68 12 12 13.68 10.32 12 12 10.32z" })] }));
|
|
107
|
+
const Visa = ({ ...props }) => (jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...props, children: [jsx("rect", { width: "24", height: "24", rx: "4", fill: "#1A1F71" }), jsx("text", { x: "12", y: "15.5", textAnchor: "middle", fontFamily: "Arial, Helvetica, sans-serif", fontStyle: "italic", fontWeight: "700", fontSize: "7", fill: "#fff", children: "VISA" })] }));
|
|
108
|
+
const Mastercard = ({ ...props }) => (jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...props, children: [jsx("rect", { width: "24", height: "24", rx: "4", fill: "#fff" }), jsx("circle", { cx: "9.5", cy: "12", r: "5.5", fill: "#EB001B" }), jsx("circle", { cx: "14.5", cy: "12", r: "5.5", fill: "#F79E1B", fillOpacity: "0.9" })] }));
|
|
106
109
|
const OtherSocials = ({ ...props }) => {
|
|
107
110
|
const column = {
|
|
108
111
|
position: 'relative',
|
|
@@ -167,6 +170,10 @@ var Logos = {
|
|
|
167
170
|
Openfort,
|
|
168
171
|
Stripe,
|
|
169
172
|
CoinbasePay,
|
|
173
|
+
Apple,
|
|
174
|
+
Binance,
|
|
175
|
+
Visa,
|
|
176
|
+
Mastercard,
|
|
170
177
|
};
|
|
171
178
|
|
|
172
179
|
export { OtherSocials, Logos as default, providersLogos };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logos.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logos.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
interface CopyIconButtonProps {
|
|
2
2
|
value: string;
|
|
3
|
+
/** Button edge length in px (default 48). The icon scales to half. */
|
|
4
|
+
size?: number;
|
|
3
5
|
}
|
|
4
|
-
export declare const CopyIconButton: ({ value }: CopyIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const CopyIconButton: ({ value, size }: CopyIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
export {};
|
|
@@ -4,8 +4,8 @@ import styled from '../../../styles/styled/index.js';
|
|
|
4
4
|
import { CopyIcon } from './CopyIcon.js';
|
|
5
5
|
|
|
6
6
|
const StyledButton = styled.button `
|
|
7
|
-
width:
|
|
8
|
-
height:
|
|
7
|
+
width: ${(p) => p.$size}px;
|
|
8
|
+
height: ${(p) => p.$size}px;
|
|
9
9
|
padding: 0;
|
|
10
10
|
border: none;
|
|
11
11
|
border-radius: var(--ck-secondary-button-border-radius);
|
|
@@ -29,9 +29,9 @@ const StyledButton = styled.button `
|
|
|
29
29
|
cursor: not-allowed;
|
|
30
30
|
}
|
|
31
31
|
`;
|
|
32
|
-
const CopyIconButton = ({ value }) => {
|
|
32
|
+
const CopyIconButton = ({ value, size = 48 }) => {
|
|
33
33
|
const { copied, copy } = useCopyToClipboard();
|
|
34
|
-
return (jsx(StyledButton, { onClick: () => copy(value), disabled: !value, type: "button", children: jsx(CopyIcon, { copied: copied, size:
|
|
34
|
+
return (jsx(StyledButton, { "$size": size, onClick: () => copy(value), disabled: !value, type: "button", children: jsx(CopyIcon, { copied: copied, size: Math.round(size / 2) }) }));
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export { CopyIconButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CustomQRCodeProps } from './types';
|
|
2
|
-
declare function CustomQRCode({ value, image, imageBackground, imagePosition, tooltipMessage }: CustomQRCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function CustomQRCode({ value, image, imageBackground, imageClip, imagePosition, tooltipMessage, }: CustomQRCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace CustomQRCode {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -5,14 +5,14 @@ import Tooltip from '../Tooltip/index.js';
|
|
|
5
5
|
import { QRCode } from './QRCode.js';
|
|
6
6
|
import { QRCodeContainer, QRCodeContent, LogoContainer, LogoIcon, QRPlaceholder } from './styles.js';
|
|
7
7
|
|
|
8
|
-
function CustomQRCode({ value, image, imageBackground, imagePosition = 'center', tooltipMessage }) {
|
|
8
|
+
function CustomQRCode({ value, image, imageBackground, imageClip = true, imagePosition = 'center', tooltipMessage, }) {
|
|
9
9
|
const windowSize = useWindowSize();
|
|
10
10
|
const Logo = windowSize.width > 920 && tooltipMessage ? (jsx(Tooltip, { xOffset: 139, yOffset: 5, delay: 0.1, message: tooltipMessage, children: image })) : (image);
|
|
11
|
-
return (jsx(QRCodeContainer, { children: jsxs(QRCodeContent, { children: [image && (jsx(LogoContainer, { children: jsx(LogoIcon, { "$wcLogo": imagePosition !== 'center', style: {
|
|
11
|
+
return (jsx(QRCodeContainer, { children: jsxs(QRCodeContent, { children: [image && (jsx(LogoContainer, { children: jsx(LogoIcon, { "$wcLogo": imagePosition !== 'center', "$clip": imageClip, style: {
|
|
12
12
|
background: imagePosition === 'center' ? imageBackground : undefined,
|
|
13
13
|
}, children: Logo }) })), jsx(AnimatePresence, { initial: false, children: value ? (jsx(motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0, position: 'absolute', inset: [0, 0] }, transition: {
|
|
14
14
|
duration: 0.2,
|
|
15
|
-
}, children: jsx(QRCode, { uri: value, size: 288, ecl: "
|
|
15
|
+
}, children: jsx(QRCode, { uri: value, size: 288, ecl: "H", clearArea: !!(imagePosition === 'center' && image) }) }, value)) : (jsxs(QRPlaceholder, { initial: { opacity: 0.1 }, animate: { opacity: 0.1 }, exit: { opacity: 0, position: 'absolute', inset: [0, 0] }, transition: {
|
|
16
16
|
duration: 0.2,
|
|
17
17
|
}, children: [jsx("span", {}), jsx("span", {}), jsx("span", {}), jsx("div", {})] })) })] }) }));
|
|
18
18
|
}
|
|
@@ -4,4 +4,5 @@ export declare const QRPlaceholder: import("styled-components").StyledComponent<
|
|
|
4
4
|
export declare const LogoContainer: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
|
|
5
5
|
export declare const LogoIcon: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {
|
|
6
6
|
$wcLogo?: boolean;
|
|
7
|
+
$clip?: boolean;
|
|
7
8
|
}, never>;
|
|
@@ -12,7 +12,7 @@ const QRCodeContainer = styled(motion.div) `
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: center;
|
|
14
14
|
margin: 1px 0 2px;
|
|
15
|
-
border-radius: var(--ck-qr-border-radius,
|
|
15
|
+
border-radius: var(--ck-qr-border-radius, 48px);
|
|
16
16
|
background: var(--ck-qr-background, transparent);
|
|
17
17
|
box-shadow: 0 0 0 1px var(--ck-qr-border-color);
|
|
18
18
|
backface-visibility: hidden;
|
|
@@ -25,7 +25,7 @@ const QRCodeContainer = styled(motion.div) `
|
|
|
25
25
|
`;
|
|
26
26
|
const QRCodeContent = styled(motion.div) `
|
|
27
27
|
position: absolute;
|
|
28
|
-
inset:
|
|
28
|
+
inset: 16px;
|
|
29
29
|
svg {
|
|
30
30
|
width: 100% !important;
|
|
31
31
|
height: auto !important;
|
|
@@ -119,7 +119,7 @@ const LogoIcon = styled(motion.div) `
|
|
|
119
119
|
z-index: 6;
|
|
120
120
|
position: absolute;
|
|
121
121
|
left: 50%;
|
|
122
|
-
overflow: hidden;
|
|
122
|
+
overflow: ${(props) => (props.$clip === false ? 'visible' : 'hidden')};
|
|
123
123
|
|
|
124
124
|
transform: translate(-50%, -50%) scale(0.9999); // Shifting fix
|
|
125
125
|
|
|
@@ -138,7 +138,7 @@ const LogoIcon = styled(motion.div) `
|
|
|
138
138
|
: css `
|
|
139
139
|
width: 28%;
|
|
140
140
|
height: 28%;
|
|
141
|
-
border-radius: 17px;
|
|
141
|
+
border-radius: ${props.$clip === false ? '50%' : '17px'};
|
|
142
142
|
&:before {
|
|
143
143
|
pointer-events: none;
|
|
144
144
|
z-index: 2;
|
|
@@ -3,6 +3,8 @@ export type CustomQRCodeProps = {
|
|
|
3
3
|
value?: string;
|
|
4
4
|
image?: React.ReactNode;
|
|
5
5
|
imageBackground?: string;
|
|
6
|
+
/** When false, the center logo isn't clipped to the rounded square (lets a badge overflow). Default true. */
|
|
7
|
+
imageClip?: boolean;
|
|
6
8
|
imagePosition?: 'center' | 'bottom right';
|
|
7
9
|
tooltipMessage?: React.ReactNode | string;
|
|
8
10
|
};
|
|
@@ -279,8 +279,11 @@ const ControllerContainer = styled(motion.div) `
|
|
|
279
279
|
`;
|
|
280
280
|
const InnerContainer = styled(motion.div) `
|
|
281
281
|
position: relative;
|
|
282
|
-
overflow: hidden;
|
|
282
|
+
overflow-x: hidden;
|
|
283
|
+
overflow-y: auto;
|
|
283
284
|
height: var(--height);
|
|
285
|
+
/* Cap at the viewport so a tall page scrolls instead of running off-screen. */
|
|
286
|
+
max-height: 88vh;
|
|
284
287
|
transition: 0.2s ease height;
|
|
285
288
|
@media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
|
|
286
289
|
transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,6 +10,7 @@ import { routes } from '../Openfort/types.js';
|
|
|
10
10
|
import { useOpenfort } from '../Openfort/useOpenfort.js';
|
|
11
11
|
import About from '../Pages/About/index.js';
|
|
12
12
|
import { AssetInventory } from '../Pages/AssetInventory/index.js';
|
|
13
|
+
import { SolanaAssetInventory } from '../Pages/AssetInventory/SolanaAssetInventory.js';
|
|
13
14
|
import Buy from '../Pages/Buy/index.js';
|
|
14
15
|
import BuyComplete from '../Pages/BuyComplete/index.js';
|
|
15
16
|
import BuyProcessing from '../Pages/BuyProcessing/index.js';
|
|
@@ -20,6 +21,10 @@ import ConnectedSuccess from '../Pages/ConnectedSuccess/index.js';
|
|
|
20
21
|
import Connectors from '../Pages/Connectors/index.js';
|
|
21
22
|
import CreateGuestUserPage from '../Pages/CreateGuestUserPage/index.js';
|
|
22
23
|
import CreateWallet from '../Pages/CreateWallet/index.js';
|
|
24
|
+
import Deposit from '../Pages/Deposit/index.js';
|
|
25
|
+
import DepositCex from '../Pages/DepositCex/index.js';
|
|
26
|
+
import DepositCrypto from '../Pages/DepositCrypto/index.js';
|
|
27
|
+
import DepositWallet from '../Pages/DepositWallet/index.js';
|
|
23
28
|
import DownloadApp from '../Pages/DownloadApp/index.js';
|
|
24
29
|
import EmailLogin from '../Pages/EmailLogin/index.js';
|
|
25
30
|
import EmailOTP from '../Pages/EmailOTP/index.js';
|
|
@@ -43,7 +48,9 @@ import RemoveLinkedProvider from '../Pages/RemoveLinkedProvider/index.js';
|
|
|
43
48
|
import SelectToken from '../Pages/SelectToken/index.js';
|
|
44
49
|
import SelectWalletToRecover from '../Pages/SelectWalletToRecover/index.js';
|
|
45
50
|
import Send from '../Pages/Send/index.js';
|
|
51
|
+
import { SolanaSend } from '../Pages/Send/SolanaSend.js';
|
|
46
52
|
import SendConfirmation from '../Pages/SendConfirmation/index.js';
|
|
53
|
+
import { SolanaSendConfirmation } from '../Pages/SendConfirmation/SolanaSendConfirmation.js';
|
|
47
54
|
import SocialProviders from '../Pages/SocialProviders/index.js';
|
|
48
55
|
import ConnectUsing from './ConnectUsing.js';
|
|
49
56
|
import ConnectWithMobile from './ConnectWithMobile.js';
|
|
@@ -90,6 +97,10 @@ function buildSharedPages() {
|
|
|
90
97
|
buyProviderSelect: jsx(BuyProviderSelect, {}),
|
|
91
98
|
receive: jsx(Receive, {}),
|
|
92
99
|
buy: jsx(Buy, {}),
|
|
100
|
+
deposit: jsx(Deposit, {}),
|
|
101
|
+
depositCrypto: jsx(DepositCrypto, {}),
|
|
102
|
+
depositWallet: jsx(DepositWallet, {}),
|
|
103
|
+
depositCex: jsx(DepositCex, {}),
|
|
93
104
|
exportKey: jsx(ExportKey, {}),
|
|
94
105
|
walletOverview: jsx(Connected, {}),
|
|
95
106
|
};
|
|
@@ -109,9 +120,10 @@ const CHAIN_PREFIXED_PAGES = {
|
|
|
109
120
|
'sol:connected': jsx(Connected, {}),
|
|
110
121
|
'sol:createWallet': jsx(CreateWallet, {}),
|
|
111
122
|
'sol:recoverWallet': jsx(RecoverPage, {}),
|
|
112
|
-
|
|
113
|
-
|
|
123
|
+
'sol:send': jsx(SolanaSend, {}),
|
|
124
|
+
'sol:sendConfirmation': jsx(SolanaSendConfirmation, {}),
|
|
114
125
|
'sol:receive': jsx(Receive, {}),
|
|
126
|
+
'sol:assetInventory': jsx(SolanaAssetInventory, {}),
|
|
115
127
|
// 'sol:wallets': <SolanaWallets />,
|
|
116
128
|
},
|
|
117
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -40,7 +40,10 @@ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMo
|
|
|
40
40
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
41
41
|
const bridge = useContext(OpenfortEthereumBridgeContext);
|
|
42
42
|
const hasWagmi = !!bridge;
|
|
43
|
-
|
|
43
|
+
// External wallet sign-in is available via any connector — WalletConnect (QR)
|
|
44
|
+
// or an injected/MetaMask browser extension — not WalletConnect alone.
|
|
45
|
+
const EXTERNAL_WALLET_CONNECTOR_IDS = ['walletConnect', 'injected', 'metaMask', 'metaMaskSDK', 'io.metamask'];
|
|
46
|
+
const hasExternalWallets = (_b = (_a = bridge === null || bridge === void 0 ? void 0 : bridge.connectors) === null || _a === void 0 ? void 0 : _a.some((c) => EXTERNAL_WALLET_CONNECTOR_IDS.includes(c.id))) !== null && _b !== void 0 ? _b : false;
|
|
44
47
|
const hasSolana = !!(walletConfig === null || walletConfig === void 0 ? void 0 : walletConfig.solana);
|
|
45
48
|
// Only allow for mounting OpenfortProvider once, so we avoid weird global
|
|
46
49
|
// state collisions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenfortProvider.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OpenfortProvider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -44,6 +44,10 @@ export declare const routes: {
|
|
|
44
44
|
readonly SEND_TOKEN_SELECT: "sendTokenSelect";
|
|
45
45
|
readonly SEND_CONFIRMATION: "sendConfirmation";
|
|
46
46
|
readonly RECEIVE: "receive";
|
|
47
|
+
readonly DEPOSIT: "deposit";
|
|
48
|
+
readonly DEPOSIT_CRYPTO: "depositCrypto";
|
|
49
|
+
readonly DEPOSIT_WALLET: "depositWallet";
|
|
50
|
+
readonly DEPOSIT_CEX: "depositCex";
|
|
47
51
|
readonly BUY: "buy";
|
|
48
52
|
readonly BUY_TOKEN_SELECT: "buyTokenSelect";
|
|
49
53
|
readonly BUY_SELECT_PROVIDER: "buySelectProvider";
|
|
@@ -294,6 +298,17 @@ export type ConnectUIOptions = {
|
|
|
294
298
|
buyWithCardUrl?: string;
|
|
295
299
|
buyFromExchangeUrl?: string;
|
|
296
300
|
buyTroubleshootingUrl?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Base URL of the openfort-funding backend (e.g. `https://funding.openfort.io`).
|
|
303
|
+
* Powers the Deposit hub's crypto/CEX rails (session API). When omitted, those
|
|
304
|
+
* rails are unavailable and the network layer is a no-op.
|
|
305
|
+
*
|
|
306
|
+
* TODO(openfort-funding-backend): default this from the platform config once the
|
|
307
|
+
* backend ships, so integrators don't have to set it manually.
|
|
308
|
+
*/
|
|
309
|
+
fundingBaseUrl?: string;
|
|
310
|
+
/** Deposit-hub funding options (destination chain/token for incoming deposits). */
|
|
311
|
+
funding?: FundingUIOptions;
|
|
297
312
|
phoneConfig?: PhoneConfig;
|
|
298
313
|
customPageComponents?: {
|
|
299
314
|
[key in CustomizableRoutes]?: React.ReactElement;
|
|
@@ -303,6 +318,73 @@ type WalletRecoveryOptionsExtended = {
|
|
|
303
318
|
allowedMethods: RecoveryMethod[];
|
|
304
319
|
defaultMethod: RecoveryMethod;
|
|
305
320
|
};
|
|
321
|
+
/**
|
|
322
|
+
* A funding method shown in the Deposit hub. Use `funding.methods` to choose
|
|
323
|
+
* which appear and in what order — like `authProviders` for the auth modal.
|
|
324
|
+
*/
|
|
325
|
+
export declare enum FundingMethod {
|
|
326
|
+
/** Apple Pay (fiat onramp; mobile only). */
|
|
327
|
+
APPLE_PAY = "applePay",
|
|
328
|
+
/** Card (fiat onramp). */
|
|
329
|
+
CARD = "card",
|
|
330
|
+
/** Transfer from wallet — prefilled wallet deeplinks. */
|
|
331
|
+
WALLET = "wallet",
|
|
332
|
+
/** Transfer from address — cross-chain deposit address + QR. */
|
|
333
|
+
ADDRESS = "crypto",
|
|
334
|
+
/** Transfer from Exchange — Coinbase / Binance on-ramp links + deposit address. */
|
|
335
|
+
EXCHANGE = "cex"
|
|
336
|
+
}
|
|
337
|
+
/** Where Deposit-hub funding lands. Defaults to USDC on Base when omitted. */
|
|
338
|
+
export type FundingUIOptions = {
|
|
339
|
+
/**
|
|
340
|
+
* Destination CAIP-2 chain id for deposits.
|
|
341
|
+
* @default "eip155:8453" (Base)
|
|
342
|
+
*/
|
|
343
|
+
targetChain?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Destination token contract on the target chain (or the zero address for native).
|
|
346
|
+
* @default USDC on Base
|
|
347
|
+
*/
|
|
348
|
+
targetCurrency?: string;
|
|
349
|
+
/**
|
|
350
|
+
* Destination wallet that receives the deposit. Optional integrator override;
|
|
351
|
+
* when unset, deposits land on the active embedded wallet for the target chain.
|
|
352
|
+
*/
|
|
353
|
+
targetAddress?: string;
|
|
354
|
+
/**
|
|
355
|
+
* Which funding methods the Deposit hub shows, and in what order. Omit to show
|
|
356
|
+
* all available methods (Apple Pay first on mobile). Mirrors `authProviders`.
|
|
357
|
+
* @example [FundingMethod.WALLET, FundingMethod.ADDRESS]
|
|
358
|
+
*/
|
|
359
|
+
methods?: FundingMethod[];
|
|
360
|
+
/**
|
|
361
|
+
* Allowlist of source chains shown in the crypto/exchange pickers, by CAIP-2 id,
|
|
362
|
+
* in this order. Omit for the common defaults (Arbitrum, Base, BNB, Ethereum,
|
|
363
|
+
* Monad, Optimism, Polygon, Solana). Selections the rail doesn't support are
|
|
364
|
+
* skipped.
|
|
365
|
+
* @example ['eip155:8453', 'eip155:42161', 'eip155:137']
|
|
366
|
+
*/
|
|
367
|
+
sourceChains?: string[];
|
|
368
|
+
/**
|
|
369
|
+
* Allowlist of source currencies shown, by symbol (case-insensitive). The
|
|
370
|
+
* sentinel `'native'` matches each chain's native currency (ETH, SOL, POL, …).
|
|
371
|
+
* Applied across every chain; chains left with none are hidden. Omit for the
|
|
372
|
+
* default `['native', 'USDC', 'USDT']`.
|
|
373
|
+
* @example ['native', 'USDC', 'USDT']
|
|
374
|
+
*/
|
|
375
|
+
sourceCurrencies?: string[];
|
|
376
|
+
/**
|
|
377
|
+
* URL of the standalone deposit "send" page. On mobile, wallet open-dApp
|
|
378
|
+
* deeplinks wrap this URL with the deposit address, chain, token and amount so
|
|
379
|
+
* the user confirms the transfer in their wallet's in-app browser. Defaults to
|
|
380
|
+
* the Openfort-hosted page (`https://deposit.openfort.io`); override to self-host,
|
|
381
|
+
* or set to an empty string to hide one-tap wallet deeplinks (the deposit-address
|
|
382
|
+
* / QR path still works).
|
|
383
|
+
* @default "https://deposit.openfort.io"
|
|
384
|
+
* @example "https://yourapp.com/deposit.html"
|
|
385
|
+
*/
|
|
386
|
+
depositPageUrl?: string;
|
|
387
|
+
};
|
|
306
388
|
export type CustomizableRoutes = typeof routes.CONNECTED;
|
|
307
389
|
export type OpenfortUIOptionsExtended = {
|
|
308
390
|
appName?: string;
|
|
@@ -337,6 +419,10 @@ export type OpenfortUIOptionsExtended = {
|
|
|
337
419
|
buyWithCardUrl?: string;
|
|
338
420
|
buyFromExchangeUrl?: string;
|
|
339
421
|
buyTroubleshootingUrl?: string;
|
|
422
|
+
/** Base URL of the openfort-funding backend. See {@link ConnectUIOptions.fundingBaseUrl}. */
|
|
423
|
+
fundingBaseUrl?: string;
|
|
424
|
+
/** Deposit-hub funding options. See {@link ConnectUIOptions.funding}. */
|
|
425
|
+
funding?: FundingUIOptions;
|
|
340
426
|
walletRecovery: WalletRecoveryOptionsExtended;
|
|
341
427
|
phoneConfig?: PhoneConfig;
|
|
342
428
|
customPageComponents?: {
|
|
@@ -34,6 +34,10 @@ const routes = {
|
|
|
34
34
|
SEND_TOKEN_SELECT: 'sendTokenSelect',
|
|
35
35
|
SEND_CONFIRMATION: 'sendConfirmation',
|
|
36
36
|
RECEIVE: 'receive',
|
|
37
|
+
DEPOSIT: 'deposit',
|
|
38
|
+
DEPOSIT_CRYPTO: 'depositCrypto',
|
|
39
|
+
DEPOSIT_WALLET: 'depositWallet',
|
|
40
|
+
DEPOSIT_CEX: 'depositCex',
|
|
37
41
|
BUY: 'buy',
|
|
38
42
|
BUY_TOKEN_SELECT: 'buyTokenSelect',
|
|
39
43
|
BUY_SELECT_PROVIDER: 'buySelectProvider',
|
|
@@ -97,6 +101,23 @@ var LinkWalletOnSignUpOption;
|
|
|
97
101
|
LinkWalletOnSignUpOption["REQUIRED"] = "required";
|
|
98
102
|
LinkWalletOnSignUpOption["DISABLED"] = "disabled";
|
|
99
103
|
})(LinkWalletOnSignUpOption || (LinkWalletOnSignUpOption = {}));
|
|
104
|
+
/**
|
|
105
|
+
* A funding method shown in the Deposit hub. Use `funding.methods` to choose
|
|
106
|
+
* which appear and in what order — like `authProviders` for the auth modal.
|
|
107
|
+
*/
|
|
108
|
+
var FundingMethod;
|
|
109
|
+
(function (FundingMethod) {
|
|
110
|
+
/** Apple Pay (fiat onramp; mobile only). */
|
|
111
|
+
FundingMethod["APPLE_PAY"] = "applePay";
|
|
112
|
+
/** Card (fiat onramp). */
|
|
113
|
+
FundingMethod["CARD"] = "card";
|
|
114
|
+
/** Transfer from wallet — prefilled wallet deeplinks. */
|
|
115
|
+
FundingMethod["WALLET"] = "wallet";
|
|
116
|
+
/** Transfer from address — cross-chain deposit address + QR. */
|
|
117
|
+
FundingMethod["ADDRESS"] = "crypto";
|
|
118
|
+
/** Transfer from Exchange — Coinbase / Binance on-ramp links + deposit address. */
|
|
119
|
+
FundingMethod["EXCHANGE"] = "cex";
|
|
120
|
+
})(FundingMethod || (FundingMethod = {}));
|
|
100
121
|
const defaultSendFormState = {
|
|
101
122
|
recipient: '',
|
|
102
123
|
amount: '',
|
|
@@ -115,5 +136,5 @@ const defaultBuyFormState = {
|
|
|
115
136
|
providerId: 'coinbase',
|
|
116
137
|
};
|
|
117
138
|
|
|
118
|
-
export { LinkWalletOnSignUpOption, UIAuthProvider, defaultBuyFormState, defaultSendFormState, notStoredInHistoryRoutes, routes, socialProviders };
|
|
139
|
+
export { FundingMethod, LinkWalletOnSignUpOption, UIAuthProvider, defaultBuyFormState, defaultSendFormState, notStoredInHistoryRoutes, routes, socialProviders };
|
|
119
140
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVM counterpart of {@link AssetInventory}: lists the connected Solana wallet's
|
|
3
|
+
* native SOL and SPL token holdings (e.g. USDC). Reached by tapping the balance on
|
|
4
|
+
* the Solana connected page.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SolanaAssetInventory: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { formatUnits } from 'viem';
|
|
4
|
+
import { TOKEN_LOGO, symbolToColor } from '../../../constants/logos.js';
|
|
5
|
+
import { useSolanaWalletAssets } from '../../../solana/hooks/useSolanaWalletAssets.js';
|
|
6
|
+
import { ModalHeading } from '../../Common/Modal/styles.js';
|
|
7
|
+
import { routes } from '../../Openfort/types.js';
|
|
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';
|
|
10
|
+
|
|
11
|
+
const ZERO = BigInt(0);
|
|
12
|
+
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() })) }));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* SVM counterpart of {@link AssetInventory}: lists the connected Solana wallet's
|
|
20
|
+
* native SOL and SPL token holdings (e.g. USDC). Reached by tapping the balance on
|
|
21
|
+
* the Solana connected page.
|
|
22
|
+
*/
|
|
23
|
+
const SolanaAssetInventory = () => {
|
|
24
|
+
const { data, isLoading } = useSolanaWalletAssets();
|
|
25
|
+
const { triggerResize } = useOpenfort();
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (!isLoading)
|
|
28
|
+
triggerResize();
|
|
29
|
+
}, [isLoading, triggerResize]);
|
|
30
|
+
const tokens = (data !== null && data !== void 0 ? data : []).filter((t) => t.amount > ZERO);
|
|
31
|
+
if (isLoading) {
|
|
32
|
+
return (jsxs(SelectTokenContent, { onBack: routes.SOL_CONNECTED, children: [jsx(ModalHeading, { children: "Your assets" }), jsx(EmptyState, { children: "Loading balances..." })] }));
|
|
33
|
+
}
|
|
34
|
+
return (jsxs(SelectTokenContent, { onBack: routes.SOL_CONNECTED, children: [jsx(ModalHeading, { children: "Your assets" }), jsx(ContentWrapper, { children: jsx(TokenList, { children: tokens.length > 0 ? (tokens.map((token) => {
|
|
35
|
+
const amount = Number(formatUnits(token.amount, token.decimals));
|
|
36
|
+
const balanceStr = `${amount.toLocaleString('en-US', { maximumFractionDigits: 4 })} ${token.symbol}`;
|
|
37
|
+
return (jsx(TokenContainer, { children: jsxs(TokenLeftGroup, { children: [jsx(SolanaTokenLogo, { symbol: token.symbol }), jsxs(TokenInfo, { style: { textAlign: 'left' }, children: [jsx(TokenSymbol, { children: token.name }), jsx(TokenName, { children: balanceStr })] })] }) }, token.mint));
|
|
38
|
+
})) : (jsx(EmptyState, { children: "No assets found" })) }) })] }, "sol-assets"));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { SolanaAssetInventory };
|
|
42
|
+
//# sourceMappingURL=SolanaAssetInventory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SolanaAssetInventory.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -77,11 +77,12 @@ const Buy = () => {
|
|
|
77
77
|
setRoute(routes.BUY_SELECT_PROVIDER);
|
|
78
78
|
};
|
|
79
79
|
const handleBack = () => {
|
|
80
|
-
|
|
80
|
+
// Card/Apple Pay is reached via the Add funds hub — back returns there.
|
|
81
|
+
setRoute(routes.DEPOSIT);
|
|
81
82
|
};
|
|
82
83
|
const isPresetSelected = (value) => pressedPreset === value;
|
|
83
84
|
const step1Disabled = fiatAmount === null || fiatAmount <= 0;
|
|
84
|
-
return (jsxs(PageContent, { onBack: handleBack, children: [jsx(ModalHeading, { children: locales.buyScreen_heading }), jsx(ModalBody, { children: locales.buyScreen_subheading }), jsxs(Section, { children: [jsx(SectionLabel, { children: "Amount" }), jsxs(AmountCard, { children: [jsx(CurrencySymbol, { children: currencySymbol }), jsx(AmountInput, { value: buyForm.amount, onChange: handleAmountChange, onBlur: handleAmountBlur, placeholder: "0.00", inputMode: "decimal", autoComplete: "off" })] }), jsx(PresetList, { children: amountPresets.map((preset) => (jsx(PresetButton, { type: "button", onClick: () => handlePresetClick(preset), "$active": isPresetSelected(preset), children: currencyFormatter.format(preset) }, preset))) })] }), jsxs(Section, { children: [jsx(SectionLabel, { children: "
|
|
85
|
+
return (jsxs(PageContent, { onBack: handleBack, children: [jsx(ModalHeading, { children: locales.buyScreen_heading }), jsx(ModalBody, { children: locales.buyScreen_subheading }), jsxs(Section, { children: [jsx(SectionLabel, { children: "Amount" }), jsxs(AmountCard, { children: [jsx(CurrencySymbol, { children: currencySymbol }), jsx(AmountInput, { value: buyForm.amount, onChange: handleAmountChange, onBlur: handleAmountBlur, placeholder: "0.00", inputMode: "decimal", autoComplete: "off" })] }), jsx(PresetList, { children: amountPresets.map((preset) => (jsx(PresetButton, { type: "button", onClick: () => handlePresetClick(preset), "$active": isPresetSelected(preset), children: currencyFormatter.format(preset) }, preset))) })] }), jsxs(Section, { children: [jsx(SectionLabel, { children: "Currency" }), jsxs(SelectorButton, { type: "button", onClick: handleOpenTokenSelector, children: [jsxs(SelectorContent, { children: [jsx(SelectorTitle, { children: tokenSymbol || 'Select currency' }), jsx(SelectorSubtitle, { children: tokenName })] }), jsx(SelectorRight, { children: jsx(Arrow, { width: "13", height: "12", viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx(ArrowChevron, { stroke: "currentColor", d: "M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314", strokeWidth: "2", strokeLinecap: "round" }) }) })] })] }), jsx(ContinueButtonWrapper, { children: jsx(Button, { variant: "primary", onClick: handleContinue, disabled: step1Disabled, children: "Continue" }) })] }));
|
|
85
86
|
};
|
|
86
87
|
|
|
87
88
|
export { Buy as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -147,7 +147,7 @@ const BuySelectProvider = () => {
|
|
|
147
147
|
.filter((n) => Number.isFinite(n));
|
|
148
148
|
return amounts.length > 0 ? Math.max(...amounts) : null;
|
|
149
149
|
}, [quotes]);
|
|
150
|
-
return (jsxs(PageContent, { onBack: handleBack, children: [jsx(ModalHeading, { children: "Select Provider" }), jsx(
|
|
150
|
+
return (jsxs(PageContent, { onBack: handleBack, children: [jsx(ModalHeading, { children: "Select Provider" }), jsxs("div", { style: { textAlign: 'center', margin: '6px 0 16px' }, children: [jsx("div", { style: { fontSize: 13, color: 'var(--ck-body-color-muted)' }, children: "You pay" }), jsx("div", { style: { fontSize: 30, fontWeight: 700, lineHeight: 1.1, color: 'var(--ck-body-color)' }, children: formattedFiat || '—' }), targetDestinationAmount !== null && (jsxs("div", { style: { fontSize: 14, fontWeight: 500, color: 'var(--ck-body-color-muted)', marginTop: 4 }, children: ["\u2248 ", targetDestinationAmount.toFixed(2), " ", tokenSymbol] }))] }), jsx(ModalBody, { style: { marginTop: 0, fontSize: '12px', opacity: 0.7 }, children: isLoadingQuote ? 'Loading quotes…' : `Quotes refresh in ${quoteRefreshTimer}s` }), jsx(ProviderList, { children: providers.map((provider) => {
|
|
151
151
|
var _a, _b, _c, _d, _e, _f;
|
|
152
152
|
// Get provider-specific quote data
|
|
153
153
|
const providerQuote = quotes[provider.id];
|