@funkit/connect 12.6.0 → 12.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/__private__/index.d.ts +3 -0
  3. package/dist/clients/{chunk-F36IJA7V.js → chunk-4OOCXIMA.js} +1 -1
  4. package/dist/clients/chunk-I5GSXPFE.js +182 -0
  5. package/dist/clients/{chunk-IAIRECDV.js → chunk-R6E3NH5A.js} +1 -1
  6. package/dist/clients/{chunk-VE6QD5IM.js → chunk-RAJJSGNT.js} +1 -1
  7. package/dist/clients/chunk-YD27ZAJB.js +296 -0
  8. package/dist/clients/internal/nado/withdrawalCallback.js +3 -3
  9. package/dist/clients/internal/nado/withdrawalForm.css +81 -81
  10. package/dist/clients/internal/nado/withdrawalForm.js +3 -2
  11. package/dist/clients/lighter.css +81 -81
  12. package/dist/clients/lighter.js +1 -1
  13. package/dist/clients/nado.js +3 -3
  14. package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
  15. package/dist/clients/polymarket/index.js +3 -3
  16. package/dist/clients/polymarket/polymarket.js +2 -2
  17. package/dist/components/ModalHeightAnimationLayer/FunCheckoutModalHeightAnimationWrapper.d.ts +1 -1
  18. package/dist/consts/bluvo.d.ts +7 -19
  19. package/dist/consts/centralExchange.d.ts +2 -0
  20. package/dist/hooks/useExchangeOptions.d.ts +9 -4
  21. package/dist/index.css +159 -159
  22. package/dist/index.d.ts +3 -1
  23. package/dist/index.js +21442 -21351
  24. package/dist/interfaces/solanaWallet.d.ts +5 -0
  25. package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +2 -1
  26. package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +2 -1
  27. package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +2 -1
  28. package/dist/modals/CheckoutModal/CheckoutComplete/CheckoutComplete.d.ts +2 -1
  29. package/dist/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.d.ts +2 -1
  30. package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +2 -1
  31. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +2 -1
  32. package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +2 -1
  33. package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoice.d.ts +2 -1
  34. package/dist/modals/CheckoutModal/LoadingAccount.d.ts +2 -1
  35. package/dist/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.d.ts +2 -1
  36. package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +2 -1
  37. package/dist/modals/CheckoutModal/MeldRedirect/MeldRedirect.d.ts +2 -1
  38. package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +2 -1
  39. package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +2 -1
  40. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeController.d.ts +2 -1
  41. package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +2 -1
  42. package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeCustomer.d.ts +2 -1
  43. package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeKyc.d.ts +2 -1
  44. package/dist/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen.d.ts +2 -1
  45. package/dist/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.d.ts +2 -1
  46. package/dist/modals/CheckoutModal/VirtualFiatAccount/KycIframe.d.ts +2 -1
  47. package/dist/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount.d.ts +2 -1
  48. package/dist/modals/CheckoutModal/Withdrawal/WithdrawalComplete.d.ts +2 -1
  49. package/dist/modals/CheckoutModal/Withdrawal/WithdrawalEnterAmount.d.ts +2 -1
  50. package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -13
  51. package/dist/modals/CheckoutModal/stepTransition.shared.d.ts +16 -0
  52. package/dist/modals/WithdrawalModal/ErrorMessage.d.ts +2 -2
  53. package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +4 -2
  54. package/dist/modals/WithdrawalModal/withdrawalHooks.d.ts +3 -1
  55. package/dist/providers/FunkitQuoteContext.d.ts +7 -4
  56. package/dist/shadow-css.js +1 -1
  57. package/dist/utils/solanaRelayWallet.d.ts +13 -5
  58. package/dist/wallets/Wallet.d.ts +9 -0
  59. package/dist/wallets/solanaWithdrawal.d.ts +17 -0
  60. package/dist/wallets/walletConnectors/index.js +30 -30
  61. package/package.json +12 -6
  62. package/dist/clients/chunk-PENJ5JGH.js +0 -331
  63. package/dist/components/FunPayments/icons/gemini.d.ts +0 -5
  64. package/dist/components/Icons/GeminiIcon.d.ts +0 -4
