@funkit/connect 5.5.13-next.0 → 5.5.13-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/components/AnimatedDollarValue/AnimatedDollarValue.d.ts +1 -0
  3. package/dist/components/Dropdown/ChainDropdown.d.ts +3 -1
  4. package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +5 -2
  5. package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +1 -2
  6. package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +1 -2
  7. package/dist/components/Withdraw/WithdrawContent.d.ts +5 -3
  8. package/dist/hooks/queries/useWithdrawalRisk.d.ts +1 -0
  9. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +1 -0
  10. package/dist/hooks/useCheckoutTransferInit.d.ts +4 -2
  11. package/dist/hooks/useTokenChain.d.ts +3 -1
  12. package/dist/hooks/useTokenTransfer.d.ts +4 -1
  13. package/dist/hooks/useWithdrawal.d.ts +15 -0
  14. package/dist/index.js +12185 -12095
  15. package/dist/modals/CheckoutModal/ConfirmationStep/usePostCheckout.d.ts +1 -0
  16. package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +1 -0
  17. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +6 -2
  18. package/dist/modals/CheckoutModal/SelectAsset.d.ts +1 -0
  19. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +7 -2
  20. package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +1 -0
  21. package/dist/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.d.ts +1 -0
  22. package/dist/utils/directExecution.d.ts +2 -4
  23. package/dist/utils/flags/config.d.ts +8 -12
  24. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  25. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  26. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  27. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  28. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  29. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  30. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  31. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  32. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  33. package/dist/wallets/walletConnectors/index.js +61 -61
  34. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  35. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  36. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  37. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  38. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  39. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  40. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  42. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  43. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 5.5.13-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e88a3d2: feat(connect): adjust auto-picking of provider quotes for Meld
8
+ - 0bf9fe3: feat(connect): update colors of tooltip texts for Withdrawal
9
+ - bd7721e: feat(connect): withdrawal handle wallet signature rejection
10
+ - 3d7fc1d: fix bridge fee in ui
11
+ - 85809cb: feat(connect): add risk assessment check for withdrawal address
12
+ - 5217122: feat: omit eoa calls in withdrawal flow
13
+ - cdf268c: refactor: rename fill gas to fill cost
14
+ - 3c8d98d: feat(connect): if the user is new, default to the Payment Methods screen, hide the SourcePaymentMethodItem, and enable the back button
15
+ - b095215: feat(connect): unify rendering of fees for withdrawal with relay
16
+ - 66b28fe: fix: update asset price refresh interval in withdrawal
17
+ - 6db3c9c: add loading state to withdrawal in progress
18
+ - e389c2b: wider price impact tooltip
19
+ - e3bba71: feat(connect): transfer crypto - minimum amount info"
20
+ - Updated dependencies [f49824b]
21
+ - Updated dependencies [57f6bd8]
22
+ - Updated dependencies [b223027]
23
+ - @funkit/fun-relay@0.1.9-next.1
24
+ - @funkit/api-base@1.9.5-next.1
25
+ - @funkit/core@2.3.27-next.1
26
+ - @funkit/wagmi-tools@3.0.49-next.1
27
+
3
28
  ## 5.5.13-next.0
4
29
 
5
30
  ### Patch Changes
@@ -2,6 +2,7 @@ import { type NumberFlowProps, type NumberFlowElement } from '@number-flow/react
2
2
  import React from 'react';
3
3
  type AnimatedDollarValueProps = Omit<NumberFlowProps, 'format'> & {
4
4
  ref?: React.Ref<NumberFlowElement>;
5
+ dynamicMinFractionDigits?: boolean;
5
6
  };
6
7
  export declare const AnimatedDollarValue: React.ForwardRefExoticComponent<Omit<AnimatedDollarValueProps, "ref"> & React.RefAttributes<NumberFlowElement>>;
7
8
  export {};
@@ -15,10 +15,12 @@ interface ChainDropdownProps {
15
15
  allowUnselect?: boolean;
16
16
  activeItemProps?: BaseDropdownProps['activeItemProps'];
17
17
  openDropdownBackgroundColor?: BaseDropdownProps['openDropdownBackgroundColor'];
18
+ openDropdownFullWidth?: BaseDropdownProps['openDropdownFullWidth'];
18
19
  size?: BaseActiveDropdownItemProps['size'];
19
20
  isLoading?: BaseDropdownProps['isLoading'];
20
21
  alwaysOpenToTop?: BaseDropdownProps['alwaysOpenToTop'];
21
22
  maxDropdownHeight?: BaseDropdownProps['maxDropdownHeight'];
23
+ tagComponent?: (value: string) => React.ReactNode;
22
24
  }
