@funkit/connect 13.1.1 → 13.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 +94 -0
- package/dist/{chunk-53FF4ZHH.js → chunk-SJ7E3DKC.js} +6 -0
- package/dist/{chunk-2RND3WWH.js → chunk-V4VFNIG4.js} +6 -0
- package/dist/clients/aave.d.ts +1 -1
- package/dist/clients/{chunk-44LV4GCX.js → chunk-2INCUCQQ.js} +1 -0
- package/dist/clients/chunk-6JL6PF5P.js +22 -0
- package/dist/clients/chunk-747THMHY.js +185 -0
- package/dist/clients/{chunk-Q4JGDB4L.js → chunk-BMU5EYUJ.js} +8 -24
- package/dist/clients/{chunk-T6YNXIOS.js → chunk-HBW7AZUH.js} +7 -5
- package/dist/clients/{chunk-ZBBYOJWK.js → chunk-KDZFZETH.js} +176 -0
- package/dist/clients/{chunk-D6EY2WW4.js → chunk-PVBHWD47.js} +1 -1
- package/dist/clients/chunk-RNTQ7KEL.js +76 -0
- package/dist/clients/{chunk-ZEXIDBIZ.js → chunk-RTHDOT5K.js} +1 -1
- package/dist/clients/{chunk-AJGDTTRJ.js → chunk-SKYQYPX5.js} +58 -2
- package/dist/clients/{chunk-NNMZMHO6.js → chunk-Z6FHIDTD.js} +5 -5
- package/dist/clients/fanatics.css +3136 -2947
- package/dist/clients/fanatics.js +1 -1
- package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +12 -77
- package/dist/clients/internal/nado/withdrawalStatus.css +18233 -0
- package/dist/clients/internal/nado/withdrawalStatus.js +218 -20
- package/dist/clients/lighter.css +3519 -2947
- package/dist/clients/lighter.js +5 -7
- package/dist/clients/mallard.d.ts +24 -3
- package/dist/clients/mallard.js +7 -3
- package/dist/clients/nado.js +4 -4
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +4 -3
- package/dist/clients/polymarket/index.js +9 -7
- package/dist/clients/polymarket/polymarket.js +6 -4
- package/dist/components/Box/Box.d.ts +18 -18
- package/dist/components/Dropdown/BaseDropdownItem.d.ts +1 -1
- package/dist/components/FunAsset/FunAssetItem.d.ts +3 -1
- package/dist/components/FunBadge/FunBadge.d.ts +1 -1
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +2 -3
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.track.d.ts +2 -3
- package/dist/components/ModalErrorState/ModalErrorState.d.ts +2 -3
- package/dist/consts/customers.d.ts +1 -1
- package/dist/consts/polymarket.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +24 -18
- package/dist/domains/clientMetadata.d.ts +2 -1
- package/dist/domains/convert/hostTimeout.d.ts +1 -1
- package/dist/domains/destinationAssetBalance.d.ts +1 -1
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +2 -3
- package/dist/hooks/statsig/index.d.ts +1 -0
- package/dist/hooks/track/analytics/mappers.d.ts +11 -1
- package/dist/hooks/track/analytics/swappedErrorCode.d.ts +1 -0
- package/dist/hooks/track/analytics/useTrackErrorShown.d.ts +2 -3
- package/dist/hooks/useConvertBalances.d.ts +6 -1
- package/dist/hooks/useFunkitMaxCheckoutUsdInfo.d.ts +3 -3
- package/dist/hooks/useHostDepositSettlement.d.ts +12 -0
- package/dist/hooks/useModalStateValueWithProp.d.ts +1 -1
- package/dist/hooks/useRefreshBalancesOnDeposit.d.ts +20 -0
- package/dist/index.css +3519 -2947
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6179 -3864
- package/dist/interfaces/solanaWallet.d.ts +2 -2
- package/dist/modals/CheckoutModal/FiatV2/FiatV2Step.d.ts +19 -0
- package/dist/modals/CheckoutModal/FiatV2/fiatV2DepositInputs.d.ts +38 -0
- package/dist/modals/CheckoutModal/FiatV2/fiatV2PaymentSelectionEffects.d.ts +26 -0
- package/dist/modals/CheckoutModal/FiatV2/useFiatV2DepositInputs.d.ts +6 -0
- package/dist/modals/CheckoutModal/FiatV2/useFiatV2PaymentSelectionHost.d.ts +22 -0
- package/dist/modals/CheckoutModal/FiatV2/useFiatV2Text.d.ts +7 -0
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +3 -1
- package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +3 -3
- package/dist/modals/CheckoutModal/SourceChange/AddCardItem.d.ts +9 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +5 -0
- package/dist/modals/CheckoutModal/SourceChange/fiatV2Reroute.d.ts +24 -0
- package/dist/modals/CheckoutModal/SourceChange/useAddCardRow.d.ts +13 -0
- package/dist/modals/CheckoutModal/SourceChange/useFiatV2Entry.d.ts +21 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -0
- package/dist/modals/PolymarketPerpsTransfer/TransferActionButton.d.ts +5 -5
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +2 -3
- package/dist/providers/FunSessionContext.d.ts +20 -0
- package/dist/providers/FunkitCheckoutContext/index.d.ts +7 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +30 -0
- package/dist/providers/FunkitProvider.d.ts +7 -0
- package/dist/providers/FunkitQuoteContext.track.d.ts +2 -3
- package/dist/providers/FunkitThemeProvider.d.ts +9 -0
- package/dist/shadow-css.js +1 -1
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/checkout.d.ts +2 -2
- package/dist/utils/localStorageFunSessionStorage.d.ts +9 -0
- package/dist/v2/components/PrimaryButton.css.d.ts +5 -0
- package/dist/v2/components/PrimaryButton.d.ts +16 -0
- package/dist/v2/components/Sheet.css.d.ts +13 -0
- package/dist/v2/components/Sheet.d.ts +23 -0
- package/dist/v2/components/Spinner.css.d.ts +2 -0
- package/dist/v2/components/Spinner.d.ts +6 -0
- package/dist/v2/flows/fiat/FiatDepositGate.d.ts +20 -0
- package/dist/v2/flows/fiat/FiatScreenPicker.d.ts +37 -0
- package/dist/v2/flows/funLogin/FunLoginScreenPicker.d.ts +30 -0
- package/dist/v2/screens/amount/AmountDisplay.css.d.ts +5 -0
- package/dist/v2/screens/amount/AmountDisplay.d.ts +15 -0
- package/dist/v2/screens/amount/AmountScreen.css.d.ts +2 -0
- package/dist/v2/screens/amount/AmountScreen.d.ts +37 -0
- package/dist/v2/screens/amount/PresetButton.css.d.ts +1 -0
- package/dist/v2/screens/amount/PresetButton.d.ts +9 -0
- package/dist/v2/screens/amount/fittedText/useFittedText.d.ts +19 -0
- package/dist/v2/screens/amount/fittedText/useIsomorphicEffect.d.ts +2 -0
- package/dist/v2/screens/amount/fittedText/useTextMeasurer.d.ts +3 -0
- package/dist/v2/screens/amount/typedAmount/amountText.d.ts +37 -0
- package/dist/v2/screens/amount/typedAmount/attachInputNormalization.d.ts +1 -0
- package/dist/v2/screens/fiat/FiatPlaceholderScreen.d.ts +9 -0
- package/dist/v2/screens/funLogin/FunLoginCodeScreen.d.ts +35 -0
- package/dist/v2/screens/funLogin/FunLoginEmailScreen.d.ts +26 -0
- package/dist/v2/screens/funLogin/FunLoginScreen.css.d.ts +20 -0
- package/dist/v2/screens/funLogin/looksLikeEmail.d.ts +5 -0
- package/dist/v2/theme/colors.d.ts +28 -0
- package/dist/v2/theme/fonts.d.ts +9 -0
- package/dist/v2/theme/radii.d.ts +6 -0
- package/dist/wallets/walletConnectors/index.js +39 -39
- package/package.json +4 -4
- package/dist/clients/chunk-JXTKKLVA.js +0 -185
- package/dist/clients/chunk-PZSKO3BJ.js +0 -60
- package/dist/components/FunPayments/icons/coinbase.d.ts +0 -5
package/dist/clients/lighter.js
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
LIGHTER_API_KEY_BY_CHAIN_ID,
|
|
4
|
+
useFunkitConfig,
|
|
4
5
|
useLighterAccountQuery,
|
|
5
6
|
useLighterAccountsQuery
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
useFunkitConfig
|
|
9
|
-
} from "./chunk-AJGDTTRJ.js";
|
|
7
|
+
} from "./chunk-SKYQYPX5.js";
|
|
10
8
|
import {
|
|
11
9
|
Box,
|
|
12
10
|
hasRemoteImageLoaded,
|
|
13
11
|
markRemoteImageLoaded,
|
|
14
12
|
useAsyncImage
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-747THMHY.js";
|
|
16
14
|
import {
|
|
17
15
|
useFunkitTranslation
|
|
18
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RTHDOT5K.js";
|
|
19
17
|
import "./chunk-OODIKHYE.js";
|
|
20
18
|
import "./chunk-2W2P3OS6.js";
|
|
21
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-KDZFZETH.js";
|
|
22
20
|
import {
|
|
23
21
|
logger
|
|
24
22
|
} from "./chunk-B67ESBGC.js";
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { type ReactNode } from 'react';
|
|
18
18
|
import { type Address } from 'viem';
|
|
19
19
|
import type { GetDestinationAssetBalances } from '../domains/destinationAssetBalance';
|
|
20
|
-
import type { DynamicTargetAssetCandidate, FunkitCheckoutActionParams, FunkitCheckoutConfig, TokenInfo, WalletWithdrawalConfig } from '../providers/FunkitCheckoutContext/types';
|
|
20
|
+
import type { DynamicTargetAssetCandidate, FunkitCheckoutActionParams, FunkitCheckoutConfig, FunkitDepositSettlementContext, FunkitDepositSettlementResult, ModalTitleContext, TokenInfo, WalletWithdrawalConfig } from '../providers/FunkitCheckoutContext/types';
|
|
21
21
|
/** Mallard deposit contract to credit a Mallard (perps) account. */
|
|
22
22
|
export declare const MALLARD_DEPOSIT_ADDRESS: `0x${string}`;
|
|
23
23
|
/** VaultDepositooor on Zorro chain. */
|
|
@@ -113,12 +113,33 @@ export interface CreateMallardDepositConfigParams {
|
|
|
113
113
|
* the menu without balances.
|
|
114
114
|
*/
|
|
115
115
|
getAssetBalances?: GetDestinationAssetBalances;
|
|
116
|
+
/**
|
|
117
|
+
* Maximum USD the user may deposit for the selected asset. Called with the
|
|
118
|
+
* asset's chain, address and routing id. Return a negative number for no
|
|
119
|
+
* maximum. Must not be below the asset's minimum.
|
|
120
|
+
*/
|
|
121
|
+
getMaxDepositUSD?: (asset: ModalTitleContext) => number;
|
|
122
|
+
/**
|
|
123
|
+
* @experimental
|
|
124
|
+
* Async check on a delivered deposit, called once before the user sees the
|
|
125
|
+
* success screen. Runs for wallet deposits only.
|
|
126
|
+
*
|
|
127
|
+
* Return `{ type: 'error', message }` to reject: the message is shown to the
|
|
128
|
+
* user as written. A rejection does not fire `onError`, so run your own
|
|
129
|
+
* error handling before you return it. Return `{ type: 'success' }` or
|
|
130
|
+
* nothing to accept.
|
|
131
|
+
*
|
|
132
|
+
* A throw is not a rejection. If the check throws or does not answer within
|
|
133
|
+
* a fixed limit, the deposit shows as successful. Stop your own polling when
|
|
134
|
+
* `signal` aborts.
|
|
135
|
+
*/
|
|
136
|
+
onDepositSettlement?: (context: FunkitDepositSettlementContext) => Promise<FunkitDepositSettlementResult | void>;
|
|
116
137
|
}
|
|
117
138
|
/**
|
|
118
|
-
* Builds routing and deposit actions for the integrator's complete
|
|
139
|
+
* Builds routing and deposit actions for the integrator's complete catalog.
|
|
119
140
|
* For translated modal titles, spread the result and override `modalTitle`
|
|
120
141
|
* with a string or a resolver keyed by `dynamicRoutingId`.
|
|
121
142
|
*/
|
|
122
|
-
export declare function createMallardDepositConfig({ address, accounts, getAssetBalances, }: CreateMallardDepositConfigParams): FunkitCheckoutConfig & {
|
|
143
|
+
export declare function createMallardDepositConfig({ address, accounts, getAssetBalances, getMaxDepositUSD, onDepositSettlement, }: CreateMallardDepositConfigParams): FunkitCheckoutConfig & {
|
|
123
144
|
dynamicTargetAssetCandidates: DynamicTargetAssetCandidate[];
|
|
124
145
|
};
|
package/dist/clients/mallard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useFunkitTranslation
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RTHDOT5K.js";
|
|
5
5
|
import {
|
|
6
6
|
getAccount,
|
|
7
7
|
sendTransaction,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useAccount,
|
|
15
15
|
useConfig
|
|
16
16
|
} from "./chunk-2W2P3OS6.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-KDZFZETH.js";
|
|
18
18
|
import {
|
|
19
19
|
logger
|
|
20
20
|
} from "./chunk-B67ESBGC.js";
|
|
@@ -298,7 +298,9 @@ function getMallardAssets({
|
|
|
298
298
|
function createMallardDepositConfig({
|
|
299
299
|
address,
|
|
300
300
|
accounts,
|
|
301
|
-
getAssetBalances
|
|
301
|
+
getAssetBalances,
|
|
302
|
+
getMaxDepositUSD,
|
|
303
|
+
onDepositSettlement
|
|
302
304
|
}) {
|
|
303
305
|
const candidates = getMallardAssets({ address, accounts });
|
|
304
306
|
const destinationAccountConfig = {
|
|
@@ -334,6 +336,8 @@ function createMallardDepositConfig({
|
|
|
334
336
|
dynamicRoutingId: initialCandidate.dynamicRoutingId,
|
|
335
337
|
destinationAccountConfig,
|
|
336
338
|
dynamicTargetAssetCandidates: candidates,
|
|
339
|
+
getMaxDepositUSD,
|
|
340
|
+
onDepositSettlement,
|
|
337
341
|
// Route-specific UDA settings take precedence, including Spot's absent action.
|
|
338
342
|
qrcodeActionType: "MALLARD_PERPS",
|
|
339
343
|
generateActionsParams: initialCandidate.generateActionsParams
|
package/dist/clients/nado.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-Z6FHIDTD.js";
|
|
5
|
+
import "./chunk-PVBHWD47.js";
|
|
6
|
+
import "./chunk-2INCUCQQ.js";
|
|
7
7
|
import "./chunk-LICTGZXW.js";
|
|
8
8
|
import "./chunk-OODIKHYE.js";
|
|
9
9
|
import {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-2W2P3OS6.js";
|
|
13
13
|
import {
|
|
14
14
|
i18n_default
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KDZFZETH.js";
|
|
16
16
|
import {
|
|
17
17
|
logger
|
|
18
18
|
} from "./chunk-B67ESBGC.js";
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createPolymarketDepositConfig,
|
|
4
4
|
createPredictionsGenerateActionParams
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-HBW7AZUH.js";
|
|
6
|
+
import "../chunk-BMU5EYUJ.js";
|
|
6
7
|
import {
|
|
7
8
|
POLYMARKET_PERPS_ROUTING_ID,
|
|
8
9
|
POLYMARKET_PREDICTIONS_ROUTING_ID
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-6JL6PF5P.js";
|
|
11
|
+
import "../chunk-2INCUCQQ.js";
|
|
11
12
|
import "../chunk-B67ESBGC.js";
|
|
12
13
|
export {
|
|
13
14
|
POLYMARKET_PERPS_ROUTING_ID,
|
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createPolymarketDepositConfig,
|
|
4
4
|
createPredictionsGenerateActionParams
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-HBW7AZUH.js";
|
|
6
6
|
import {
|
|
7
7
|
AMOUNT_PLACEHOLDER,
|
|
8
8
|
COLLATERAL_ONRAMP_ABI,
|
|
9
9
|
COLLATERAL_ONRAMP_ADDRESS,
|
|
10
|
-
POLYGON_USDCE,
|
|
11
|
-
POLYMARKET_PERPS_ROUTING_ID,
|
|
12
|
-
POLYMARKET_PREDICTIONS_ROUTING_ID,
|
|
13
|
-
PUSD_TOKEN,
|
|
14
10
|
VAULT_DEPOSITOR_ABI,
|
|
15
11
|
VAULT_DEPOSITOR_POLYGON,
|
|
16
12
|
createPerpsGenerateActionParams,
|
|
17
13
|
createPolymarketWithdrawalConfig
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import
|
|
14
|
+
} from "../chunk-BMU5EYUJ.js";
|
|
15
|
+
import {
|
|
16
|
+
POLYGON_USDCE,
|
|
17
|
+
POLYMARKET_PERPS_ROUTING_ID,
|
|
18
|
+
POLYMARKET_PREDICTIONS_ROUTING_ID,
|
|
19
|
+
PUSD_TOKEN
|
|
20
|
+
} from "../chunk-6JL6PF5P.js";
|
|
21
|
+
import "../chunk-2INCUCQQ.js";
|
|
20
22
|
import "../chunk-B67ESBGC.js";
|
|
21
23
|
export {
|
|
22
24
|
AMOUNT_PLACEHOLDER,
|
|
@@ -3,14 +3,16 @@ import {
|
|
|
3
3
|
AMOUNT_PLACEHOLDER,
|
|
4
4
|
COLLATERAL_ONRAMP_ABI,
|
|
5
5
|
COLLATERAL_ONRAMP_ADDRESS,
|
|
6
|
-
POLYGON_USDCE,
|
|
7
|
-
PUSD_TOKEN,
|
|
8
6
|
VAULT_DEPOSITOR_ABI,
|
|
9
7
|
VAULT_DEPOSITOR_POLYGON,
|
|
10
8
|
createPerpsGenerateActionParams,
|
|
11
9
|
createPolymarketWithdrawalConfig
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import
|
|
10
|
+
} from "../chunk-BMU5EYUJ.js";
|
|
11
|
+
import {
|
|
12
|
+
POLYGON_USDCE,
|
|
13
|
+
PUSD_TOKEN
|
|
14
|
+
} from "../chunk-6JL6PF5P.js";
|
|
15
|
+
import "../chunk-2INCUCQQ.js";
|
|
14
16
|
import "../chunk-B67ESBGC.js";
|
|
15
17
|
export {
|
|
16
18
|
AMOUNT_PLACEHOLDER,
|