@funkit/connect 9.13.0 → 9.15.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 +54 -0
- package/dist/__generated__/default_configs.d.ts +8 -11
- package/dist/__generated__/default_feature_gates.d.ts +3 -2
- package/dist/clients/aave.d.ts +92 -0
- package/dist/clients/aave.js +156 -0
- package/dist/clients/{chunk-LMEQD56M.js → chunk-PLDXBAAH.js} +2 -1
- package/dist/clients/fanatics.js +1 -1
- package/dist/clients/lighter.d.ts +33 -2
- package/dist/clients/lighter.js +124 -2
- package/dist/clients/polymarket.d.ts +30 -1
- package/dist/clients/polymarket.js +153 -4
- package/dist/components/CopyAddress/CopyInputDisplayedAddress.css.d.ts +1 -0
- package/dist/components/CopyAddress/CopyInputDisplayedAddress.d.ts +6 -0
- package/dist/components/FreeUsdcBanner/FreeUsdcBanner.d.ts +5 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +16 -0
- package/dist/components/Icons/CashAppIcon.d.ts +4 -0
- package/dist/consts/customers.d.ts +8 -0
- package/dist/consts/polymarket.d.ts +7 -0
- package/dist/domains/paymentMethods.d.ts +9 -1
- package/dist/domains/quote.d.ts +11 -0
- package/dist/hooks/usePaymentSources.d.ts +1 -0
- package/dist/index.css +22 -15
- package/dist/index.js +3017 -2395
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +4 -0
- package/dist/modals/CheckoutModal/InputAmount/aaveClient.d.ts +20 -0
- package/dist/modals/CheckoutModal/InputAmount/useAaveNativeSupply.d.ts +44 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +8 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceList.d.ts +7 -1
- package/dist/modals/CheckoutModal/SourceChange/buildSourceGroups.d.ts +31 -8
- package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +10 -4
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +32 -1
- package/dist/modals/WithdrawalModal/WithdrawalSuccess.d.ts +0 -1
- package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +1 -2
- package/dist/providers/FunkitCheckoutContext/index.d.ts +8 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +6 -0
- package/dist/providers/FunkitConfigContext.d.ts +2 -0
- package/dist/wagmi/actions.d.ts +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 +40 -40
- 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 +10 -5
- package/dist/wallets/walletConnectors/{chunk-VMMROPXK.js → chunk-34HACM5U.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-3ZJN3PXP.js → chunk-5TN5Z2WY.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-OD6B2ISG.js → chunk-6DRCY52E.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IRHK6SOW.js → chunk-7V33VJAL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZJJWGKB6.js → chunk-APHCF4DT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-7IEUTLHY.js → chunk-DEFRRPXB.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-OSOB6QYX.js → chunk-FG2LDVXL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZL6XCMV5.js → chunk-HRDPUW3V.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UYW6MV74.js → chunk-HXWUH73P.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UFYNHHDU.js → chunk-KWX2SYU2.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AZYMJ4C6.js → chunk-LCIPVVH5.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-FWM4KTOV.js → chunk-T4ROGPMF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-J3PJOMO7.js → chunk-UDTBQV4Q.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-55VS2NKG.js → chunk-V6UOWTEZ.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-LEAZMT5Y.js → chunk-VJZWNQOF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RZQ4B4Z7.js → chunk-XVBSJCW5.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IMNI4AGV.js → chunk-YIEASHLS.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YGMU5VWD.js → chunk-ZPSPK6LH.js} +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import type { Hex } from 'viem';
|
|
3
4
|
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
4
5
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
6
|
export type InputAmountState = CheckoutModalCommonState & {
|
|
@@ -19,6 +20,9 @@ export type InputAmountNext = Record<string, never> | {
|
|
|
19
20
|
provider?: MeldServiceProvider;
|
|
20
21
|
quote?: MeldQuote;
|
|
21
22
|
nextStep?: FunCheckoutStep.SOURCE_CHANGE | FunCheckoutStep.MELD_CURRENCY_SELECT | FunCheckoutStep.MELD_QUOTES | FunCheckoutStep.MELD_REDIRECT;
|
|
23
|
+
} | {
|
|
24
|
+
nextStep: FunCheckoutStep.CHECKOUT_COMPLETE;
|
|
25
|
+
txHash: Hex;
|
|
22
26
|
};
|
|
23
27
|
export declare const InputAmountInfo: ModalStepInfo<FunCheckoutStep.INPUT_AMOUNT>;
|
|
24
28
|
export declare function InputAmount(props: ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT>): React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aave V3 client and constants for the native fast-path supply flow.
|
|
3
|
+
*
|
|
4
|
+
* The PoC uses `@aave/client` (V3 SDK) directly via its action functions, with
|
|
5
|
+
* the viem adapter for signing. We don't mount `<AaveProvider>` because the
|
|
6
|
+
* funkit tree doesn't need the React-bound hooks.
|
|
7
|
+
*
|
|
8
|
+
* NOTE on location: this file is co-located with its only current caller
|
|
9
|
+
* (`useAaveNativeSupply.ts`). It does NOT belong in `~/clients/` — that
|
|
10
|
+
* directory is reserved for customer-specific code exported via the
|
|
11
|
+
* `./clients/*` subpath; pulling Aave SDK setup in from there would bloat
|
|
12
|
+
* the main bundle for every customer. As more callers appear (e.g. reserve
|
|
13
|
+
* queries for confirmation-screen metadata), move this to a dedicated
|
|
14
|
+
* `~/integrations/aave.ts` or similar — it's a third-party SDK integration
|
|
15
|
+
* boundary, not a constant (singleton) and not domain logic.
|
|
16
|
+
*/
|
|
17
|
+
import { AaveClient } from '@aave/client';
|
|
18
|
+
import type { Address } from 'viem';
|
|
19
|
+
export declare const aaveClient: AaveClient;
|
|
20
|
+
export declare const AAVE_MARKET_ADDRESS_BY_CHAIN: Record<string, Address>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aave V3 native-supply fast-path: routes same-token same-chain
|
|
3
|
+
* deposits straight to Pool.supply via @aave/client, bypassing Relay.
|
|
4
|
+
*/
|
|
5
|
+
import type { Dnum } from 'dnum';
|
|
6
|
+
import type { Hex } from 'viem';
|
|
7
|
+
import type { FunkitActiveCheckoutItem } from '../../../providers/FunkitCheckoutContext';
|
|
8
|
+
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
9
|
+
interface AaveNativeSupplyContextArgs {
|
|
10
|
+
apiKey: string;
|
|
11
|
+
sourceAsset: {
|
|
12
|
+
chainId: string | number;
|
|
13
|
+
address: string;
|
|
14
|
+
};
|
|
15
|
+
checkoutConfig: Pick<FunkitCheckoutConfig, 'targetChain' | 'targetAsset'>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* True when the customer has the Aave native fast-path enabled, the
|
|
19
|
+
* checkout's target chain has an Aave market configured (membership in
|
|
20
|
+
* AAVE_MARKET_ADDRESS_BY_CHAIN is the single source of truth for "Aave
|
|
21
|
+
* supported here"), and the source asset matches the target asset
|
|
22
|
+
* (same chain, same token address). Decoupled from the hook so callers
|
|
23
|
+
* can branch their UI before mounting the hook.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isAaveNativeSupplyContext({ apiKey, sourceAsset, checkoutConfig, }: AaveNativeSupplyContextArgs): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Stringify an amount for Aave's `bigDecimal()`. Prefers the precise
|
|
28
|
+
* base-unit Dnum (carries the token's real decimals) so we don't ship
|
|
29
|
+
* float noise like "0.30000000000000004" to the API. Falls back to the
|
|
30
|
+
* raw JS-number string when the Dnum isn't populated (EXACT_OUT path).
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatSupplyAmount(tokenAmountBaseUnit: Dnum | null, fallbackAssetAmount: number | undefined): string;
|
|
33
|
+
interface UseAaveNativeSupplyArgs {
|
|
34
|
+
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
35
|
+
}
|
|
36
|
+
interface UseAaveNativeSupplyResult {
|
|
37
|
+
submit: (humanAmount: string) => Promise<{
|
|
38
|
+
txHash: Hex;
|
|
39
|
+
} | null>;
|
|
40
|
+
isPending: boolean;
|
|
41
|
+
error: Error | null;
|
|
42
|
+
}
|
|
43
|
+
export declare function useAaveNativeSupply({ checkoutItem, }: UseAaveNativeSupplyArgs): UseAaveNativeSupplyResult;
|
|
44
|
+
export {};
|
|
@@ -35,6 +35,14 @@ export type SourceChangeNext = {
|
|
|
35
35
|
selectedPaymentOption: SwappedFormOfPayment;
|
|
36
36
|
/** Payment method type filter to restore when returning */
|
|
37
37
|
paymentMethodTypeFilter: PaymentMethodType;
|
|
38
|
+
} | {
|
|
39
|
+
/**
|
|
40
|
+
* Skip the asset-select screen; land on InputAmount with the
|
|
41
|
+
* source asset pre-set on the checkout context. Used by the
|
|
42
|
+
* Native fast-path row.
|
|
43
|
+
*/
|
|
44
|
+
skipAssetSelect: true;
|
|
45
|
+
paymentMethodInfo: ConnectablePaymentMethodInfo;
|
|
38
46
|
};
|
|
39
47
|
export declare const SourceChangeInfo: ModalStepInfo<FunCheckoutStep.SOURCE_CHANGE>;
|
|
40
48
|
export declare function SourceChange({ modalState, onClose, onNext, setModalState, }: ModalStepComponentProps<FunCheckoutStep.SOURCE_CHANGE>): React.JSX.Element;
|
|
@@ -4,6 +4,12 @@ interface SourceListProps {
|
|
|
4
4
|
moreSources: ReactNode[];
|
|
5
5
|
unavailable: ReactNode[];
|
|
6
6
|
isFallback: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Pre-rendered Native fast-path row, threaded through to
|
|
9
|
+
* `buildSourceGroups`. Caller (SourceChange) owns the row's click
|
|
10
|
+
* handler since it depends on the modal's `onNext` callback.
|
|
11
|
+
*/
|
|
12
|
+
nativeRow?: ReactNode;
|
|
7
13
|
testId?: string;
|
|
8
14
|
}
|
|
9
15
|
/**
|
|
@@ -17,5 +23,5 @@ interface SourceListProps {
|
|
|
17
23
|
* `SourceList` has no DOM of its own; the primitive it returns owns
|
|
18
24
|
* the outer `data-testid` element.
|
|
19
25
|
*/
|
|
20
|
-
export declare function SourceList({ preferred, moreSources, unavailable, isFallback, testId, }: SourceListProps): React.JSX.Element;
|
|
26
|
+
export declare function SourceList({ preferred, moreSources, unavailable, isFallback, nativeRow, testId, }: SourceListProps): React.JSX.Element;
|
|
21
27
|
export {};
|
|
@@ -3,9 +3,16 @@ import { type ReactNode } from 'react';
|
|
|
3
3
|
export interface SourceGroup {
|
|
4
4
|
/** Section header. Omit to render the group's body without a header. */
|
|
5
5
|
label?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Optional tooltip surfaced via an info icon next to the label.
|
|
8
|
+
* Only renders when `showLabels` and `label` are both set.
|
|
9
|
+
*/
|
|
10
|
+
labelTooltip?: string;
|
|
6
11
|
children: ReactNode;
|
|
7
12
|
}
|
|
8
13
|
interface BuildSourceGroupsArgs {
|
|
14
|
+
/** Customer identity — used to dispatch to per-customer section composition. */
|
|
15
|
+
apiKey: string;
|
|
9
16
|
preferred: ReactNode[];
|
|
10
17
|
moreSources: ReactNode[];
|
|
11
18
|
unavailable: ReactNode[];
|
|
@@ -13,6 +20,14 @@ interface BuildSourceGroupsArgs {
|
|
|
13
20
|
isSwappedEnabled: boolean;
|
|
14
21
|
enableSourceGroupLabels: boolean;
|
|
15
22
|
t: TFunction;
|
|
23
|
+
/**
|
|
24
|
+
* Pre-rendered Native fast-path row. Caller resolves the customer's
|
|
25
|
+
* native asset, looks up the wallet holding, and constructs the row
|
|
26
|
+
* component; this function decides where in the Aave section
|
|
27
|
+
* structure it belongs. Only the Aave branch consumes it; the
|
|
28
|
+
* default branch ignores it.
|
|
29
|
+
*/
|
|
30
|
+
nativeRow?: ReactNode;
|
|
16
31
|
}
|
|
17
32
|
export type BuildSourceGroupsResult = {
|
|
18
33
|
layout: 'flat';
|
|
@@ -24,11 +39,12 @@ export type BuildSourceGroupsResult = {
|
|
|
24
39
|
};
|
|
25
40
|
/**
|
|
26
41
|
* Composes source-list sections from `usePaymentSources` buckets +
|
|
27
|
-
* the relevant Statsig flags. Returns a
|
|
28
|
-
* the composer (`SourceList`) dispatches
|
|
29
|
-
* primitive.
|
|
42
|
+
* the relevant Statsig flags + the customer identity. Returns a
|
|
43
|
+
* discriminated layout shape; the composer (`SourceList`) dispatches
|
|
44
|
+
* to the matching layout primitive.
|
|
30
45
|
*
|
|
31
|
-
* Default
|
|
46
|
+
* **Default branch** (most customers) mirrors SourceList's prior
|
|
47
|
+
* output:
|
|
32
48
|
* - `isSwappedEnabled=false` → flat layout. One group for `preferred`
|
|
33
49
|
* (if any), one combined group for `moreSources + unavailable` (if
|
|
34
50
|
* any), with a single divider between them. (`SourceList` places
|
|
@@ -39,9 +55,16 @@ export type BuildSourceGroupsResult = {
|
|
|
39
55
|
* "Other options" header is suppressed when no preferred group
|
|
40
56
|
* precedes it.
|
|
41
57
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
58
|
+
* **Aave branch** (per Figma, [ENG-3743](https://linear.app/funxyz/issue/ENG-3743)
|
|
59
|
+
* + [ENG-3747](https://linear.app/funxyz/issue/ENG-3747)
|
|
60
|
+
* + [ENG-3755](https://linear.app/funxyz/issue/ENG-3755)):
|
|
61
|
+
* - "Native" section with the user's underlying-asset row when
|
|
62
|
+
* `nativeRow` is provided.
|
|
63
|
+
* - Second section flattens preferred + moreSources + unavailable
|
|
64
|
+
* into "Use other assets" (with native present) or "Use any asset"
|
|
65
|
+
* (without). Header carries a tooltip via `labelTooltip`.
|
|
66
|
+
* - Layout is always `grouped` with `showLabels=true` for Aave so the
|
|
67
|
+
* section headers render.
|
|
45
68
|
*/
|
|
46
|
-
export declare function buildSourceGroups(
|
|
69
|
+
export declare function buildSourceGroups(args: BuildSourceGroupsArgs): BuildSourceGroupsResult;
|
|
47
70
|
export {};
|
|
@@ -6,14 +6,20 @@ export interface SourceTokenOption {
|
|
|
6
6
|
label: string;
|
|
7
7
|
iconSrc?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function WithdrawAmountInput({
|
|
9
|
+
export declare function WithdrawAmountInput({ withdrawalInputAmount, setWithdrawalInputAmount, sourceTokenBalance, isWithdrawAmountTooLow, isWithdrawAmountValid, minWithdrawalDisplayValue, config, sourceTokenOptions, onSourceTokenChange, selectedSourceToken, sourceTokenUsdPrice, }: {
|
|
10
10
|
config: Exclude<FunkitWithdrawalConfig, MultiMethodWithdrawalConfig>;
|
|
11
11
|
sourceTokenBalance: string;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
/** User-entered amount in source-token units (e.g. "0.5" for 0.5 ETH). */
|
|
13
|
+
withdrawalInputAmount: string;
|
|
14
|
+
setWithdrawalInputAmount: (s: string) => void;
|
|
14
15
|
isWithdrawAmountTooLow: boolean;
|
|
15
16
|
isWithdrawAmountValid: boolean;
|
|
16
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Minimum-withdrawal value formatted for display. Token units when the
|
|
19
|
+
* config provides `getMinWithdrawalAmount` (Lighter Secure); USD otherwise.
|
|
20
|
+
* The component picks the rendering style from `isLighter`.
|
|
21
|
+
*/
|
|
22
|
+
minWithdrawalDisplayValue: number;
|
|
17
23
|
sourceTokenOptions?: SourceTokenOption[];
|
|
18
24
|
onSourceTokenChange?: (opt: SourceTokenOption) => void;
|
|
19
25
|
/** Currently selected source token symbol (drives chip label + icon). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Hex } from 'viem';
|
|
3
|
-
import type { CustomWithdrawalConfig, FunkitActiveWithdrawalItem, WalletWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
|
|
3
|
+
import type { CustomWithdrawalConfig, FunkitActiveWithdrawalItem, FunkitCheckoutConfig, WalletWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
|
|
4
4
|
import { type WithdrawalFormData } from './useWithdrawal';
|
|
5
5
|
/**
|
|
6
6
|
* WithdrawalContent only operates on concrete single-method withdrawal configs.
|
|
@@ -12,6 +12,37 @@ interface WithdrawContentProps {
|
|
|
12
12
|
config: FunkitWithdrawalConfig;
|
|
13
13
|
withdrawalItem: FunkitActiveWithdrawalItem | null;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Converts a source-token amount string to its USD value using the given unit
|
|
17
|
+
* price. Returns `undefined` when the price is not yet loaded so callers can
|
|
18
|
+
* differentiate "still loading" from "actually $0".
|
|
19
|
+
*
|
|
20
|
+
* Exported for testing.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toUsdValue(sourceAmount: string, sourceTokenUsdPrice: number | undefined): number | undefined;
|
|
23
|
+
export declare function isValidWithdrawal({ config, checkoutConfig, withdrawalInputAmount, sourceTokenUsdPrice, recipientAddress, selectedChainId, sourceTokenBalance, selectedSourceToken, }: {
|
|
24
|
+
config: FunkitWithdrawalConfig;
|
|
25
|
+
checkoutConfig: FunkitCheckoutConfig | undefined;
|
|
26
|
+
/** User-entered amount in source-token units (e.g. "0.5" for 0.5 ETH). */
|
|
27
|
+
withdrawalInputAmount: string;
|
|
28
|
+
/**
|
|
29
|
+
* USD price per unit of the source token. Hardcoded to 1 for stablecoin
|
|
30
|
+
* sources; only Lighter Secure resolves a live spot price, and that path
|
|
31
|
+
* uses `getMinWithdrawalAmount` (per-token) which takes priority over the
|
|
32
|
+
* USD-min branch — so this field is only meaningfully consumed when it's 1.
|
|
33
|
+
*/
|
|
34
|
+
sourceTokenUsdPrice: number;
|
|
35
|
+
sourceTokenBalance: string;
|
|
36
|
+
recipientAddress: string;
|
|
37
|
+
selectedChainId: number | undefined;
|
|
38
|
+
selectedSourceToken: string | undefined;
|
|
39
|
+
}): {
|
|
40
|
+
isValidAddress: boolean;
|
|
41
|
+
isValidAddressAndChain: boolean;
|
|
42
|
+
isWithdrawAmountTooLow: boolean;
|
|
43
|
+
isWithdrawAmountValid: boolean;
|
|
44
|
+
minWithdrawalDisplayValue: number;
|
|
45
|
+
};
|
|
15
46
|
/**
|
|
16
47
|
* Builds the source-token options list for the Lighter compound input dropdown.
|
|
17
48
|
* Currently returns a single option per config; expands when Lighter exposes
|
|
@@ -17,8 +17,7 @@ export type WithdrawalFormData = {
|
|
|
17
17
|
quote?: FunkitCheckoutQuoteResult;
|
|
18
18
|
/** Lighter asset index for quoteless Secure withdrawal. */
|
|
19
19
|
lighterAssetIndex?: number;
|
|
20
|
-
|
|
21
|
-
userInputAmount?: string;
|
|
20
|
+
userInputAmount: string;
|
|
22
21
|
};
|
|
23
22
|
export declare function useWithdrawal({ config, withdrawalItem, onSuccess, }: {
|
|
24
23
|
config: FunkitWithdrawalConfig;
|
|
@@ -27,6 +27,14 @@ interface FunkitCheckoutContextInterface {
|
|
|
27
27
|
updateCustomRecipient: (recipient: Address) => void;
|
|
28
28
|
confirmCheckout(quote: FunkitCheckoutQuoteResult, stepMessageSetter: (m: string) => void, withdrawalClient?: WithdrawalClient, preWithdrawalTxs?: WithdrawalTransaction[]): Promise<Address>;
|
|
29
29
|
cancelCheckout(depositAddress: Address): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Partial-update the active checkout item. Exposed for direct-execution
|
|
32
|
+
* fast-paths that bypass `confirmCheckout` (e.g. Aave native supply) and
|
|
33
|
+
* need to sync `checkoutItem.depositAddress` themselves. TODO(ENG-3966):
|
|
34
|
+
* fold these call sites into a shared orchestration helper so this
|
|
35
|
+
* doesn't need to be public.
|
|
36
|
+
*/
|
|
37
|
+
updateActiveCheckout: (data: Partial<FunkitActiveCheckoutItem> | ((checkoutItem: FunkitActiveCheckoutItem) => Partial<FunkitActiveCheckoutItem>)) => void;
|
|
30
38
|
/** @deprecated to be removed after quote migration is finished (historically named setCheckoutQuote) */
|
|
31
39
|
setCheckout: (checkout: FunkitActiveCheckoutItem) => void;
|
|
32
40
|
setCompletedTimestamp(timestampMs: number): void;
|
|
@@ -158,6 +158,12 @@ export interface WithdrawalParam {
|
|
|
158
158
|
lighterAssetIndex?: number;
|
|
159
159
|
/** User-entered amount in token units for quoteless flows (avoids overloading quoteId). */
|
|
160
160
|
userInputAmount?: string;
|
|
161
|
+
/**
|
|
162
|
+
* USD value of the withdrawal as computed by the modal (token amount × live
|
|
163
|
+
* spot price). Provided so quoteless flows (e.g. Lighter Secure) don't need
|
|
164
|
+
* a separate price round-trip to compute `estTotalUsd` for tracking.
|
|
165
|
+
*/
|
|
166
|
+
withdrawalUSD?: string;
|
|
161
167
|
}
|
|
162
168
|
/**
|
|
163
169
|
* A single entry in a {@link MultiMethodWithdrawalConfig}.
|
|
@@ -11,6 +11,7 @@ export interface FunkitTextCustomizationsConfig {
|
|
|
11
11
|
sourceMethodTitle: string;
|
|
12
12
|
tokensListTitle: string;
|
|
13
13
|
transferTokens: string;
|
|
14
|
+
bitcoinLightning: string;
|
|
14
15
|
receiveDropdownTitle: string;
|
|
15
16
|
receiveDropdownLabel: string;
|
|
16
17
|
txStatus?: {
|
|
@@ -58,6 +59,7 @@ export interface FunkitTextCustomizationsConfig {
|
|
|
58
59
|
debitOrCredit?: string;
|
|
59
60
|
paypal?: string;
|
|
60
61
|
transferTokens?: string;
|
|
62
|
+
bitcoinLightning?: string;
|
|
61
63
|
virtualFiat?: string;
|
|
62
64
|
};
|
|
63
65
|
}
|
package/dist/wagmi/actions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Config } from 'wagmi';
|
|
2
2
|
import { type GetBalanceParameters, type GetBalanceReturnType } from 'wagmi/actions';
|
|
3
|
-
export { estimateGas, getGasPrice, getTransaction, multicall, readContract, } from 'wagmi/actions';
|
|
3
|
+
export { estimateGas, getGasPrice, getTransaction, getWalletClient, multicall, readContract, } from 'wagmi/actions';
|
|
4
4
|
export type GetBalanceReturnTypeCompat = GetBalanceReturnType & {
|
|
5
5
|
formatted: string;
|
|
6
6
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-FMVNQKZL.js";
|
|
4
|
+
} from "../chunk-6DRCY52E.js";
|
|
6
5
|
import "../chunk-YYYRPQHB.js";
|
|
6
|
+
import "../chunk-FMVNQKZL.js";
|
|
7
7
|
import "../chunk-3K2MFXCO.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-FMVNQKZL.js";
|
|
4
|
+
} from "../chunk-YIEASHLS.js";
|
|
6
5
|
import "../chunk-YYYRPQHB.js";
|
|
6
|
+
import "../chunk-FMVNQKZL.js";
|
|
7
7
|
import "../chunk-3K2MFXCO.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-FMVNQKZL.js";
|
|
4
|
+
} from "../chunk-DEFRRPXB.js";
|
|
6
5
|
import "../chunk-YYYRPQHB.js";
|
|
6
|
+
import "../chunk-FMVNQKZL.js";
|
|
7
7
|
import "../chunk-3K2MFXCO.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-FMVNQKZL.js";
|
|
4
|
+
} from "../chunk-XVBSJCW5.js";
|
|
6
5
|
import "../chunk-YYYRPQHB.js";
|
|
6
|
+
import "../chunk-FMVNQKZL.js";
|
|
7
7
|
import "../chunk-3K2MFXCO.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-FMVNQKZL.js";
|
|
4
|
+
} from "../chunk-UDTBQV4Q.js";
|
|
6
5
|
import "../chunk-YYYRPQHB.js";
|
|
6
|
+
import "../chunk-FMVNQKZL.js";
|
|
7
7
|
import "../chunk-3K2MFXCO.js";
|
|
8
8
|
export {
|
|
9
9
|
frontierWallet
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-A5EZBNME.js";
|
|
5
5
|
import {
|
|
6
6
|
zerionWallet
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KWX2SYU2.js";
|
|
8
8
|
import {
|
|
9
9
|
tahoWallet
|
|
10
10
|
} from "./chunk-KS5MJNGD.js";
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
} from "./chunk-T3VMQBBI.js";
|
|
14
14
|
import {
|
|
15
15
|
tokenPocketWallet
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HXWUH73P.js";
|
|
17
17
|
import {
|
|
18
18
|
tokenaryWallet
|
|
19
19
|
} from "./chunk-R7X5RIO7.js";
|
|
20
|
+
import {
|
|
21
|
+
trustWallet
|
|
22
|
+
} from "./chunk-T4ROGPMF.js";
|
|
20
23
|
import {
|
|
21
24
|
uniswapWallet
|
|
22
25
|
} from "./chunk-UKSIXGWC.js";
|
|
23
|
-
import {
|
|
24
|
-
trustWallet
|
|
25
|
-
} from "./chunk-FWM4KTOV.js";
|
|
26
26
|
import {
|
|
27
27
|
walletConnectWallet
|
|
28
28
|
} from "./chunk-O7ZCUI2Y.js";
|
|
@@ -31,31 +31,31 @@ import {
|
|
|
31
31
|
} from "./chunk-KSNA53EX.js";
|
|
32
32
|
import {
|
|
33
33
|
rainbowWallet
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LCIPVVH5.js";
|
|
35
35
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
36
|
+
oneKeyWallet
|
|
37
|
+
} from "./chunk-E3NZE4UP.js";
|
|
38
38
|
import {
|
|
39
39
|
ramperWallet
|
|
40
40
|
} from "./chunk-P4E2ZFQB.js";
|
|
41
41
|
import {
|
|
42
42
|
roninWallet
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-FG2LDVXL.js";
|
|
44
44
|
import {
|
|
45
45
|
safeWallet
|
|
46
46
|
} from "./chunk-BHAPTB57.js";
|
|
47
47
|
import {
|
|
48
48
|
safeheronWallet
|
|
49
49
|
} from "./chunk-AM5MSNVQ.js";
|
|
50
|
-
import {
|
|
51
|
-
safepalWallet
|
|
52
|
-
} from "./chunk-VMMROPXK.js";
|
|
53
50
|
import {
|
|
54
51
|
subWallet
|
|
55
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-APHCF4DT.js";
|
|
53
|
+
import {
|
|
54
|
+
safepalWallet
|
|
55
|
+
} from "./chunk-34HACM5U.js";
|
|
56
56
|
import {
|
|
57
57
|
metaMaskWallet
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-7V33VJAL.js";
|
|
59
59
|
import {
|
|
60
60
|
mewWallet
|
|
61
61
|
} from "./chunk-DP5ICBEB.js";
|
|
@@ -64,31 +64,31 @@ import {
|
|
|
64
64
|
} from "./chunk-BBPTPMH7.js";
|
|
65
65
|
import {
|
|
66
66
|
okxWallet
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-HRDPUW3V.js";
|
|
68
68
|
import {
|
|
69
69
|
omniWallet
|
|
70
70
|
} from "./chunk-G3RQSCYR.js";
|
|
71
71
|
import {
|
|
72
72
|
oneInchWallet
|
|
73
73
|
} from "./chunk-EUMOVTRQ.js";
|
|
74
|
-
import {
|
|
75
|
-
oneKeyWallet
|
|
76
|
-
} from "./chunk-E3NZE4UP.js";
|
|
77
74
|
import {
|
|
78
75
|
phantomWallet
|
|
79
76
|
} from "./chunk-57GN4W23.js";
|
|
77
|
+
import {
|
|
78
|
+
rabbyWallet
|
|
79
|
+
} from "./chunk-7PVUEV4M.js";
|
|
80
80
|
import {
|
|
81
81
|
foxWallet
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-ZPSPK6LH.js";
|
|
83
83
|
import {
|
|
84
84
|
frameWallet
|
|
85
85
|
} from "./chunk-MTJIPVYB.js";
|
|
86
86
|
import {
|
|
87
87
|
frontierWallet
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-UDTBQV4Q.js";
|
|
89
89
|
import {
|
|
90
90
|
gateWallet
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-VJZWNQOF.js";
|
|
92
92
|
import {
|
|
93
93
|
imTokenWallet
|
|
94
94
|
} from "./chunk-BWLMNATA.js";
|
|
@@ -102,20 +102,23 @@ import {
|
|
|
102
102
|
ledgerWallet
|
|
103
103
|
} from "./chunk-V4EXM3KB.js";
|
|
104
104
|
import {
|
|
105
|
-
|
|
106
|
-
} from "./chunk-
|
|
107
|
-
import {
|
|
108
|
-
coin98Wallet
|
|
109
|
-
} from "./chunk-RZQ4B4Z7.js";
|
|
110
|
-
import {
|
|
111
|
-
bybitWallet
|
|
112
|
-
} from "./chunk-7IEUTLHY.js";
|
|
105
|
+
braveWallet
|
|
106
|
+
} from "./chunk-XVH4JIXB.js";
|
|
113
107
|
import {
|
|
114
108
|
coinbaseWallet
|
|
115
109
|
} from "./chunk-OUM6H3WU.js";
|
|
110
|
+
import {
|
|
111
|
+
coin98Wallet
|
|
112
|
+
} from "./chunk-XVBSJCW5.js";
|
|
113
|
+
import {
|
|
114
|
+
clvWallet
|
|
115
|
+
} from "./chunk-5TN5Z2WY.js";
|
|
116
116
|
import {
|
|
117
117
|
coreWallet
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-V6UOWTEZ.js";
|
|
119
|
+
import {
|
|
120
|
+
enkryptWallet
|
|
121
|
+
} from "./chunk-2DKNXOPL.js";
|
|
119
122
|
import {
|
|
120
123
|
dawnWallet
|
|
121
124
|
} from "./chunk-PARFRRNI.js";
|
|
@@ -123,14 +126,14 @@ import {
|
|
|
123
126
|
desigWallet
|
|
124
127
|
} from "./chunk-TNVLCMJD.js";
|
|
125
128
|
import {
|
|
126
|
-
|
|
127
|
-
} from "./chunk-
|
|
129
|
+
argentWallet
|
|
130
|
+
} from "./chunk-XTD6OMZP.js";
|
|
128
131
|
import {
|
|
129
132
|
bifrostWallet
|
|
130
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-6DRCY52E.js";
|
|
131
134
|
import {
|
|
132
135
|
bitgetWallet
|
|
133
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-YIEASHLS.js";
|
|
134
137
|
import {
|
|
135
138
|
bitskiWallet
|
|
136
139
|
} from "./chunk-Y36HPFB3.js";
|
|
@@ -141,13 +144,10 @@ import {
|
|
|
141
144
|
bloomWallet
|
|
142
145
|
} from "./chunk-S6R4B763.js";
|
|
143
146
|
import {
|
|
144
|
-
|
|
145
|
-
} from "./chunk-
|
|
146
|
-
import "./chunk-FMVNQKZL.js";
|
|
147
|
-
import {
|
|
148
|
-
braveWallet
|
|
149
|
-
} from "./chunk-XVH4JIXB.js";
|
|
147
|
+
bybitWallet
|
|
148
|
+
} from "./chunk-DEFRRPXB.js";
|
|
150
149
|
import "./chunk-YYYRPQHB.js";
|
|
150
|
+
import "./chunk-FMVNQKZL.js";
|
|
151
151
|
import "./chunk-3K2MFXCO.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-FMVNQKZL.js";
|
|
4
|
+
} from "../chunk-7V33VJAL.js";
|
|
6
5
|
import "../chunk-YYYRPQHB.js";
|
|
6
|
+
import "../chunk-FMVNQKZL.js";
|
|
7
7
|
import "../chunk-3K2MFXCO.js";
|
|
8
8
|
export {
|
|
9
9
|
metaMaskWallet
|