23
- export declare const ChainDropdown: ({ assets, chainIds: chains, selectedChainId: propSelectedChainId, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, isLoading, alwaysOpenToTop, maxDropdownHeight, }: ChainDropdownProps) => React.JSX.Element;
25
+ export declare const ChainDropdown: ({ assets, chainIds: chains, selectedChainId: propSelectedChainId, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, openDropdownFullWidth, isLoading, alwaysOpenToTop, maxDropdownHeight, tagComponent, }: ChainDropdownProps) => React.JSX.Element;
24
26
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type ReactNode } from 'react';
2
2
  import type { TokenTransferSourceChainsAndAssets } from '~/modals/CheckoutModal/TransferToken/TransferToken';
3
3
  import type { BaseDropdownProps } from './BaseDropdown';
4
4
  interface TokenAndChainDropdownProps {
@@ -16,10 +16,13 @@ interface TokenAndChainDropdownProps {
16
16
  onChainSelected: (chainId?: number, autoUpdate?: boolean) => void;
17
17
  tokenLabel?: string;
18
18
  chainLabel?: string;
19
+ chainLabelAddon?: ReactNode;
19
20
  alwaysOpenToTop?: boolean;
20
21
  maxTokenDropdownHeight?: BaseDropdownProps['maxDropdownHeight'];
21
22
  maxChainDropdownHeight?: BaseDropdownProps['maxDropdownHeight'];
23
+ openChainDropdownFullWidth?: BaseDropdownProps['openDropdownFullWidth'];
24
+ chainTagComponent?: (value: string) => ReactNode;
22
25
  }
23
26
  /** Combines together chain and token dropdowns */
24
- export declare const TokenAndChainDropdown: ({ isLoading, selectedToken, selectedChainId, assets, onTokenSelected, onChainSelected, tokenLabel, chainLabel, alwaysOpenToTop, maxTokenDropdownHeight, maxChainDropdownHeight, }: TokenAndChainDropdownProps) => React.JSX.Element;
27
+ export declare const TokenAndChainDropdown: ({ isLoading, selectedToken, selectedChainId, assets, onTokenSelected, onChainSelected, tokenLabel, chainLabel, chainLabelAddon, alwaysOpenToTop, maxTokenDropdownHeight, maxChainDropdownHeight, openChainDropdownFullWidth, chainTagComponent, }: TokenAndChainDropdownProps) => React.JSX.Element;
25
28
  export {};
@@ -6,7 +6,6 @@ interface PaymentFeesSummaryProps {
6
6
  quote: FunkitCheckoutQuoteResult | null | undefined;
7
7
  /** If set and quote is missing, display fees based on this data */
8
8
  fallbackFees?: CheckoutFees;
9
- showWithdrawalBreakdown?: boolean;
10
9
  }
11
- export declare function PaymentFeesSummary({ isLoading, quote, fallbackFees, showWithdrawalBreakdown, }: PaymentFeesSummaryProps): React.JSX.Element;
10
+ export declare function PaymentFeesSummary({ isLoading, quote, fallbackFees, }: PaymentFeesSummaryProps): React.JSX.Element;
12
11
  export {};
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { FeeValue } from '~/hooks/useTokenTransfer';
3
3
  interface TransferTokenDetailsProps {
4
- minAmount?: number;
5
4
  disabled?: boolean;
6
5
  estPriceImpact: FeeValue | undefined;
7
6
  maxSlippage: FeeValue | undefined;
8
7
  }
9
- export declare const TransferTokenDetails: ({ minAmount, disabled, estPriceImpact, maxSlippage, }: TransferTokenDetailsProps) => React.JSX.Element;
8
+ export declare const TransferTokenDetails: ({ disabled, estPriceImpact, maxSlippage, }: TransferTokenDetailsProps) => React.JSX.Element;
10
9
  export {};
@@ -1,7 +1,8 @@
1
1
  import { type CheckoutQuoteResponse } from '@funkit/utils';
2
2
  import React from 'react';
3
+ import { type Hex } from 'viem';
3
4
  import type { Address } from 'viem';
4
- import type { FunkitWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
5
+ import type { FunkitActiveWithdrawalItem, FunkitWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
5
6
  export type WithdrawalFormData = {
6
7
  destinationAddress: Address;
7
8
  amount: string;
@@ -10,8 +11,9 @@ export type WithdrawalFormData = {
10
11
  quote: CheckoutQuoteResponse;
11
12
  };
12
13
  interface WithdrawContentProps {
13
- onContinue: (withdrawal: WithdrawalFormData) => void;
14
+ onContinue: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
14
15
  config: FunkitWithdrawalConfig;
16
+ withdrawalItem: FunkitActiveWithdrawalItem | null;
15
17
  }
16
- export declare const WithdrawContent: ({ onContinue, config, }: WithdrawContentProps) => React.JSX.Element;
18
+ export declare const WithdrawContent: ({ onContinue, config, withdrawalItem, }: WithdrawContentProps) => React.JSX.Element;
17
19
  export {};
@@ -0,0 +1 @@
1
+ export declare const useWithdrawalRisk: (apiKey: string, receiveAddress: string) => import("@tanstack/react-query").UseQueryResult<boolean, Error>;
@@ -1,5 +1,6 @@
1
1
  import { CheckoutRefundState, CheckoutState, type DirectExecution, RelayExecutionStatus } from '@funkit/api-base';
2
2
  export declare function mapRelayExecutionStatusToCheckoutState(status: RelayExecutionStatus): CheckoutState;
3
+ export declare function mapRelayExecutionStatusToRefundState(status: RelayExecutionStatus): CheckoutRefundState | undefined;
3
4
  export declare function useCheckoutDirectExecutionHistory({ initDirectExecution, }: {
4
5
  initDirectExecution?: DirectExecution;
5
6
  }): {
@@ -1,8 +1,10 @@
1
1
  import { type CheckoutInitTokenTransferResponse, type FunAddress } from '@funkit/api-base';
2
- import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
3
2
  interface UseCheckoutTransferInitResponse {
4
3
  transferInit: CheckoutInitTokenTransferResponse | undefined;
5
4
  recipientAddr: FunAddress;
6
5
  }
7
- export declare const useCheckoutTransferInit: (checkoutConfig: FunkitCheckoutConfig | undefined) => UseCheckoutTransferInitResponse;
6
+ /**
7
+ * creates QR code transfer EOA
8
+ */
9
+ export declare const useCheckoutTransferInit: () => UseCheckoutTransferInitResponse;
8
10
  export {};
@@ -1,3 +1,4 @@
1
+ import type { CheckoutInitTokenTransferResponse } from '@funkit/api-base';
1
2
  import type { TokenTransferSourceChainsAndAssets } from '~/modals/CheckoutModal/TransferToken/TransferToken';
2
3
  export type TransferTokenDefault = {
3
4
  token: string;
@@ -13,6 +14,7 @@ interface UseTokenChainResult {
13
14
  /**
14
15
  * Semi reusable hook (tied into token transfer configuration)
15
16
  * ensures token&chain dropdown preselection logic is reusable
17
+ * @param transferInit - used for chain&token solana filtering, can be omitted if not needed
16
18
  */
17
- export declare const useTokenAndChainSelection: (defaultValues?: TransferTokenDefault) => UseTokenChainResult;
19
+ export declare const useTokenAndChainSelection: (transferInit: CheckoutInitTokenTransferResponse | undefined, defaultValues?: TransferTokenDefault) => UseTokenChainResult;
18
20
  export {};
@@ -10,9 +10,12 @@ interface UseTokenTransferResult {
10
10
  /** the final destination of the money */
11
11
  recipientAddr: string;
12
12
  minTransferUsd: number;
13
+ minTransferUsdPerChain: {
14
+ [chainId: string]: number;
15
+ };
13
16
  showOriginalRecipient: boolean;
14
17
  estPriceImpact: FeeValue | undefined;
15
18
  maxSlippage: FeeValue | undefined;
16
19
  }
17
- export declare const useTokenTransfer: (selectedChainId: number, selectedToken: string) => UseTokenTransferResult;
20
+ export declare const useTokenTransfer: (selectedChainId: number, selectedToken: string, chainIds?: number[]) => UseTokenTransferResult;
18
21
  export {};
@@ -0,0 +1,15 @@
1
+ import type { Hex } from 'viem';
2
+ import type { WithdrawalFormData } from '~/components/Withdraw/WithdrawContent';
3
+ import type { FunkitActiveWithdrawalItem } from '~/providers/FunkitCheckoutContext';
4
+ import type { WithdrawalClient } from '~/wallets/Wallet';
5
+ interface UseWithdrawalResult {
6
+ handleWithdrawal: (withdrawal: WithdrawalFormData) => Promise<void>;
7
+ isWithdrawing: boolean;
8
+ }
9
+ export declare function useWithdrawal({ withdrawalWallet, withdrawalItem, onSuccess, onError, }: {
10
+ withdrawalWallet: WithdrawalClient;
11
+ withdrawalItem: FunkitActiveWithdrawalItem | null;
12
+ onSuccess: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
13
+ onError: (error: Error) => void;
14
+ }): UseWithdrawalResult;
15
+ export {};