@funkit/connect 4.1.1 → 4.1.3
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/CHANGELOG.md +42 -0
- package/dist/{chunk-2QK6Y7FR.js → chunk-C7BDNBKV.js} +1 -0
- package/dist/{chunk-JFHTYZ23.js → chunk-QCYFMAKN.js} +1 -0
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Box/Box.d.ts +7 -7
- package/dist/components/CopyAddress/CopyAddressButton.d.ts +5 -0
- package/dist/components/CopyAddress/CopyDisplayedAddress.d.ts +5 -0
- package/dist/components/CopyAddress/CopyInputDisplayedAddress.d.ts +5 -0
- package/dist/components/CopyAddress/LabelledCopyAddressButton.d.ts +6 -0
- package/dist/components/Dropdown/BaseDropdown.css.d.ts +5 -0
- package/dist/components/Dropdown/BaseDropdown.d.ts +7 -1
- package/dist/components/FunButton/FunButton.css.d.ts +3 -3
- package/dist/components/FunButton/FunLinkButton.d.ts +9 -4
- package/dist/components/FunInput/FunInput.css.d.ts +1 -0
- package/dist/components/FunInput/FunInput.d.ts +0 -1
- package/dist/components/FunNotification/FunNotification.css.d.ts +2 -0
- package/dist/components/FunNotification/FunNotification.d.ts +0 -1
- package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.css.d.ts +1 -0
- package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +6 -2
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +2 -3
- package/dist/components/FunTooltip/FunTooltip.css.d.ts +4 -0
- package/dist/components/FunTooltip/FunTooltip.d.ts +4 -1
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.css.d.ts +2 -0
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +0 -1
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.css.d.ts +2 -0
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +1 -1
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +3 -1
- package/dist/config/getDefaultConfig.d.ts +33 -33
- package/dist/consts/customers.d.ts +0 -4
- package/dist/consts/layout.d.ts +5 -0
- package/dist/css/sprinkles.css.d.ts +9 -7
- package/dist/domains/clientMetadata.d.ts +5 -3
- package/dist/domains/feeEstimate.d.ts +10 -0
- package/dist/domains/paymentMethods.d.ts +1 -0
- package/dist/domains/quote.d.ts +5 -0
- package/dist/domains/wallet.d.ts +2 -1
- package/dist/hooks/useCheckoutQuoteNotification.d.ts +2 -2
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +7 -0
- package/dist/hooks/useCopyToClipboard.d.ts +4 -0
- package/dist/hooks/usePaymentSources.d.ts +6 -0
- package/dist/index.css +524 -459
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5516 -5698
- package/dist/locales/index.d.ts +0 -3
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +5 -3
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +1 -3
- package/dist/modals/CheckoutModal/useNewCheckoutQuote.d.ts +7 -0
- package/dist/modals/CheckoutModal/useSourceAssetConfirm.d.ts +4 -2
- package/dist/modals/CheckoutModal/useWalletAssetHoldings.d.ts +6 -2
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +0 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.d.ts +0 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.d.ts +2 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/index.d.ts +1 -1
- package/dist/modals/ProfileDetails/ProfileDetails.d.ts +0 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +7 -34
- package/dist/providers/FunkitFlagsProvider.d.ts +2 -2
- package/dist/providers/FunkitProvider.d.ts +2 -1
- package/dist/providers/FunkitQuoteContext.d.ts +45 -0
- package/dist/providers/FunkitThemeProvider.d.ts +3 -0
- package/dist/providers/GeneralWalletProvider.d.ts +8 -8
- package/dist/providers/provideFunkitConnectChains.d.ts +1 -1
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/address.d.ts +6 -0
- package/dist/utils/assets.d.ts +1 -10
- package/dist/utils/checkout.d.ts +4 -13
- package/dist/utils/checkoutHistory.d.ts +1 -1
- package/dist/utils/flags/config.d.ts +19 -46
- package/dist/utils/funLogger.d.ts +3 -1
- package/dist/utils/moonpay.d.ts +12 -0
- package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.js +1 -1
- package/dist/wallets/walletConnectors/index.js +61 -61
- package/package.json +7 -8
- package/dist/ar_AR-26YWBMAY.js +0 -7
- package/dist/arbitrum-EUTVMZS6.js +0 -7
- package/dist/avalanche-6CKETBV4.js +0 -7
- package/dist/base-FG2B7H5W.js +0 -7
- package/dist/blast-VGAGZQAP.js +0 -7
- package/dist/bsc-BUTATTVT.js +0 -7
- package/dist/chunk-FRCBBARC.js +0 -1184
- package/dist/components/CopyAddress/CopyAddress.d.ts +0 -12
- package/dist/cronos-DEE5V35Y.js +0 -7
- package/dist/dydx-CLPISBCB.js +0 -7
- package/dist/en_US-45SPICME.js +0 -7
- package/dist/es_419-ZOOWMI2O.js +0 -7
- package/dist/ethereum-4YOWVRNC.js +0 -7
- package/dist/fr_FR-FC4AERJX.js +0 -1057
- package/dist/hardhat-WRPL5WKN.js +0 -7
- package/dist/hi_IN-VKOWQKED.js +0 -7
- package/dist/id_ID-JEPISG6J.js +0 -7
- package/dist/ja_JP-GJBWIN4W.js +0 -7
- package/dist/klaytn-NEGYZJPB.js +0 -7
- package/dist/ko_KR-G6COLOAZ.js +0 -7
- package/dist/locales/I18n.d.ts +0 -25
- package/dist/manta-G75LJIRI.js +0 -7
- package/dist/mantle-LQ3XH3KY.js +0 -7
- package/dist/optimism-TIC2YA7E.js +0 -7
- package/dist/polygon-NDHYUKMH.js +0 -7
- package/dist/providers/I18nContext.d.ts +0 -11
- package/dist/pt_BR-52CJXY6T.js +0 -7
- package/dist/ronin-O6KMJHPZ.js +0 -7
- package/dist/ru_RU-AEJUH3PG.js +0 -1057
- package/dist/scroll-G3S4ZVYZ.js +0 -7
- package/dist/th_TH-4TFH5TB7.js +0 -1057
- package/dist/tr_TR-WG4WEQOS.js +0 -1057
- package/dist/uk_UA-2JYNNASB.js +0 -1057
- package/dist/utils/deposit.d.ts +0 -12
- package/dist/utils/isDydxAddress.d.ts +0 -6
- package/dist/xdc-E3X4E3NM.js +0 -7
- package/dist/zetachain-2J22B4NG.js +0 -7
- package/dist/zh_CN-HFGZOTOB.js +0 -7
- package/dist/zkSync-76EOKZ5Y.js +0 -7
- package/dist/zora-73DYEWFN.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 4.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 61112d5: refactor: integrate @funkit/chains
|
|
8
|
+
- Updated dependencies [61112d5]
|
|
9
|
+
- @funkit/wagmi-tools@3.0.23
|
|
10
|
+
- @funkit/chains@0.1.1
|
|
11
|
+
- @funkit/core@2.3.2
|
|
12
|
+
|
|
13
|
+
## 4.1.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 8deb27f: chore: rewrite pure css stylesheets to css.ts
|
|
18
|
+
- fd9ac5d: feat: add deviceId logging with userId
|
|
19
|
+
- 8032902: chore: adjust brokerage time for polymarket
|
|
20
|
+
- c5bf45b: feat: revise token recommendation heuristics
|
|
21
|
+
- 697811b: chore: reorganize file structure
|
|
22
|
+
- 1012332: feat: use FunLinkButton in DisclaimerText
|
|
23
|
+
- 125fd75: refactor: deprecate token_transfer_additional_disclaimer
|
|
24
|
+
- 8032902: feat: streamline special timestamps to new flag checkout_time_estimate_overrides
|
|
25
|
+
- 58574c5: fix: fix button transitions
|
|
26
|
+
- ad96b5b: feat: refactor rendering of token and chain icons
|
|
27
|
+
- 8379562: feat: redesign Transfer token page
|
|
28
|
+
- 0220b0a: fix: improve biome warnings
|
|
29
|
+
- 5ffc924: fix: remove imports for global pure stylesheets
|
|
30
|
+
- 4ebe545: refactor: reorganize getTokenInfo -> getTokenAddressBySymbolAndChainId
|
|
31
|
+
- Updated dependencies [1e4114a]
|
|
32
|
+
- Updated dependencies [1e4114a]
|
|
33
|
+
- Updated dependencies [125fd75]
|
|
34
|
+
- Updated dependencies [8032902]
|
|
35
|
+
- Updated dependencies [68a03ee]
|
|
36
|
+
- Updated dependencies [4ebe545]
|
|
37
|
+
- Updated dependencies [5975252]
|
|
38
|
+
- Updated dependencies [68a03ee]
|
|
39
|
+
- Updated dependencies [4ebe545]
|
|
40
|
+
- @funkit/api-base@1.5.1
|
|
41
|
+
- @funkit/core@2.3.1
|
|
42
|
+
- @funkit/utils@1.0.4
|
|
43
|
+
- @funkit/wagmi-tools@3.0.22
|
|
44
|
+
|
|
3
45
|
## 4.1.1
|
|
4
46
|
|
|
5
47
|
### Patch Changes
|
|
@@ -97,6 +97,7 @@ var darkTheme = ({
|
|
|
97
97
|
dialog: "0px 8px 32px rgba(0, 0, 0, 0.32)",
|
|
98
98
|
selectedOption: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
99
99
|
selectedWallet: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
100
|
+
dropdown: "0px 0px 0px 1px rgba(255, 255, 255, 0.16), 0px 2px 6px rgba(0, 0, 0, 0.03), 0px 4px 42px rgba(0, 0, 0, 0.06)",
|
|
100
101
|
// Override shadows
|
|
101
102
|
...customShadows || {}
|
|
102
103
|
},
|
|
@@ -97,6 +97,7 @@ var lightTheme = ({
|
|
|
97
97
|
dialog: "0px 8px 32px rgba(0, 0, 0, 0.32)",
|
|
98
98
|
selectedOption: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
99
99
|
selectedWallet: "0px 2px 6px rgba(0, 0, 0, 0.12)",
|
|
100
|
+
dropdown: "0px 0px 0px 1px rgba(0, 0, 0, 0.05), 0px 2px 6px 0px rgba(0, 0, 0, 0.03), 0px 4px 42px 0px rgba(0, 0, 0, 0.06)",
|
|
100
101
|
// Override shadows
|
|
101
102
|
...customShadows || {}
|
|
102
103
|
},
|
|
@@ -19,13 +19,13 @@ export declare const Box: React.ForwardRefExoticComponent<{
|
|
|
19
19
|
focused?: "accentColor" | "transparent" | "accentColorForeground" | "actionButtonBorder" | "connectButtonBackground" | "connectButtonBackgroundError" | "connectButtonText" | "connectButtonTextError" | "connectionIndicator" | "error" | "errorBackground" | "errorBorder" | "generalBorder" | "generalBorderDim" | "menuItemBackground" | "selectedOptionBorder" | "focusedOptionBorder" | "standby" | "success" | "chainIconBorder" | "modalBackdrop" | "modalBackground" | "modalBorder" | "notificationPrimary" | "offBackground" | "hoverState" | "lightStroke" | "mediumStroke" | "strokeColor" | "dydxSwitchActiveBackground" | "primaryText" | "secondaryText" | "tertiaryText" | "textSelection" | "inputBackground" | "inputBorderBase" | "inputBorderHover" | "actionColor" | "actionColorHover" | "actionColorDisabled" | "buttonPrimary" | "buttonDisabled" | "buttonWarning" | "buttonSuccess" | "buttonTextPrimary" | "buttonTextDisabled" | "buttonBackgroundTertiary" | "buttonBackgroundHoverTertiary" | "buttonTextTertiary" | "buttonTextDisabledTertiary" | "buttonStrokeTertiary" | "buttonBackground" | "buttonBackgroundHover" | "buttonBackgroundDisabled" | "buttonStroke" | "buttonTextSecondaryDisabled" | "buttonTextSecondary" | "buttonIconBackgroundHover" | "buttonIconBackgroundPressed" | "buttonIconStroke" | undefined;
|
|
20
20
|
focusedVisible?: "accentColor" | "transparent" | "accentColorForeground" | "actionButtonBorder" | "connectButtonBackground" | "connectButtonBackgroundError" | "connectButtonText" | "connectButtonTextError" | "connectionIndicator" | "error" | "errorBackground" | "errorBorder" | "generalBorder" | "generalBorderDim" | "menuItemBackground" | "selectedOptionBorder" | "focusedOptionBorder" | "standby" | "success" | "chainIconBorder" | "modalBackdrop" | "modalBackground" | "modalBorder" | "notificationPrimary" | "offBackground" | "hoverState" | "lightStroke" | "mediumStroke" | "strokeColor" | "dydxSwitchActiveBackground" | "primaryText" | "secondaryText" | "tertiaryText" | "textSelection" | "inputBackground" | "inputBorderBase" | "inputBorderHover" | "actionColor" | "actionColorHover" | "actionColorDisabled" | "buttonPrimary" | "buttonDisabled" | "buttonWarning" | "buttonSuccess" | "buttonTextPrimary" | "buttonTextDisabled" | "buttonBackgroundTertiary" | "buttonBackgroundHoverTertiary" | "buttonTextTertiary" | "buttonTextDisabledTertiary" | "buttonStrokeTertiary" | "buttonBackground" | "buttonBackgroundHover" | "buttonBackgroundDisabled" | "buttonStroke" | "buttonTextSecondaryDisabled" | "buttonTextSecondary" | "buttonIconBackgroundHover" | "buttonIconBackgroundPressed" | "buttonIconStroke" | undefined;
|
|
21
21
|
} | undefined;
|
|
22
|
-
boxShadow?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | {
|
|
23
|
-
base?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
24
|
-
hover?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
25
|
-
active?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
26
|
-
selection?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
27
|
-
focused?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
28
|
-
focusedVisible?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
22
|
+
boxShadow?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | {
|
|
23
|
+
base?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
24
|
+
hover?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
25
|
+
active?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
26
|
+
selection?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
27
|
+
focused?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
28
|
+
focusedVisible?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
29
29
|
} | undefined;
|
|
30
30
|
color?: "accentColor" | "transparent" | "accentColorForeground" | "actionButtonBorder" | "connectButtonBackground" | "connectButtonBackgroundError" | "connectButtonText" | "connectButtonTextError" | "connectionIndicator" | "error" | "errorBackground" | "errorBorder" | "generalBorder" | "generalBorderDim" | "menuItemBackground" | "selectedOptionBorder" | "focusedOptionBorder" | "standby" | "success" | "chainIconBorder" | "modalBackdrop" | "modalBackground" | "modalBorder" | "notificationPrimary" | "offBackground" | "hoverState" | "lightStroke" | "mediumStroke" | "strokeColor" | "dydxSwitchActiveBackground" | "primaryText" | "secondaryText" | "tertiaryText" | "textSelection" | "inputBackground" | "inputBorderBase" | "inputBorderHover" | "actionColor" | "actionColorHover" | "actionColorDisabled" | "buttonPrimary" | "buttonDisabled" | "buttonWarning" | "buttonSuccess" | "buttonTextPrimary" | "buttonTextDisabled" | "buttonBackgroundTertiary" | "buttonBackgroundHoverTertiary" | "buttonTextTertiary" | "buttonTextDisabledTertiary" | "buttonStrokeTertiary" | "buttonBackground" | "buttonBackgroundHover" | "buttonBackgroundDisabled" | "buttonStroke" | "buttonTextSecondaryDisabled" | "buttonTextSecondary" | "buttonIconBackgroundHover" | "buttonIconBackgroundPressed" | "buttonIconStroke" | {
|
|
31
31
|
base?: "accentColor" | "transparent" | "accentColorForeground" | "actionButtonBorder" | "connectButtonBackground" | "connectButtonBackgroundError" | "connectButtonText" | "connectButtonTextError" | "connectionIndicator" | "error" | "errorBackground" | "errorBorder" | "generalBorder" | "generalBorderDim" | "menuItemBackground" | "selectedOptionBorder" | "focusedOptionBorder" | "standby" | "success" | "chainIconBorder" | "modalBackdrop" | "modalBackground" | "modalBorder" | "notificationPrimary" | "offBackground" | "hoverState" | "lightStroke" | "mediumStroke" | "strokeColor" | "dydxSwitchActiveBackground" | "primaryText" | "secondaryText" | "tertiaryText" | "textSelection" | "inputBackground" | "inputBorderBase" | "inputBorderHover" | "actionColor" | "actionColorHover" | "actionColorDisabled" | "buttonPrimary" | "buttonDisabled" | "buttonWarning" | "buttonSuccess" | "buttonTextPrimary" | "buttonTextDisabled" | "buttonBackgroundTertiary" | "buttonBackgroundHoverTertiary" | "buttonTextTertiary" | "buttonTextDisabledTertiary" | "buttonStrokeTertiary" | "buttonBackground" | "buttonBackgroundHover" | "buttonBackgroundDisabled" | "buttonStroke" | "buttonTextSecondaryDisabled" | "buttonTextSecondary" | "buttonIconBackgroundHover" | "buttonIconBackgroundPressed" | "buttonIconStroke" | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Element displaying the provided address along with a copy button, similar to `CopyInputDisplayedAddress` but doesn't look like an input, instead it's wrapped in a simple background box */
|
|
3
|
+
export declare function CopyDisplayedAddress({ address, }: {
|
|
4
|
+
address: string;
|
|
5
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Element displaying the provided address along with a copy button, similar to `CopyDisplayedAddress` but visually resembles an input with a suffix icon */
|
|
3
|
+
export declare function CopyInputDisplayedAddress({ address, }: {
|
|
4
|
+
address: string;
|
|
5
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const BORDER_RADIUS = "connectButton";
|
|
2
|
+
export declare const ANIMATION_DURATION = 150;
|
|
3
|
+
export declare const baseDropdownItemWrapperStyles: string;
|
|
4
|
+
export declare const baseDropdownListWrapperAnimateInStyles: string;
|
|
5
|
+
export declare const baseDropdownListWrapperAnimateOutStyles: string;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type BaseActiveDropdownItemProps } from './BaseActiveDropdownItem';
|
|
3
|
+
/** gap between the icon and the label of the item */
|
|
4
|
+
export declare const HORIZONTAL_ICON_GAP = "4";
|
|
5
|
+
/** safe spacing, ie. padding, on the left & right of the active item and dropdown item */
|
|
6
|
+
export declare const HORIZONTAL_OUTER_PADDING_X = "8";
|
|
3
7
|
interface BaseDropdownOption {
|
|
4
8
|
label: string;
|
|
5
9
|
value: string;
|
|
@@ -18,6 +22,8 @@ interface BaseDropdownProps {
|
|
|
18
22
|
resetSearchOnClose?: boolean;
|
|
19
23
|
openToTopOnMobile?: boolean;
|
|
20
24
|
alwaysOpenToTop?: boolean;
|
|
25
|
+
openDropdownFullWidth?: boolean;
|
|
26
|
+
preloadIconUrls?: string[];
|
|
21
27
|
}
|
|
22
|
-
declare function BaseDropdown({ activeItemProps, value, options, onOptionSelected, renderDropdownOption, searchableOptions, placeholder, resetSearchOnClose, openToTopOnMobile, alwaysOpenToTop, }: BaseDropdownProps): React.JSX.Element;
|
|
28
|
+
declare function BaseDropdown({ activeItemProps, value, options, onOptionSelected, renderDropdownOption, searchableOptions, placeholder, resetSearchOnClose, openToTopOnMobile, alwaysOpenToTop, openDropdownFullWidth, preloadIconUrls, }: BaseDropdownProps): React.JSX.Element;
|
|
23
29
|
export default BaseDropdown;
|
|
@@ -2,7 +2,7 @@ export declare const funLinkButtonStyle: string;
|
|
|
2
2
|
export declare const transitionStyles: string;
|
|
3
3
|
export declare const pressedStyles: string;
|
|
4
4
|
export declare const baseFunIconButtonStyle: string;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
5
|
+
export declare const funButtonClickableStyle: string;
|
|
6
|
+
export declare const funButtonNonClickableStyle: string;
|
|
7
|
+
export declare const funButtonDisabledStyle: string;
|
|
8
8
|
export declare const rotateStyle: string;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type TextProps } from '../Text/Text';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* A button that looks like a link. Behavior can be customized with `href` (anchor) or `onClick` (button).
|
|
5
|
+
*/
|
|
6
|
+
export declare function FunLinkButton({ color, inline, hasPadding, href, onClick, text, textProps, }: {
|
|
7
|
+
color?: TextProps['color'];
|
|
8
|
+
hasPadding?: boolean;
|
|
9
|
+
href?: string;
|
|
10
|
+
inline?: boolean;
|
|
11
|
+
onClick?: () => void;
|
|
5
12
|
text: string;
|
|
6
13
|
textProps?: Omit<TextProps, 'color'>;
|
|
7
|
-
hasPadding?: boolean;
|
|
8
|
-
color?: TextProps['color'];
|
|
9
14
|
}): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const badgeStyle: string;
|
|
@@ -8,6 +8,10 @@ export interface FunPaymentMethodItemProps {
|
|
|
8
8
|
isError?: boolean;
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
isActive?: boolean;
|
|
11
|
-
isSource?: boolean;
|
|
12
11
|
}
|
|
13
|
-
export declare
|
|
12
|
+
export declare const FunPaymentMethodItem: ({ keyIcon, keyText, valueIcon, disclaimerText, onClick, isError, isDisabled, isActive, }: FunPaymentMethodItemProps) => React.JSX.Element;
|
|
13
|
+
interface SourcePaymentMethodItemProps extends Omit<FunPaymentMethodItemProps, 'valueIcon'> {
|
|
14
|
+
otherSourcesCount: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const SourcePaymentMethodItem: ({ keyIcon, keyText, disclaimerText, onClick, otherSourcesCount, isError, isDisabled, isActive, }: SourcePaymentMethodItemProps) => React.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -12,17 +12,16 @@ interface ConnectedMeshPaymentMethodItemProps {
|
|
|
12
12
|
* the other one is for connecting new brokerage button
|
|
13
13
|
* */
|
|
14
14
|
export declare const ConnectedMeshPaymentMethodItem: ({ paymentMethodInfo, isSelected, onSelect, onBrokerageError, targetChainId, }: ConnectedMeshPaymentMethodItemProps) => React.JSX.Element;
|
|
15
|
-
export declare const AccountBalancePaymentMethodItem: ({ isActive,
|
|
15
|
+
export declare const AccountBalancePaymentMethodItem: ({ isActive, customValueIcon, onClick, targetChainId, }: BasePaymentMethodItemProps & {
|
|
16
16
|
targetChainId: string;
|
|
17
17
|
}) => React.JSX.Element;
|
|
18
18
|
type BasePaymentMethodItemProps = {
|
|
19
19
|
isActive: boolean;
|
|
20
20
|
onClick: () => void;
|
|
21
21
|
isClickable?: boolean;
|
|
22
|
-
isSource?: boolean;
|
|
23
22
|
customValueIcon?: ReactNode;
|
|
24
23
|
};
|
|
25
|
-
export declare function AddPaymentMethodItem({ paymentMethod, isClickable, isActive, onClick,
|
|
24
|
+
export declare function AddPaymentMethodItem({ paymentMethod, isClickable, isActive, onClick, customValueIcon, }: BasePaymentMethodItemProps & {
|
|
26
25
|
paymentMethod: PaymentMethod;
|
|
27
26
|
dynamicLimit?: string;
|
|
28
27
|
}): React.JSX.Element | undefined;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare const MAX_TOOLTIP_WIDTH = 180;
|
|
1
2
|
export declare const tooltipContainer: string;
|
|
2
3
|
export declare const tooltipStyle: string;
|
|
4
|
+
export declare const tooltipStyleCenter: string;
|
|
5
|
+
export declare const tooltipStyleRight: string;
|
|
6
|
+
export declare const tooltipStyleLeft: string;
|
|
3
7
|
export declare const tooltipFadeIn: string;
|
|
@@ -2,6 +2,9 @@ import React, { type ReactNode } from 'react';
|
|
|
2
2
|
interface FunTooltipProps {
|
|
3
3
|
content: string;
|
|
4
4
|
children: ReactNode;
|
|
5
|
+
wrapperElementRef?: React.RefObject<HTMLDivElement>;
|
|
6
|
+
enableDynamicPositioning?: boolean;
|
|
7
|
+
tooltipPosition?: 'center' | 'left' | 'right';
|
|
5
8
|
}
|
|
6
|
-
export declare const FunTooltip: ({ content, children }: FunTooltipProps) => React.JSX.Element;
|
|
9
|
+
export declare const FunTooltip: ({ content, children, wrapperElementRef, tooltipPosition, enableDynamicPositioning, }: FunTooltipProps) => React.JSX.Element;
|
|
7
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitCheckoutQuoteResult } from '
|
|
2
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
3
3
|
interface PaymentFeesSummaryProps {
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
quote: FunkitCheckoutQuoteResult | null | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
2
3
|
import { type PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
3
4
|
import type { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
4
5
|
import { type FunkitTextCustomizationsConfig, type FunkitUiCustomRecipientConfig, type FunkitUiCustomizationsConfig } from '../../providers/FunkitConfigContext';
|
|
@@ -15,8 +16,9 @@ interface PaymentAmountSummaryProps {
|
|
|
15
16
|
isLoading: boolean;
|
|
16
17
|
targetChainId: string;
|
|
17
18
|
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
19
|
+
quote: FunkitCheckoutQuoteResult | null;
|
|
18
20
|
textCustomizations: FunkitTextCustomizationsConfig['confirmationScreen'];
|
|
19
21
|
uiCustomizations: FunkitUiCustomizationsConfig['confirmationScreen'];
|
|
20
22
|
}
|
|
21
|
-
export declare function PaymentAmountSummary({ isLoading, targetChainId, checkoutItem, textCustomizations, uiCustomizations, }: PaymentAmountSummaryProps): React.JSX.Element;
|
|
23
|
+
export declare function PaymentAmountSummary({ isLoading, targetChainId, quote, checkoutItem, textCustomizations, uiCustomizations, }: PaymentAmountSummaryProps): React.JSX.Element;
|
|
22
24
|
export {};
|
|
@@ -19,6 +19,39 @@ export declare const createFunkitWagmiConfig: (rawWagmiConfig: CreateFunkitWagmi
|
|
|
19
19
|
* Get default funkit-supported checkout chains
|
|
20
20
|
*/
|
|
21
21
|
export declare const getDefaultChains: () => ({
|
|
22
|
+
id: number;
|
|
23
|
+
name: string;
|
|
24
|
+
nativeCurrency: {
|
|
25
|
+
symbol: string;
|
|
26
|
+
decimals: number;
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
29
|
+
rpcUrls: {
|
|
30
|
+
default: {
|
|
31
|
+
http: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
blockExplorers: {
|
|
35
|
+
default: {
|
|
36
|
+
name: string;
|
|
37
|
+
url: string;
|
|
38
|
+
apiUrl: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
contracts: {
|
|
42
|
+
ensRegistry: {
|
|
43
|
+
address: `0x${string}`;
|
|
44
|
+
};
|
|
45
|
+
ensUniversalResolver: {
|
|
46
|
+
address: `0x${string}`;
|
|
47
|
+
blockCreated: number;
|
|
48
|
+
};
|
|
49
|
+
multicall3: {
|
|
50
|
+
address: `0x${string}`;
|
|
51
|
+
blockCreated: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
} | {
|
|
22
55
|
blockExplorers: {
|
|
23
56
|
readonly default: {
|
|
24
57
|
readonly name: "Etherscan";
|
|
@@ -1041,39 +1074,6 @@ export declare const getDefaultChains: () => ({
|
|
|
1041
1074
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
1042
1075
|
formatters?: undefined;
|
|
1043
1076
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
1044
|
-
} | {
|
|
1045
|
-
id: number;
|
|
1046
|
-
name: string;
|
|
1047
|
-
nativeCurrency: {
|
|
1048
|
-
symbol: string;
|
|
1049
|
-
decimals: number;
|
|
1050
|
-
name: string;
|
|
1051
|
-
};
|
|
1052
|
-
rpcUrls: {
|
|
1053
|
-
default: {
|
|
1054
|
-
http: string[];
|
|
1055
|
-
};
|
|
1056
|
-
};
|
|
1057
|
-
blockExplorers: {
|
|
1058
|
-
default: {
|
|
1059
|
-
name: string;
|
|
1060
|
-
url: string;
|
|
1061
|
-
apiUrl: string;
|
|
1062
|
-
};
|
|
1063
|
-
};
|
|
1064
|
-
contracts: {
|
|
1065
|
-
ensRegistry: {
|
|
1066
|
-
address: `0x${string}`;
|
|
1067
|
-
};
|
|
1068
|
-
ensUniversalResolver: {
|
|
1069
|
-
address: `0x${string}`;
|
|
1070
|
-
blockCreated: number;
|
|
1071
|
-
};
|
|
1072
|
-
multicall3: {
|
|
1073
|
-
address: `0x${string}`;
|
|
1074
|
-
blockCreated: number;
|
|
1075
|
-
};
|
|
1076
|
-
};
|
|
1077
1077
|
} | {
|
|
1078
1078
|
blockExplorers: {
|
|
1079
1079
|
readonly default: {
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export declare const DEGEN_API_KEY = "m4iHIILHcL4gN8EXCMzGe8zIdhuCXxck49mWajzJ";
|
|
2
|
-
export declare const DYDX_API_KEY = "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
|
|
3
|
-
export declare const POLYMARKET_API_KEY = "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6";
|
|
4
|
-
export declare const DEV_API_KEY = "Z9SZaOwpmE40KX61mUKWm5hrpGh7WHVkaTvQJpQk";
|
|
5
1
|
export declare function isDydxCustomer(apiKey: string): apiKey is "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
|
|
6
2
|
export declare function isPolymarketCustomer(apiKey: string): apiKey is "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6";
|
|
7
3
|
export declare function isImportantCustomer(apiKey: string): apiKey is "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5" | "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const VERTICAL_SECTION_GAP = "18";
|
|
2
|
+
export declare const PROFILE_SIDE_PADDING = "18";
|
|
3
|
+
export declare const HOME_CHECKOUT_DISPLAY_ROW_HEIGHT = 52;
|
|
4
|
+
export declare const HOME_TOKEN_BALANCE_DISPLAY_ROW_HEIGHT = 52;
|
|
5
|
+
export declare const DEFAULT_ICON_SIZE = "24";
|
|
@@ -123,6 +123,7 @@ declare const themeContractValues: {
|
|
|
123
123
|
dialog: string;
|
|
124
124
|
selectedOption: string;
|
|
125
125
|
selectedWallet: string;
|
|
126
|
+
dropdown: string;
|
|
126
127
|
};
|
|
127
128
|
blurs: {
|
|
128
129
|
modalOverlay: string;
|
|
@@ -253,6 +254,7 @@ export declare const themeVars: {
|
|
|
253
254
|
dialog: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
254
255
|
selectedOption: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
255
256
|
selectedWallet: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
257
|
+
dropdown: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
256
258
|
};
|
|
257
259
|
blurs: {
|
|
258
260
|
modalOverlay: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -473,13 +475,13 @@ export declare const sprinkles: ((props: {
|
|
|
473
475
|
focused?: "accentColor" | "transparent" | "accentColorForeground" | "actionButtonBorder" | "connectButtonBackground" | "connectButtonBackgroundError" | "connectButtonText" | "connectButtonTextError" | "connectionIndicator" | "error" | "errorBackground" | "errorBorder" | "generalBorder" | "generalBorderDim" | "menuItemBackground" | "selectedOptionBorder" | "focusedOptionBorder" | "standby" | "success" | "chainIconBorder" | "modalBackdrop" | "modalBackground" | "modalBorder" | "notificationPrimary" | "offBackground" | "hoverState" | "lightStroke" | "mediumStroke" | "strokeColor" | "dydxSwitchActiveBackground" | "primaryText" | "secondaryText" | "tertiaryText" | "textSelection" | "inputBackground" | "inputBorderBase" | "inputBorderHover" | "actionColor" | "actionColorHover" | "actionColorDisabled" | "buttonPrimary" | "buttonDisabled" | "buttonWarning" | "buttonSuccess" | "buttonTextPrimary" | "buttonTextDisabled" | "buttonBackgroundTertiary" | "buttonBackgroundHoverTertiary" | "buttonTextTertiary" | "buttonTextDisabledTertiary" | "buttonStrokeTertiary" | "buttonBackground" | "buttonBackgroundHover" | "buttonBackgroundDisabled" | "buttonStroke" | "buttonTextSecondaryDisabled" | "buttonTextSecondary" | "buttonIconBackgroundHover" | "buttonIconBackgroundPressed" | "buttonIconStroke" | undefined;
|
|
474
476
|
focusedVisible?: "accentColor" | "transparent" | "accentColorForeground" | "actionButtonBorder" | "connectButtonBackground" | "connectButtonBackgroundError" | "connectButtonText" | "connectButtonTextError" | "connectionIndicator" | "error" | "errorBackground" | "errorBorder" | "generalBorder" | "generalBorderDim" | "menuItemBackground" | "selectedOptionBorder" | "focusedOptionBorder" | "standby" | "success" | "chainIconBorder" | "modalBackdrop" | "modalBackground" | "modalBorder" | "notificationPrimary" | "offBackground" | "hoverState" | "lightStroke" | "mediumStroke" | "strokeColor" | "dydxSwitchActiveBackground" | "primaryText" | "secondaryText" | "tertiaryText" | "textSelection" | "inputBackground" | "inputBorderBase" | "inputBorderHover" | "actionColor" | "actionColorHover" | "actionColorDisabled" | "buttonPrimary" | "buttonDisabled" | "buttonWarning" | "buttonSuccess" | "buttonTextPrimary" | "buttonTextDisabled" | "buttonBackgroundTertiary" | "buttonBackgroundHoverTertiary" | "buttonTextTertiary" | "buttonTextDisabledTertiary" | "buttonStrokeTertiary" | "buttonBackground" | "buttonBackgroundHover" | "buttonBackgroundDisabled" | "buttonStroke" | "buttonTextSecondaryDisabled" | "buttonTextSecondary" | "buttonIconBackgroundHover" | "buttonIconBackgroundPressed" | "buttonIconStroke" | undefined;
|
|
475
477
|
} | undefined;
|
|
476
|
-
boxShadow?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | {
|
|
477
|
-
base?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
478
|
-
hover?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
479
|
-
active?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
480
|
-
selection?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
481
|
-
focused?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
482
|
-
focusedVisible?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | undefined;
|
|
478
|
+
boxShadow?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | {
|
|
479
|
+
base?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
480
|
+
hover?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
481
|
+
active?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
482
|
+
selection?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
483
|
+
focused?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
484
|
+
focusedVisible?: "connectButton" | "dialog" | "selectedOption" | "selectedWallet" | "dropdown" | undefined;
|
|
483
485
|
} | undefined;
|
|
484
486
|
color?: "accentColor" | "transparent" | "accentColorForeground" | "actionButtonBorder" | "connectButtonBackground" | "connectButtonBackgroundError" | "connectButtonText" | "connectButtonTextError" | "connectionIndicator" | "error" | "errorBackground" | "errorBorder" | "generalBorder" | "generalBorderDim" | "menuItemBackground" | "selectedOptionBorder" | "focusedOptionBorder" | "standby" | "success" | "chainIconBorder" | "modalBackdrop" | "modalBackground" | "modalBorder" | "notificationPrimary" | "offBackground" | "hoverState" | "lightStroke" | "mediumStroke" | "strokeColor" | "dydxSwitchActiveBackground" | "primaryText" | "secondaryText" | "tertiaryText" | "textSelection" | "inputBackground" | "inputBorderBase" | "inputBorderHover" | "actionColor" | "actionColorHover" | "actionColorDisabled" | "buttonPrimary" | "buttonDisabled" | "buttonWarning" | "buttonSuccess" | "buttonTextPrimary" | "buttonTextDisabled" | "buttonBackgroundTertiary" | "buttonBackgroundHoverTertiary" | "buttonTextTertiary" | "buttonTextDisabledTertiary" | "buttonStrokeTertiary" | "buttonBackground" | "buttonBackgroundHover" | "buttonBackgroundDisabled" | "buttonStroke" | "buttonTextSecondaryDisabled" | "buttonTextSecondary" | "buttonIconBackgroundHover" | "buttonIconBackgroundPressed" | "buttonIconStroke" | {
|
|
485
487
|
base?: "accentColor" | "transparent" | "accentColorForeground" | "actionButtonBorder" | "connectButtonBackground" | "connectButtonBackgroundError" | "connectButtonText" | "connectButtonTextError" | "connectionIndicator" | "error" | "errorBackground" | "errorBorder" | "generalBorder" | "generalBorderDim" | "menuItemBackground" | "selectedOptionBorder" | "focusedOptionBorder" | "standby" | "success" | "chainIconBorder" | "modalBackdrop" | "modalBackground" | "modalBorder" | "notificationPrimary" | "offBackground" | "hoverState" | "lightStroke" | "mediumStroke" | "strokeColor" | "dydxSwitchActiveBackground" | "primaryText" | "secondaryText" | "tertiaryText" | "textSelection" | "inputBackground" | "inputBorderBase" | "inputBorderHover" | "actionColor" | "actionColorHover" | "actionColorDisabled" | "buttonPrimary" | "buttonDisabled" | "buttonWarning" | "buttonSuccess" | "buttonTextPrimary" | "buttonTextDisabled" | "buttonBackgroundTertiary" | "buttonBackgroundHoverTertiary" | "buttonTextTertiary" | "buttonTextDisabledTertiary" | "buttonStrokeTertiary" | "buttonBackground" | "buttonBackgroundHover" | "buttonBackgroundDisabled" | "buttonStroke" | "buttonTextSecondaryDisabled" | "buttonTextSecondary" | "buttonIconBackgroundHover" | "buttonIconBackgroundPressed" | "buttonIconStroke" | undefined;
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Make sure it is SERIALIZABLE and BACKWARD COMPATIBLE!!
|
|
6
6
|
*/
|
|
7
|
-
import type { FunkitActiveCheckoutItem, FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
8
7
|
import type { ApiCheckoutClientMetadata } from '@funkit/api-base';
|
|
9
|
-
|
|
8
|
+
import type { FunkitActiveCheckoutItem, FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
9
|
+
import type { FunkitCheckoutQuoteResult } from './quote';
|
|
10
|
+
/**
|
|
11
|
+
* Historical Checkout Configuration stored in the server
|
|
10
12
|
* This is similar to FunkitCheckoutConfig but with some fields changed to serializable types
|
|
11
13
|
* */
|
|
12
14
|
export type ServerCheckoutConfig = Omit<FunkitCheckoutConfig, 'generateActionsParams'> & {
|
|
@@ -33,5 +35,5 @@ export interface HistoricalCheckoutItem {
|
|
|
33
35
|
* Sanitizes checkoutItem to generate a clientMetadata object to be saved in backend.
|
|
34
36
|
* Ensures that no react components get sent to backend and the object isn't too big as well.
|
|
35
37
|
*/
|
|
36
|
-
export declare function generateClientMetadataForBackend(checkoutItem: FunkitActiveCheckoutItem): ApiCheckoutClientMetadata;
|
|
38
|
+
export declare function generateClientMetadataForBackend(checkoutItem: FunkitActiveCheckoutItem, quote: FunkitCheckoutQuoteResult): ApiCheckoutClientMetadata;
|
|
37
39
|
export declare function generateClientMetadataForTokenTransfer(): HistoricalCheckoutItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PaymentMethod } from './paymentMethods';
|
|
2
|
+
export declare const L1_FEES_ESTIMATE = 20;
|
|
3
|
+
export declare const L2_FEES_ESTIMATE = 1;
|
|
4
|
+
export declare const MESH_L1_FEES_ESTIMATE = 8;
|
|
5
|
+
export declare const MESH_L2_FEES_ESTIMATE = 2;
|
|
6
|
+
export declare const MESH_CUSTOM_CLIENT_FEE_PERCENT = 0.055;
|
|
7
|
+
/**
|
|
8
|
+
* Estimating overall fees
|
|
9
|
+
*/
|
|
10
|
+
export declare const getFeesUsdEstimate: (targetChainId: string, assetChainId: string, assetUsdAmount: number | null, paymentMethod: PaymentMethod | undefined) => number;
|
|
@@ -35,6 +35,7 @@ export interface PaymentMethodAccountInfo extends PaymentMethodInfoBase {
|
|
|
35
35
|
export interface PaymentMethodTokenTransferInfo extends PaymentMethodInfoBase {
|
|
36
36
|
paymentMethod: PaymentMethod.TOKEN_TRANSFER;
|
|
37
37
|
}
|
|
38
|
+
export type ConnectablePaymentMethodInfo = PaymentMethodAccountInfo | PaymentMethodBrokerageInfo;
|
|
38
39
|
export type PaymentMethodInfo = PaymentMethodCardInfo | PaymentMethodBrokerageInfo | PaymentMethodAccountInfo | PaymentMethodTokenTransferInfo;
|
|
39
40
|
interface CardPaymentMethodParams {
|
|
40
41
|
paymentMethod: PaymentMethod.CARD;
|
package/dist/domains/quote.d.ts
CHANGED
|
@@ -23,3 +23,8 @@ export interface CheckoutQuoteParams {
|
|
|
23
23
|
loginType: LoginType;
|
|
24
24
|
enableFrogProxyServer?: boolean;
|
|
25
25
|
}
|
|
26
|
+
export declare function getQuoteAndEstimation({ checkoutItem, userId, walletAddress, apiKey, sponsorInitialTransferGasLimit, newPaymentMethodInfo, wagmiConfig, loginType, enableFrogProxyServer, }: CheckoutQuoteParams): Promise<{
|
|
27
|
+
baseQuote: CheckoutQuoteResponse;
|
|
28
|
+
finalEstimation: FunkitCheckoutQuoteResult;
|
|
29
|
+
availableAssetAmount: number | undefined;
|
|
30
|
+
}>;
|
package/dist/domains/wallet.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ export interface AssetHoldingsMap {
|
|
|
14
14
|
[symbol: string]: AssetHoldingsItem;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* @returns formatted max usable USD balance from a given assets map
|
|
17
|
+
* @returns formatted max usable USD balance from a given assets map
|
|
18
|
+
*/
|
|
18
19
|
export declare function getTotalAssetBalance(assets: AssetHoldingsMap): number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function useCheckoutQuoteNotification(): {
|
|
2
|
-
|
|
2
|
+
quoteNotification: {
|
|
3
3
|
readonly messageType: "error";
|
|
4
4
|
readonly quoteMessage: string;
|
|
5
5
|
} | {
|
|
@@ -9,5 +9,5 @@ export declare function useCheckoutQuoteNotification(): {
|
|
|
9
9
|
readonly messageType: "none";
|
|
10
10
|
readonly quoteMessage: undefined;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
clearCheckoutQuoteMessages: () => void;
|
|
13
13
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PaymentMethod } from '~/domains/paymentMethods';
|
|
2
|
+
/**
|
|
3
|
+
* https://linear.app/funxyz/issue/ENG-1154/update-dydx-and-polymarkets-time-estimate
|
|
4
|
+
* https://linear.app/funxyz/issue/PE-775/sdkconnectwith-next-pm-requests
|
|
5
|
+
* @returns time estimation in seconds
|
|
6
|
+
*/
|
|
7
|
+
export declare function useCheckoutTimeEstimate(originalTimeEstimationMs: number | undefined, paymentMethod?: PaymentMethod): number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ConnectablePaymentMethodInfo, PaymentMethod } from '~/domains/paymentMethods';
|
|
2
|
+
export declare const usePaymentSources: (paymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string) => {
|
|
3
|
+
preferred: (import("~/domains/paymentMethods").PaymentMethodBrokerageInfo | import("~/domains/paymentMethods").PaymentMethodAccountInfo)[] | PaymentMethod[];
|
|
4
|
+
moreSources: PaymentMethod[];
|
|
5
|
+
};
|
|
6
|
+
export declare const useRemainingPaymentSourcesCount: (targetChainId: string) => number;
|