@funkit/connect 10.2.1 → 10.3.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/CHANGELOG.md +23 -0
- package/dist/{chunk-36KVHK22.js → chunk-L67HP4HQ.js} +1 -1
- package/dist/clients/{chunk-ZAXSDMDU.js → chunk-3STGJU6Z.js} +2 -2
- package/dist/clients/chunk-HOORQPSY.js +4660 -0
- package/dist/clients/{chunk-E3USJY7A.js → chunk-RWCJ4XGX.js} +5 -3
- package/dist/clients/fanatics.js +1 -1
- package/dist/clients/lighter.css +12 -1
- package/dist/clients/lighter.js +2 -3
- package/dist/clients/mallard.js +1 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +12 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +3 -3
- package/dist/clients/polymarket/index.css +12 -1
- package/dist/clients/polymarket/index.js +3 -3
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/hooks.d.ts +1 -2
- package/dist/components/FunInput/FunInput.d.ts +2 -0
- package/dist/components/FunkitTrans.d.ts +14 -0
- package/dist/hooks/useFunkitTranslation.d.ts +3 -1
- package/dist/hooks/usePaymentMethodTabs.d.ts +4 -1
- package/dist/hooks/useSkipSwappedPreload.d.ts +7 -0
- package/dist/hooks/useSwappedPreload.d.ts +10 -1
- package/dist/index.css +12 -1
- package/dist/index.js +15325 -15339
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.css.d.ts +1 -0
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +6 -2
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +26 -0
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalComplete.d.ts +15 -1
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalEnterAmount.d.ts +12 -1
- package/dist/modals/CheckoutModal/isWithdrawalStep.d.ts +24 -0
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +15 -1
- package/dist/modals/WithdrawalModal/WithdrawalMethodSelect.d.ts +5 -1
- package/dist/providers/FunkitCheckoutContext/index.d.ts +15 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +8 -0
- package/dist/providers/FunkitI18nProvider.d.ts +6 -2
- package/dist/themes/darkTheme.js +1 -1
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +59 -59
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +5 -4
- package/dist/clients/chunk-STLOQEN7.js +0 -11
- package/dist/components/FunInput/FunTextAreaInput.css.d.ts +0 -1
- package/dist/components/FunInput/FunTextAreaInput.d.ts +0 -3
- package/dist/components/Icons/AcornsIcon.d.ts +0 -4
- package/dist/components/Icons/AlpacaIcon.d.ts +0 -4
- package/dist/components/Icons/BitFlyerIcon.d.ts +0 -4
- package/dist/components/Icons/BitfinexIcon.d.ts +0 -4
- package/dist/components/Icons/BitstampIcon.d.ts +0 -4
- package/dist/components/Icons/BrokerageIcon.d.ts +0 -4
- package/dist/components/Icons/CexloIcon.d.ts +0 -4
- package/dist/components/Icons/CoinlistIcon.d.ts +0 -4
- package/dist/components/Icons/CryptoComIcon.d.ts +0 -4
- package/dist/components/Icons/CryptoIcon.d.ts +0 -2
- package/dist/components/Icons/DeviceConfirmationIcon.d.ts +0 -2
- package/dist/components/Icons/EmailConfirmationIcon.d.ts +0 -2
- package/dist/components/Icons/EtoroIcon.d.ts +0 -4
- package/dist/components/Icons/EtradeIcon.d.ts +0 -4
- package/dist/components/Icons/HuobiIcon.d.ts +0 -4
- package/dist/components/Icons/KucoinIcon.d.ts +0 -4
- package/dist/components/Icons/LightningBoltIcon.d.ts +0 -4
- package/dist/components/Icons/LockIcon.d.ts +0 -4
- package/dist/components/Icons/MailIcon.d.ts +0 -6
- package/dist/components/Icons/New/LinkExternalIcon.d.ts +0 -4
- package/dist/components/Icons/New/MessageIcon.d.ts +0 -2
- package/dist/components/Icons/OkcoinIcon.d.ts +0 -4
- package/dist/components/Icons/OkxIcon.d.ts +0 -4
- package/dist/components/Icons/PublicIcon.d.ts +0 -4
- package/dist/components/Icons/RobinhoodIcon.d.ts +0 -4
- package/dist/components/Icons/SocialMediaIcons.d.ts +0 -13
- package/dist/components/Icons/SocialsIcon.d.ts +0 -2
- package/dist/components/Icons/StashIcon.d.ts +0 -4
- package/dist/components/Icons/WeBullIcon.d.ts +0 -4
- package/dist/components/Icons/WhitelistIcon.d.ts +0 -2
- package/dist/hooks/useIsUsUser.d.ts +0 -1
- package/dist/utils/privyHelper.d.ts +0 -3
- package/dist/utils/safeJSON.d.ts +0 -5
- package/dist/utils/tokenTransfer/disabledList.d.ts +0 -1
- package/dist/wallets/walletConnectors/{chunk-RB3HR4R2.js → chunk-4NV5BYRP.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YEZM4CK4.js → chunk-AVDUNQUW.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-MIQTHJ6X.js → chunk-GUQM4QSL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-4T6ZSRJF.js → chunk-IULPZP2Q.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HNRB7KJU.js → chunk-JPN6TWIT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZNX4EMPB.js → chunk-KCRO2AGO.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-STVVP43G.js → chunk-KI5Y2BBF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-X6CGV36L.js → chunk-NR2OGDHQ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UK7C2JXW.js → chunk-OEEGYENV.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-F5XEEVG6.js → chunk-OX37G4YT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RVOY537T.js → chunk-SWFF3TWJ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CPI4TD43.js → chunk-TKB2OY6G.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-2VP2F6EK.js → chunk-W2LCLDPX.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-6BW3HLBG.js → chunk-WAHGI5L7.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-HTHAK6XB.js → chunk-WKNQMP4A.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VTM6EECM.js → chunk-XCNHV3HS.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CCQV2ZET.js → chunk-YO2K4MBH.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VAPGUPHO.js → chunk-YQFGVZGR.js} +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const amountInputFontSize: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExchangeRates, GetFopsResponse, SavedFormOfPayment, SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
2
|
import type { ListFormOfPayment, SyntheticFormOfPayment } from '@funkit/connect-core';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { type ReactNode } from 'react';
|
|
4
4
|
/** FOP list normalized to hold real (Swapped) and synthetic methods together. */
|
|
5
5
|
interface ListFopsData {
|
|
6
6
|
genericFormsOfPayments: ListFormOfPayment[];
|
|
@@ -32,6 +32,10 @@ interface FormOfPaymentsListProps {
|
|
|
32
32
|
* predicate if per-provider minimums ever diverge.
|
|
33
33
|
*/
|
|
34
34
|
isBelowMinimumBalance?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Rendered above FOPs within a same list
|
|
37
|
+
*/
|
|
38
|
+
cryptoPaymentMethodItem?: ReactNode;
|
|
35
39
|
}
|
|
36
40
|
interface FormOfPaymentSection {
|
|
37
41
|
items: ListFormOfPayment[];
|
|
@@ -41,5 +45,5 @@ export declare function getFormOfPaymentSections(fopsData: ListFopsData, fopPrio
|
|
|
41
45
|
primary: FormOfPaymentSection;
|
|
42
46
|
secondary: FormOfPaymentSection;
|
|
43
47
|
};
|
|
44
|
-
export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, syntheticFops, onSelect, exchangeRatesData, getDisclaimerLimit, enableSourceGroupLabels, isDisabled, isBelowMinimumBalance, }: FormOfPaymentsListProps): React.JSX.Element;
|
|
48
|
+
export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, syntheticFops, onSelect, exchangeRatesData, getDisclaimerLimit, enableSourceGroupLabels, isDisabled, isBelowMinimumBalance, cryptoPaymentMethodItem, }: FormOfPaymentsListProps): React.JSX.Element;
|
|
45
49
|
export {};
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { type SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import type { Hex } from 'viem';
|
|
3
4
|
import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodBitcoinLightningInfo, type PaymentMethodCardInfo, type PaymentMethodCashAppLightningInfo, type PaymentMethodVirtualBankIncompleteInfo } from '../../../domains/paymentMethods';
|
|
5
|
+
import type { FunkitCheckoutQuoteResult } from '../../../domains/quote';
|
|
4
6
|
import { type PaymentMethodType } from '../../../hooks/usePaymentSources';
|
|
7
|
+
import { type CustomWithdrawalConfig, type WalletWithdrawalConfig } from '../../../providers/FunkitCheckoutContext';
|
|
5
8
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
6
9
|
export type SourceChangeState = CheckoutModalCommonState & {
|
|
7
10
|
paymentMethodInfo: ConnectablePaymentMethodInfo | null;
|
|
8
11
|
/** Persisted payment method type filter (crypto/fiat tab) */
|
|
9
12
|
paymentMethodTypeFilter?: PaymentMethodType;
|
|
13
|
+
/**
|
|
14
|
+
* Resolved single-method withdrawal config, seeded while the Withdraw tab is
|
|
15
|
+
* open so the modal-level effect in `FunCheckoutModal` can enter withdrawal
|
|
16
|
+
* mode in lockstep with the tab — the withdraw tab may render withdrawal-mode
|
|
17
|
+
* UI while still on SourceChange. Cleared when leaving the tab so the effect
|
|
18
|
+
* reverts back to deposit mode. Read only by that effect.
|
|
19
|
+
*/
|
|
20
|
+
withdrawalConfig?: WalletWithdrawalConfig | CustomWithdrawalConfig;
|
|
10
21
|
};
|
|
11
22
|
export type SourceChangeNext = {
|
|
12
23
|
connectNew: false;
|
|
@@ -53,6 +64,21 @@ export type SourceChangeNext = {
|
|
|
53
64
|
*/
|
|
54
65
|
skipAssetSelect: true;
|
|
55
66
|
paymentMethodInfo: ConnectablePaymentMethodInfo;
|
|
67
|
+
} | {
|
|
68
|
+
/** Enter the cashier withdrawal flow with a resolved single-method config. */
|
|
69
|
+
withdraw: true;
|
|
70
|
+
withdrawalConfig: WalletWithdrawalConfig | CustomWithdrawalConfig;
|
|
71
|
+
} | {
|
|
72
|
+
/**
|
|
73
|
+
* Inline withdrawal (swapped-withdrawal flag off): the amount form is
|
|
74
|
+
* rendered directly in the Withdraw tab, so on success we jump straight
|
|
75
|
+
* to the completion screen rather than through WITHDRAWAL_ENTER_AMOUNT.
|
|
76
|
+
*/
|
|
77
|
+
withdrawComplete: true;
|
|
78
|
+
hash: Hex;
|
|
79
|
+
withdrawnAmount: string;
|
|
80
|
+
tokenSymbol: string;
|
|
81
|
+
quote?: FunkitCheckoutQuoteResult;
|
|
56
82
|
};
|
|
57
83
|
export declare const SourceChangeInfo: ModalStepInfo<FunCheckoutStep.SOURCE_CHANGE>;
|
|
58
84
|
export declare function SourceChange({ modalState, onClose, onNext, onStepChange, setModalState, }: ModalStepComponentProps<FunCheckoutStep.SOURCE_CHANGE>): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { Hex } from 'viem';
|
|
2
3
|
import type { FunkitCheckoutQuoteResult } from '../../../domains/quote';
|
|
3
4
|
import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '../../../providers/FunkitCheckoutContext';
|
|
@@ -11,4 +12,17 @@ export type WithdrawalCompleteState = CheckoutModalCommonState & {
|
|
|
11
12
|
};
|
|
12
13
|
export type WithdrawalCompleteNext = Record<never, never>;
|
|
13
14
|
export declare const WithdrawalCompleteInfo: ModalStepInfo<FunCheckoutStep.WITHDRAWAL_COMPLETE>;
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Cashier withdrawal completion screen. Mirrors the standalone `WithdrawalModal`
|
|
17
|
+
* success screens, adapted to the CheckoutModal step contract and its bottom-bar
|
|
18
|
+
* portal (`MODAL_BOTTOM_BAR_IDS.checkout`):
|
|
19
|
+
*
|
|
20
|
+
* - Wallet config → {@link WithdrawSuccess} (transaction detail keyed by tx hash).
|
|
21
|
+
* - Custom callback config → {@link WithdrawalCallbackSuccess} (pending screen).
|
|
22
|
+
*
|
|
23
|
+
* Lighter Secure (mainnet) is intentionally NOT branched here yet — its success
|
|
24
|
+
* component hard-codes the standalone `'withdrawal'` bottom-bar id, so wiring it
|
|
25
|
+
* into the cashier is deferred to a follow-up. A Lighter customer falls into the
|
|
26
|
+
* generic callback screen until then.
|
|
27
|
+
*/
|
|
28
|
+
export declare function WithdrawalComplete({ modalState, onClose, onNext, }: ModalStepComponentProps<FunCheckoutStep.WITHDRAWAL_COMPLETE>): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { Hex } from 'viem';
|
|
2
3
|
import type { FunkitCheckoutQuoteResult } from '../../../domains/quote';
|
|
3
4
|
import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '../../../providers/FunkitCheckoutContext';
|
|
@@ -12,4 +13,14 @@ export type WithdrawalEnterAmountNext = {
|
|
|
12
13
|
quote?: FunkitCheckoutQuoteResult;
|
|
13
14
|
};
|
|
14
15
|
export declare const WithdrawalEnterAmountInfo: ModalStepInfo<FunCheckoutStep.WITHDRAWAL_ENTER_AMOUNT>;
|
|
15
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Cashier withdrawal amount entry. Thin adapter that renders the shared
|
|
18
|
+
* {@link WithdrawContent} form against the resolved single-method config carried
|
|
19
|
+
* on the modal state, mirroring the standalone `WithdrawalModal` amount screen
|
|
20
|
+
* (free-USDC banner above the form).
|
|
21
|
+
*
|
|
22
|
+
* Submitting executes the real withdrawal: `WithdrawContent`'s CTA fires
|
|
23
|
+
* `useWithdrawal`, whose `onSuccess` maps `onContinue` → `onNext`, advancing to
|
|
24
|
+
* `WITHDRAWAL_COMPLETE`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function WithdrawalEnterAmount({ modalState, onNext, }: ModalStepComponentProps<FunCheckoutStep.WITHDRAWAL_ENTER_AMOUNT>): React.JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FunCheckoutStep } from './FunCheckoutStep';
|
|
2
|
+
import type { CheckoutModalState } from './stepTransition';
|
|
3
|
+
/** Steps whose state carries a `withdrawalConfig` (the withdrawal-mode region). */
|
|
4
|
+
type WithdrawalStep = FunCheckoutStep.WITHDRAWAL_ENTER_AMOUNT | FunCheckoutStep.WITHDRAWAL_COMPLETE | FunCheckoutStep.SOURCE_CHANGE;
|
|
5
|
+
/**
|
|
6
|
+
* Authoritative list of steps that require the shared active checkout to be in
|
|
7
|
+
* *withdrawal* mode (`convertActiveCheckoutToWithdrawal`). `FunCheckoutModal`'s
|
|
8
|
+
* checkout↔withdrawal lifecycle effect keys off this.
|
|
9
|
+
*
|
|
10
|
+
* - Dedicated withdrawal steps (enter-amount, complete) always qualify.
|
|
11
|
+
* - The Withdraw tab on SourceChange qualifies while active — it surfaces
|
|
12
|
+
* withdrawal-mode UI before advancing to a dedicated step.
|
|
13
|
+
*
|
|
14
|
+
* Narrows to the states that carry `withdrawalConfig`, so callers can read it
|
|
15
|
+
* without re-checking the step. Adding a new withdrawal screen? Add its step
|
|
16
|
+
* both here and to {@link WithdrawalStep}, or the modal won't enter withdrawal
|
|
17
|
+
* mode for it.
|
|
18
|
+
*
|
|
19
|
+
* Lives in its own module (not `stepTransition.ts`) so it stays a pure,
|
|
20
|
+
* dependency-light helper — importable without pulling in the step components,
|
|
21
|
+
* and unit-testable without mocking the modal graph.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isWithdrawalStep(modalState: CheckoutModalState): modalState is CheckoutModalState<WithdrawalStep>;
|
|
24
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { Hex } from 'viem';
|
|
4
|
+
import { type ModalBottomBarIdType } from '../../components/Dialog/Dialog';
|
|
4
5
|
import type { CustomWithdrawalConfig, FunkitActiveWithdrawalItem, FunkitCheckoutConfig, WalletWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
|
|
5
6
|
import { type WithdrawalFormData } from './useWithdrawal';
|
|
6
7
|
/**
|
|
@@ -17,6 +18,19 @@ interface WithdrawContentProps {
|
|
|
17
18
|
* {@link WithdrawalModal}; used by the over-$3M footer.
|
|
18
19
|
*/
|
|
19
20
|
onSwitchToSecure?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Portal target for the CTA. Defaults to the standalone WithdrawalModal's
|
|
23
|
+
* bottom bar; the unified CheckoutModal cashier flow passes `'checkout'` so
|
|
24
|
+
* the button lands in the checkout modal's bottom section instead.
|
|
25
|
+
*/
|
|
26
|
+
bottomBarId?: ModalBottomBarIdType;
|
|
27
|
+
/**
|
|
28
|
+
* When true the submit CTA is rendered inert (disabled, no-op click) — no
|
|
29
|
+
* withdrawal executes and `onContinue` never fires. Used by the cashier amount
|
|
30
|
+
* step while the continue/success flow is not yet wired. Defaults to false so
|
|
31
|
+
* the standalone WithdrawalModal is unaffected.
|
|
32
|
+
*/
|
|
33
|
+
disableSubmit?: boolean;
|
|
20
34
|
}
|
|
21
35
|
/**
|
|
22
36
|
* Converts a source-token amount string to its USD value using the given unit
|
|
@@ -77,5 +91,5 @@ export declare const useFrozenSourceTokenBalance: ({ isWithdrawing, sourceTokenB
|
|
|
77
91
|
* Currently returns a single option per config; expands when Lighter exposes
|
|
78
92
|
* multi-asset API support.
|
|
79
93
|
*/
|
|
80
|
-
export declare const WithdrawContent: ({ onContinue, config, withdrawalItem, onSwitchToSecure, }: WithdrawContentProps) => React.JSX.Element;
|
|
94
|
+
export declare const WithdrawContent: ({ onContinue, config, withdrawalItem, onSwitchToSecure, bottomBarId, disableSubmit, }: WithdrawContentProps) => React.JSX.Element;
|
|
81
95
|
export {};
|
|
@@ -11,6 +11,10 @@ interface WithdrawalMethodSelectProps {
|
|
|
11
11
|
* Omit/0 when unknown — no cap is sent and the iframe stays uncapped.
|
|
12
12
|
*/
|
|
13
13
|
usdBalance?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Hide the "Crypto" / "Cash" section labels. Used by Cashier flow.
|
|
16
|
+
*/
|
|
17
|
+
hideSectionLabels?: boolean;
|
|
14
18
|
}
|
|
15
|
-
export declare function WithdrawalMethodSelect({ onCryptoSelect, onCashFopSelect, sourceChainId, sourceTokenAddress, usdBalance, }: WithdrawalMethodSelectProps): React.JSX.Element;
|
|
19
|
+
export declare function WithdrawalMethodSelect({ onCryptoSelect, onCashFopSelect, sourceChainId, sourceTokenAddress, usdBalance, hideSectionLabels, }: WithdrawalMethodSelectProps): React.JSX.Element;
|
|
16
20
|
export {};
|
|
@@ -5,7 +5,7 @@ import { type PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
|
5
5
|
import type { AssetHoldingsItem } from '../../utils/assets';
|
|
6
6
|
import type { WithdrawalClient, WithdrawalTransaction } from '../../wallets/Wallet';
|
|
7
7
|
import { type FunkitCheckoutQuoteResult } from '../FunkitHistoryContext';
|
|
8
|
-
import type { DynamicTargetAssetCandidate, FunkitActiveCheckoutItem, FunkitActiveWithdrawalItem, FunkitCheckoutConfig, FunkitWithdrawalConfig, UseFunkitCheckoutProps, UseFunkitCheckoutPropsWithFullConfig } from './types';
|
|
8
|
+
import type { CustomWithdrawalConfig, DynamicTargetAssetCandidate, FunkitActiveCheckoutItem, FunkitActiveWithdrawalItem, FunkitCheckoutConfig, FunkitWithdrawalConfig, UseFunkitCheckoutProps, UseFunkitCheckoutPropsWithFullConfig, WalletWithdrawalConfig } from './types';
|
|
9
9
|
export * from './types';
|
|
10
10
|
interface FunkitCheckoutContextInterface {
|
|
11
11
|
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
@@ -43,6 +43,20 @@ interface FunkitCheckoutContextInterface {
|
|
|
43
43
|
updateWithdrawalSourceAssetAmount(newSourceAmount: string): void;
|
|
44
44
|
resetForNewWithdrawal(): void;
|
|
45
45
|
resetForNewDeposit(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Switch the active checkout into a withdrawal-shaped item (same id, so the
|
|
48
|
+
* open modal's frozen `modalState.checkoutId` stays coherent and the modal does
|
|
49
|
+
* not remount) and populate `withdrawalItem`. Reuses the shared
|
|
50
|
+
* `buildWithdrawalActiveItems` shape so the cashier matches the standalone, but
|
|
51
|
+
* snapshots the prior deposit item so {@link revertActiveCheckoutFromWithdrawal}
|
|
52
|
+
* can restore it — `WithdrawContent` overwrites the active item's target
|
|
53
|
+
* asset/chain while in withdraw mode, so the snapshot (not a flag flip) is what
|
|
54
|
+
* makes revert lossless. Used by the cashier withdraw tab; the standalone
|
|
55
|
+
* `WithdrawalModal` uses {@link initNewWithdrawal} instead.
|
|
56
|
+
*/
|
|
57
|
+
convertActiveCheckoutToWithdrawal(config: WalletWithdrawalConfig | CustomWithdrawalConfig): void;
|
|
58
|
+
/** Restore the deposit snapshot taken by {@link convertActiveCheckoutToWithdrawal} and clear `withdrawalItem`. */
|
|
59
|
+
revertActiveCheckoutFromWithdrawal(): void;
|
|
46
60
|
applyDynamicRouting(path: ApplyDynamicRoutingPath): void;
|
|
47
61
|
updateDynamicRoutingId(dynamicRoutingId: string): void;
|
|
48
62
|
/**
|
|
@@ -384,6 +384,14 @@ export type FunkitCheckoutResult = {
|
|
|
384
384
|
export interface UseFunkitCheckoutProps {
|
|
385
385
|
/** @optional the checkout config object **/
|
|
386
386
|
config?: FunkitCheckoutConfig;
|
|
387
|
+
/**
|
|
388
|
+
* @optional withdrawal config for the unified cashier flow. When provided,
|
|
389
|
+
* the checkout modal's withdraw tab can enter the in-modal withdrawal flow.
|
|
390
|
+
* TODO(cashier): the final wiring PR formalizes resolution (multi-method,
|
|
391
|
+
* per-source); for now a single- or multi-method config is accepted and the
|
|
392
|
+
* first method is used as the default.
|
|
393
|
+
*/
|
|
394
|
+
withdrawalConfig?: FunkitWithdrawalConfig;
|
|
387
395
|
/** @optional fires when the checkout modal is opened **/
|
|
388
396
|
onOpen?: () => void;
|
|
389
397
|
/** @optional fires when the checkout modal is closed **/
|
|
@@ -5,8 +5,12 @@ interface FunkitI18nProviderProps {
|
|
|
5
5
|
locale?: Locale;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Syncs the `locale` config onto funkit's private i18next instance.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately does NOT render react-i18next's <I18nextProvider>: that would
|
|
11
|
+
* set the react-i18next context for the host app's children and shadow the
|
|
12
|
+
* host's own i18n (Slack C0B6S1XHWSJ). funkit components bind the instance
|
|
13
|
+
* explicitly via useFunkitTranslation/FunkitTrans instead.
|
|
10
14
|
*/
|
|
11
15
|
export declare function FunkitI18nProvider({ children, locale, }: FunkitI18nProviderProps): React.JSX.Element;
|
|
12
16
|
export {};
|
package/dist/themes/darkTheme.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-IULPZP2Q.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bifrostWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitgetWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-TKB2OY6G.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bitgetWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bybitWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-OX37G4YT.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bybitWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
coin98Wallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-WAHGI5L7.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
coin98Wallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
frontierWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-AVDUNQUW.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
frontierWallet
|
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
zealWallet
|
|
4
|
+
} from "./chunk-52QXXLDS.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
zerionWallet
|
|
7
|
+
} from "./chunk-SWFF3TWJ.js";
|
|
8
|
+
import {
|
|
9
|
+
tahoWallet
|
|
10
|
+
} from "./chunk-7ZYCBDQ4.js";
|
|
11
|
+
import {
|
|
12
|
+
talismanWallet
|
|
13
|
+
} from "./chunk-4DCO3TGL.js";
|
|
8
14
|
import {
|
|
9
15
|
tokenPocketWallet
|
|
10
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WKNQMP4A.js";
|
|
11
17
|
import {
|
|
12
18
|
tokenaryWallet
|
|
13
19
|
} from "./chunk-VH3THHJY.js";
|
|
14
20
|
import {
|
|
15
21
|
trustWallet
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
oneInchWallet
|
|
19
|
-
} from "./chunk-QG6ZHI7B.js";
|
|
22
|
+
} from "./chunk-KCRO2AGO.js";
|
|
20
23
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
uniswapWallet
|
|
25
|
+
} from "./chunk-Z3PPW6NC.js";
|
|
23
26
|
import {
|
|
24
27
|
xdefiWallet
|
|
25
28
|
} from "./chunk-JN5I3DNC.js";
|
|
26
29
|
import {
|
|
27
|
-
|
|
28
|
-
} from "./chunk-
|
|
30
|
+
walletConnectWallet
|
|
31
|
+
} from "./chunk-3FCWJRI4.js";
|
|
29
32
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
rabbyWallet
|
|
34
|
+
} from "./chunk-RB66PKPA.js";
|
|
35
|
+
import {
|
|
36
|
+
rainbowWallet
|
|
37
|
+
} from "./chunk-W2LCLDPX.js";
|
|
32
38
|
import {
|
|
33
39
|
ramperWallet
|
|
34
40
|
} from "./chunk-OQB55QXP.js";
|
|
35
41
|
import {
|
|
36
42
|
roninWallet
|
|
37
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-YQFGVZGR.js";
|
|
38
44
|
import {
|
|
39
45
|
safeWallet
|
|
40
46
|
} from "./chunk-RCY66YHF.js";
|
|
47
|
+
import {
|
|
48
|
+
safepalWallet
|
|
49
|
+
} from "./chunk-XCNHV3HS.js";
|
|
41
50
|
import {
|
|
42
51
|
safeheronWallet
|
|
43
52
|
} from "./chunk-76S7R2ND.js";
|
|
44
|
-
import {
|
|
45
|
-
safepalWallet
|
|
46
|
-
} from "./chunk-VTM6EECM.js";
|
|
47
53
|
import {
|
|
48
54
|
subWallet
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import {
|
|
51
|
-
tahoWallet
|
|
52
|
-
} from "./chunk-7ZYCBDQ4.js";
|
|
53
|
-
import {
|
|
54
|
-
talismanWallet
|
|
55
|
-
} from "./chunk-4DCO3TGL.js";
|
|
55
|
+
} from "./chunk-NR2OGDHQ.js";
|
|
56
56
|
import {
|
|
57
57
|
metaMaskWallet
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-YO2K4MBH.js";
|
|
59
|
+
import {
|
|
60
|
+
mewWallet
|
|
61
|
+
} from "./chunk-MQM45ADF.js";
|
|
59
62
|
import {
|
|
60
63
|
oktoWallet
|
|
61
64
|
} from "./chunk-YWOVAU6O.js";
|
|
62
65
|
import {
|
|
63
66
|
okxWallet
|
|
64
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-KI5Y2BBF.js";
|
|
65
68
|
import {
|
|
66
69
|
omniWallet
|
|
67
70
|
} from "./chunk-2CX7LX4J.js";
|
|
68
71
|
import {
|
|
69
72
|
oneKeyWallet
|
|
70
73
|
} from "./chunk-WVT6BBJH.js";
|
|
74
|
+
import {
|
|
75
|
+
oneInchWallet
|
|
76
|
+
} from "./chunk-QG6ZHI7B.js";
|
|
71
77
|
import {
|
|
72
78
|
phantomWallet
|
|
73
79
|
} from "./chunk-QY53O7WG.js";
|
|
74
|
-
import {
|
|
75
|
-
rabbyWallet
|
|
76
|
-
} from "./chunk-RB66PKPA.js";
|
|
77
|
-
import {
|
|
78
|
-
rainbowWallet
|
|
79
|
-
} from "./chunk-2VP2F6EK.js";
|
|
80
80
|
import {
|
|
81
81
|
foxWallet
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-GUQM4QSL.js";
|
|
83
83
|
import {
|
|
84
84
|
frameWallet
|
|
85
85
|
} from "./chunk-BU3ZAT5X.js";
|
|
86
86
|
import {
|
|
87
87
|
frontierWallet
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-AVDUNQUW.js";
|
|
89
89
|
import {
|
|
90
90
|
gateWallet
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-JPN6TWIT.js";
|
|
92
92
|
import {
|
|
93
93
|
imTokenWallet
|
|
94
94
|
} from "./chunk-WNAGGFMG.js";
|
|
@@ -101,53 +101,53 @@ import {
|
|
|
101
101
|
import {
|
|
102
102
|
ledgerWallet
|
|
103
103
|
} from "./chunk-RPV27V2Y.js";
|
|
104
|
+
import {
|
|
105
|
+
bybitWallet
|
|
106
|
+
} from "./chunk-OX37G4YT.js";
|
|
107
|
+
import {
|
|
108
|
+
clvWallet
|
|
109
|
+
} from "./chunk-OEEGYENV.js";
|
|
110
|
+
import {
|
|
111
|
+
coin98Wallet
|
|
112
|
+
} from "./chunk-WAHGI5L7.js";
|
|
104
113
|
import {
|
|
105
114
|
coinbaseWallet
|
|
106
115
|
} from "./chunk-2DLDAZRH.js";
|
|
107
116
|
import {
|
|
108
117
|
coreWallet
|
|
109
|
-
} from "./chunk-
|
|
110
|
-
import {
|
|
111
|
-
braveWallet
|
|
112
|
-
} from "./chunk-DS73TZ6O.js";
|
|
113
|
-
import {
|
|
114
|
-
bloomWallet
|
|
115
|
-
} from "./chunk-PJ7Y57EH.js";
|
|
118
|
+
} from "./chunk-4NV5BYRP.js";
|
|
116
119
|
import {
|
|
117
120
|
dawnWallet
|
|
118
121
|
} from "./chunk-G2PHTVL6.js";
|
|
119
|
-
import {
|
|
120
|
-
coin98Wallet
|
|
121
|
-
} from "./chunk-6BW3HLBG.js";
|
|
122
122
|
import {
|
|
123
123
|
desigWallet
|
|
124
124
|
} from "./chunk-FW3WZETT.js";
|
|
125
125
|
import {
|
|
126
126
|
enkryptWallet
|
|
127
127
|
} from "./chunk-HBQK5RD5.js";
|
|
128
|
-
import {
|
|
129
|
-
bitgetWallet
|
|
130
|
-
} from "./chunk-CPI4TD43.js";
|
|
131
128
|
import {
|
|
132
129
|
argentWallet
|
|
133
130
|
} from "./chunk-NTMBEOR2.js";
|
|
134
|
-
import {
|
|
135
|
-
bitskiWallet
|
|
136
|
-
} from "./chunk-7HRFUZFX.js";
|
|
137
131
|
import {
|
|
138
132
|
bifrostWallet
|
|
139
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-IULPZP2Q.js";
|
|
140
134
|
import {
|
|
141
135
|
bitverseWallet
|
|
142
136
|
} from "./chunk-NSK6A7TI.js";
|
|
143
137
|
import {
|
|
144
|
-
|
|
145
|
-
} from "./chunk-
|
|
138
|
+
bitgetWallet
|
|
139
|
+
} from "./chunk-TKB2OY6G.js";
|
|
146
140
|
import {
|
|
147
|
-
|
|
148
|
-
} from "./chunk-
|
|
149
|
-
import
|
|
141
|
+
bitskiWallet
|
|
142
|
+
} from "./chunk-7HRFUZFX.js";
|
|
143
|
+
import {
|
|
144
|
+
bloomWallet
|
|
145
|
+
} from "./chunk-PJ7Y57EH.js";
|
|
150
146
|
import "./chunk-N4IJLYFY.js";
|
|
147
|
+
import {
|
|
148
|
+
braveWallet
|
|
149
|
+
} from "./chunk-DS73TZ6O.js";
|
|
150
|
+
import "./chunk-OLZ7626J.js";
|
|
151
151
|
import "./chunk-IGKXZBTA.js";
|
|
152
152
|
export {
|
|
153
153
|
argentWallet,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
metaMaskWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-YO2K4MBH.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
metaMaskWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
rainbowWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-W2LCLDPX.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
rainbowWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
roninWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-YQFGVZGR.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
roninWallet
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
safepalWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-OLZ7626J.js";
|
|
4
|
+
} from "../chunk-XCNHV3HS.js";
|
|
6
5
|
import "../chunk-N4IJLYFY.js";
|
|
6
|
+
import "../chunk-OLZ7626J.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
safepalWallet
|