@@ -33,4 +33,9 @@ interface SolanaWalletBase {
33
33
  * At least one signing method is required.
34
34
  */
35
35
  export type SolanaWalletConnection = SolanaWalletBase & SolanaSigner;
36
+ /**
37
+ * The subset a signing-only flow needs: where to submit and how to sign. A
38
+ * full {@link SolanaWalletConnection} satisfies it.
39
+ */
40
+ export type SolanaWalletSigner = Pick<SolanaWalletBase, 'address' | 'connection'> & SolanaSigner;
36
41
  export {};
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import type { Address } from 'viem';
3
3
  import type { BluvoExchangeInfo } from '../../../consts/bluvo';
4
4
  import type { PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
5
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
6
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
7
  export type BrokerageTwoFAState = CheckoutModalCommonState & {
7
8
  paymentMethodInfo: PaymentMethodBrokerageInfo;
8
9
  };
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { type BluvoExchangeType } from '../../../consts/bluvo';
3
3
  import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
4
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
5
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
6
  export type ConnectExchangeState = CheckoutModalCommonState & {
6
7
  brokerType: BluvoExchangeType;
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { type BluvoExchangeType } from '../../../consts/bluvo';
3
3
  import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
4
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
5
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
6
  export type SelectBrokerageState = CheckoutModalCommonState;
6
7
  export type SelectBrokerageNext = {
7
8
  hasActiveConnection: true;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { Address } from 'viem';
3
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
3
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
4
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
5
  export type CheckoutCompleteState = CheckoutModalCommonState & {
5
6
  depositAddress: Address;
6
7
  };
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { Address } from 'viem';
3
3
  import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
4
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
5
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
6
  export type ConfirmationStepState = CheckoutModalCommonState & {
6
7
  paymentMethodInfo: PaymentMethodInfo;
7
8
  };
@@ -2,7 +2,8 @@ import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  import type { Hex } from 'viem';
4
4
  import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
5
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
6
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
7
  import { type AmountSelection } from './state';
7
8
  export type InputAmountState = CheckoutModalCommonState & {
8
9
  paymentMethodInfo: PaymentMethodInfo;
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import { type FunkitTextCustomizationsConfig } from '../../../providers/FunkitConfigContext';
3
3
  import type { AssetHoldingsItem } from '../../../utils/assets';
4
4
  import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
5
- import { FunCheckoutStep, type ModalStepComponentProps } from '../stepTransition';
5
+ import { FunCheckoutStep } from '../stepTransition.shared';
6
+ import { type ModalStepComponentProps } from '../stepTransition';
6
7
  interface InputAmountLoadedProps extends ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT> {
7
8
  sourceHolding: AssetHoldingsItem | null;
8
9
  checkoutConfig: FunkitCheckoutConfig;
@@ -1,7 +1,8 @@
1
1
  import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
4
- import { FunCheckoutStep, type NextPayload } from '../stepTransition';
4
+ import { FunCheckoutStep } from '../stepTransition.shared';
5
+ import { type NextPayload } from '../stepTransition';
5
6
  export declare function useMeldUI({ meldEnabled, manuallySelectedQuote, fiatAmount, fiatCurrency, onNext, }: {
6
7
  meldEnabled: boolean;
7
8
  manuallySelectedQuote: MeldQuote | undefined;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type PaymentMethodBitcoinLightningInfo, type PaymentMethodCashAppLightningInfo } from '../../../domains/paymentMethods';
3
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
3
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
4
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
5
  export type LightningInvoiceState = CheckoutModalCommonState & {
5
6
  paymentMethodInfo: PaymentMethodBitcoinLightningInfo | PaymentMethodCashAppLightningInfo;
6
7
  };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
3
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
3
+ import { type CheckoutModalCommonState, FunCheckoutStep } from './stepTransition.shared';
4
+ import { type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
4
5
  export type LoadingAccountState = CheckoutModalCommonState;
5
6
  export type LoadingAccountNext = {
6
7
  chosenPaymentMethod: PaymentMethod.ACCOUNT_BALANCE;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
3
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
3
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
4
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
5
  export type MeldCurrencySelectState = CheckoutModalCommonState & {
5
6
  defaultCurrency: string;
6
7
  paymentMethodInfo: PaymentMethodCardInfo;
@@ -1,7 +1,8 @@
1
1
  import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
4
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
5
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
6
  import type { AmountSelection } from '../InputAmount/state';
6
7
  export type MeldQuotesState = CheckoutModalCommonState & {
7
8
  paymentMethodInfo: PaymentMethodCardInfo;
@@ -2,7 +2,8 @@ import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
4
4
  import type { AmountSelection } from '../InputAmount/state';
5
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
6
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
7
  export type MeldRedirectState = CheckoutModalCommonState & {
7
8
  amountSelection?: AmountSelection;
8
9
  paymentMethodInfo: PaymentMethodCardInfo;
@@ -4,7 +4,8 @@ import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '
4
4
  import type { AssetHoldingsItem } from '../../../domains/wallet';
5
5
  import type { TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
6
6
  import { type DynamicTargetAssetCandidate } from '../../../providers/FunkitCheckoutContext';
7
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
7
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
8
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
8
9
  export type SelectAssetState = CheckoutModalCommonState & {
9
10
  paymentMethodInfo: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
10
11
  };
@@ -5,7 +5,8 @@ import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodBit
5
5
  import type { FunkitCheckoutQuoteResult } from '../../../domains/quote';
6
6
  import { type PaymentMethodType } from '../../../hooks/usePaymentSources';
7
7
  import { type CustomWithdrawalConfig, type WalletWithdrawalConfig } from '../../../providers/FunkitCheckoutContext';
8
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
8
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
9
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
9
10
  import type { SwappedMode } from '../../../providers/SwappedProvider';
10
11
  export type SourceChangeState = CheckoutModalCommonState & {
11
12
  paymentMethodInfo: ConnectablePaymentMethodInfo | null;
@@ -1,7 +1,8 @@
1
1
  import type { SwappedFormOfPayment } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
4
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
4
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../../../modals/CheckoutModal/stepTransition.shared';
5
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
5
6
  import { type SwappedMode } from '../../../providers/SwappedProvider';
6
7
  export type SwappedIframeState = CheckoutModalCommonState & {
7
8
  /** The selected payment option from the fops API */
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
3
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
3
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
4
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
5
  export type TransferTokenState = CheckoutModalCommonState & {
5
6
  transferToken?: TransferTokenDefault;
6
7
  };
@@ -1,5 +1,6 @@
1
1
  import type { PaymentMethodVirtualBankIncompleteInfo } from '../../../domains/paymentMethods';
2
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
2
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../../../modals/CheckoutModal/stepTransition.shared';
3
+ import { type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
3
4
  export type BridgeCustomerNext = {
4
5
  hasError?: false;
5
6
  kycLink: string;
@@ -1,5 +1,6 @@
1
1
  import { type BridgeCustomer, type BridgeVirtualBankAccount, type Guid } from '@funkit/api-base';
2
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
2
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../../../modals/CheckoutModal/stepTransition.shared';
3
+ import { type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
3
4
  export declare enum NextStep {
4
5
  ShowSource = "ShowSource",
5
6
  ShowKyc = "ShowKyc",
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
2
+ import { CheckoutModalCommonState, FunCheckoutStep } from '../../../modals/CheckoutModal/stepTransition.shared';
3
+ import { type ModalStepComponentProps, ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
3
4
  export type ErrorScreenState = CheckoutModalCommonState & {
4
5
  errorCode: string;
5
6
  };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type PaymentMethodVirtualBankInfo } from '../../../domains/paymentMethods';
3
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
3
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
4
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
4
5
  export type FiatAccountDetailState = CheckoutModalCommonState & {
5
6
  paymentMethodInfo: PaymentMethodVirtualBankInfo;
6
7
  };
@@ -1,5 +1,6 @@
1
1
  import { type KycLinkLoad } from '../../../hooks/useFrogAccount';
2
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
2
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../../../modals/CheckoutModal/stepTransition.shared';
3
+ import { type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
3
4
  export type KycIframeState = CheckoutModalCommonState & KycLinkLoad;
4
5
  export type KycIframeNext = Record<string, never>;
5
6
  export declare const KycIframeInfo: ModalStepInfo<FunCheckoutStep.KYC_IFRAME>;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { PaymentMethodVirtualBankIncompleteInfo } from '../../../domains/paymentMethods';
3
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
3
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../../../modals/CheckoutModal/stepTransition.shared';
4
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
4
5
  export type VirtualFiatAccountNext = Record<string, never>;
5
6
  export type VirtualFiatAccountState = CheckoutModalCommonState & {
6
7
  paymentMethodInfo: PaymentMethodVirtualBankIncompleteInfo;
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import type { Hex } from 'viem';
3
3
  import type { FunkitCheckoutQuoteResult } from '../../../domains/quote';
4
4
  import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '../../../providers/FunkitCheckoutContext';
5
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
6
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
7
  export type WithdrawalCompleteState = CheckoutModalCommonState & {
7
8
  withdrawalConfig: WalletWithdrawalConfig | CustomWithdrawalConfig;
8
9
  hash: Hex;
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import type { Hex } from 'viem';
3
3
  import type { FunkitCheckoutQuoteResult } from '../../../domains/quote';
4
4
  import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '../../../providers/FunkitCheckoutContext';
5
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
5
+ import { type CheckoutModalCommonState, FunCheckoutStep } from '../stepTransition.shared';
6
+ import { type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
6
7
  export type WithdrawalEnterAmountState = CheckoutModalCommonState & {
7
8
  withdrawalConfig: WalletWithdrawalConfig | CustomWithdrawalConfig;
8
9
  };
@@ -27,18 +27,7 @@ import { type FiatAccountDetailNext, type FiatAccountDetailState } from './Virtu
27
27
  import { type KycIframeNext, type KycIframeState } from './VirtualFiatAccount/KycIframe';
28
28
  import { type WithdrawalCompleteNext, type WithdrawalCompleteState } from './Withdrawal/WithdrawalComplete';
29
29
  import { type WithdrawalEnterAmountNext, type WithdrawalEnterAmountState } from './Withdrawal/WithdrawalEnterAmount';
30
- export { FunCheckoutStep };
31
- export interface CheckoutModalCommonState {
32
- checkoutId: string;
33
- /** Handles soft hiding of the dialog (without removing it from the DOM) */
34
- isSoftHidden: boolean;
35
- /** Whether checkout should not be allowed to continue due to security reasons*/
36
- isBlocked?: boolean;
37
- startingStep: FunCheckoutStartingStep;
38
- targetChainId: string;
39
- showWalletOptions?: boolean;
40
- hideBottomDivider: boolean;
41
- }
30
+ export { type CheckoutModalCommonState, extractCommonState, FunCheckoutStep, } from './stepTransition.shared';
42
31
  export interface ModalStepComponentProps<S extends FunCheckoutStep = FunCheckoutStep> {
43
32
  modalState: CheckoutModalState<S>;
44
33
  onBack(): void;
@@ -72,7 +61,6 @@ export interface SourceChangeTopComponentProps {
72
61
  */
73
62
  applyDynamicTargetAssetCandidate: (candidate: DynamicTargetAssetCandidate) => void;
74
63
  }
75
- export declare function extractCommonState(state: CheckoutModalState): CheckoutModalCommonState;
76
64
  interface ModalStepInput<S extends FunCheckoutStep> {
77
65
  state: CheckoutModalState<S>;
78
66
  apiKey: string;
@@ -0,0 +1,16 @@
1
+ import type { FunCheckoutStartingStep } from '../../providers/FunkitCheckoutContext';
2
+ import { FunCheckoutStep } from './FunCheckoutStep';
3
+ import type { CheckoutModalState } from './stepTransition';
4
+ export { FunCheckoutStep };
5
+ export interface CheckoutModalCommonState {
6
+ checkoutId: string;
7
+ /** Handles soft hiding of the dialog (without removing it from the DOM) */
8
+ isSoftHidden: boolean;
9
+ /** Whether checkout should not be allowed to continue due to security reasons*/
10
+ isBlocked?: boolean;
11
+ startingStep: FunCheckoutStartingStep;
12
+ targetChainId: string;
13
+ showWalletOptions?: boolean;
14
+ hideBottomDivider: boolean;
15
+ }
16
+ export declare function extractCommonState(state: CheckoutModalState): CheckoutModalCommonState;
@@ -1,10 +1,10 @@
1
1
  import type { TFunction } from 'i18next';
2
2
  import type { ErrorNotification } from '../../components/FunNotification/FunNotification';
3
3
  import type { CheckoutConfirmationError } from '../../domains/checkoutErrors';
4
- export declare function getErrorNotification({ quoteErrorObject, withdrawalError, targetAssetFetchError, riskCheckError, t, }: {
4
+ export declare function getErrorNotification({ quoteErrorObject, withdrawalError, assetPriceFetchError, riskCheckError, t, }: {
5
5
  quoteErrorObject: Error | null;
6
6
  withdrawalError: CheckoutConfirmationError | null;
7
- targetAssetFetchError: Error | null;
7
+ assetPriceFetchError: Error | null;
8
8
  riskCheckError: Error | null;
9
9
  t: TFunction;
10
10
  }): ErrorNotification | null;
@@ -6,11 +6,13 @@ import type { FunkitWithdrawalConfig } from '../../providers/FunkitCheckoutConte
6
6
  * Independent of the withdrawal source address — for connected-wallet
7
7
  * withdrawals (e.g. Mallard) the source IS the connected wallet, and
8
8
  * withdrawing to it on the destination chain is valid.
9
+ *
10
+ * Hidden with both an EVM and a Solana wallet connected.
9
11
  */
10
- export declare function shouldShowUseConnectedWallet({ disableConnectedWallet, isConnected, connectedWalletAddress, }: {
12
+ export declare function shouldShowUseConnectedWallet({ disableConnectedWallet, isConnected, hasMultipleWalletsConnected, }: {
11
13
  disableConnectedWallet: boolean | undefined;
12
14
  isConnected: boolean;
13
- connectedWalletAddress: string | undefined;
15
+ hasMultipleWalletsConnected: boolean;
14
16
  }): boolean;
15
17
  export declare function WithdrawRecipientAddress({ config, recipientAddress, setRecipientAddress: setRecipientAddressProp, selectedChainId, selectedToken, isValidAddress, isRiskyAddress, onAddressAutofilled, onAddressChanged, }: {
16
18
  config: FunkitWithdrawalConfig;
@@ -25,8 +25,10 @@ export declare const useFrozenSourceTokenBalance: ({ isWithdrawing, sourceTokenB
25
25
  * The withdrawal form's warning logs. Effect bodies and dependency arrays are
26
26
  * unchanged from WithdrawalContent; the refs that dedupe them move along too.
27
27
  */
28
- export declare function useWithdrawalLogging({ targetAssetFetchError, quoteErrorObject, isRisky, isRecipientBlacklisted, selectedChainId, selectedToken, recipientAddress, debouncedInputAmount, debouncedInputAmountUsd, }: {
28
+ export declare function useWithdrawalLogging({ targetAssetFetchError, sourceAssetFetchError, selectedSourceToken, quoteErrorObject, isRisky, isRecipientBlacklisted, selectedChainId, selectedToken, recipientAddress, debouncedInputAmount, debouncedInputAmountUsd, }: {
29
29
  targetAssetFetchError: unknown;
30
+ sourceAssetFetchError: unknown;
31
+ selectedSourceToken: string | undefined;
30
32
  quoteErrorObject: unknown;
31
33
  isRisky: boolean | undefined;
32
34
  isRecipientBlacklisted: boolean;
@@ -65,16 +65,19 @@ interface FunkitQuoteContextInterface extends CheckoutQuoteState {
65
65
  setTargetAssetPoolAllowance: (value: bigint | undefined) => void;
66
66
  }
67
67
  /**
68
- * Shared preconditions (wallet-executed account-balance flows only), then a
69
- * per-flow gate. Aave native supply is capability-gated: EIP-2612 support
68
+ * Account-balance payments only, then a per-flow gate. Those payments are
69
+ * always direct-executed — `useRelayBypass` whitelists ACCOUNT_BALANCE both
70
+ * with and without additional actions — which is why no separate
71
+ * direct-execution precondition is needed here.
72
+ *
73
+ * Aave native supply is capability-gated: EIP-2612 support
70
74
  * (`undefined` = still loading → show optimistically, `false` = hide) and no
71
75
  * covering Pool allowance — never the feature flag (ENG-4070). The Relay
72
76
  * flow's source-side Permit2-vs-approve choice stays behind the
73
77
  * `enable-permit-toggle` Statsig rollout gate.
74
78
  */
75
- export declare function shouldShowApprovalMethodToggle({ isPermitToggleGateOn, isDirectExecution, isAccountBalancePayment, isAaveNativeSupplyFlow, targetAssetSupportsPermit, targetAssetAllowanceCoversAmount, }: {
79
+ export declare function shouldShowApprovalMethodToggle({ isPermitToggleGateOn, isAccountBalancePayment, isAaveNativeSupplyFlow, targetAssetSupportsPermit, targetAssetAllowanceCoversAmount, }: {
76
80
  isPermitToggleGateOn: boolean;
77
- isDirectExecution: boolean;
78
81
  isAccountBalancePayment: boolean;
79
82
  isAaveNativeSupplyFlow: boolean;
80
83
  targetAssetSupportsPermit: boolean | undefined;