@funkit/connect 7.1.0-next.12 → 7.1.0-next.15
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 +30 -0
- package/dist/components/Dropdown/ChainDropdown.d.ts +1 -1
- package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +1 -1
- package/dist/components/Dropdown/TokenDropdown.d.ts +1 -1
- package/dist/components/FunAsset/FunAssetItem.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +1 -1
- package/dist/components/FunCheckoutModalHeightAnimationWrapper/FunCheckoutModalHeightAnimationWrapper.d.ts +1 -1
- package/dist/components/FunNotificationBanner/FunNotificationBannerIcon.d.ts +1 -1
- package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
- package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.track.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +1 -1
- package/dist/components/FunTransactionSummary/PaymentRouteSummary.d.ts +1 -1
- package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +1 -1
- package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +2 -2
- package/dist/components/SourcePaymentMethodItem/SourcePaymentMethodItem.d.ts +1 -1
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +1 -1
- package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +1 -1
- package/dist/consts/customers.d.ts +1 -1
- package/dist/domains/asset.d.ts +2 -2
- package/dist/domains/checkout.d.ts +1 -1
- package/dist/domains/checkoutRecipient.d.ts +1 -1
- package/dist/domains/clientMetadata.d.ts +1 -1
- package/dist/domains/fees.d.ts +2 -2
- package/dist/domains/paymentMethods.d.ts +1 -1
- package/dist/domains/quote.d.ts +4 -4
- package/dist/domains/wallet.d.ts +1 -1
- package/dist/hooks/queries/useMeldDefaultCurrency.d.ts +1 -1
- package/dist/hooks/queries/useRecentCheckouts.d.ts +1 -1
- package/dist/hooks/queries/useRecentDeposits.d.ts +73 -2
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +31 -31
- package/dist/hooks/track/useTrack.d.ts +1 -1
- package/dist/hooks/useBluvo.d.ts +3 -3
- package/dist/hooks/useCheckoutDirectExecution.d.ts +3 -3
- package/dist/hooks/useCheckoutItemDisplay.d.ts +2 -2
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +2 -2
- package/dist/hooks/useCheckoutTransferInit.d.ts +1 -1
- package/dist/hooks/useCountdown.d.ts +1 -1
- package/dist/hooks/useEnabledTokenTransferChainTokens.d.ts +1 -1
- package/dist/hooks/useFrogAccount.d.ts +1 -1
- package/dist/hooks/useIsBlacklisted.d.ts +1 -1
- package/dist/hooks/useIsDynamicRoutingEnabled.d.ts +1 -1
- package/dist/hooks/useMinDeposit.d.ts +1 -1
- package/dist/hooks/useOnNewNotification.d.ts +1 -1
- package/dist/hooks/usePaymentSources.d.ts +3 -3
- package/dist/hooks/useRelayBypass.d.ts +1 -1
- package/dist/hooks/useTokenChain.d.ts +1 -1
- package/dist/hooks/useTokenTransfer.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +92 -48
- package/dist/modals/CheckoutModal/Brokerage/BrokerageSuccessModal.d.ts +1 -1
- package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +2 -2
- package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +2 -2
- package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/DisclaimerText.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/usePostCheckout.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useSourceAssetConfirm.d.ts +2 -2
- package/dist/modals/CheckoutModal/DirectExecutionNotifCenter/DirectExecutionNotifCenter.d.ts +1 -1
- package/dist/modals/CheckoutModal/DirectExecutionNotifCenter/DirectExecutionNotifCenterContent.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/AvailableBalance.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +2 -2
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +2 -2
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/useAvailableBalanceForCheckout.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +2 -2
- package/dist/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldRedirect/MeldRedirect.d.ts +1 -1
- package/dist/modals/CheckoutModal/SelectAsset.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/DefiPurchaseSection.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotification.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/types.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeCustomer.d.ts +2 -2
- package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeKyc.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/KycIframe.d.ts +2 -2
- package/dist/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount.d.ts +2 -2
- package/dist/modals/CheckoutModal/stepTransition.d.ts +5 -5
- package/dist/modals/CheckoutModal/stepTransition.track.d.ts +2 -2
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +2 -2
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.d.ts +1 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.d.ts +1 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/index.d.ts +1 -1
- package/dist/modals/WithdrwalModal/WithdrawalContent.d.ts +1 -1
- package/dist/modals/WithdrwalModal/WithdrawalModal.d.ts +1 -1
- package/dist/modals/WithdrwalModal/WithdrawalNotification.d.ts +2 -2
- package/dist/modals/WithdrwalModal/useWithdrawal.d.ts +2 -2
- package/dist/providers/FunkitBrokerageProvider.d.ts +2 -2
- package/dist/providers/FunkitCheckoutContext/track.d.ts +4 -4
- package/dist/providers/FunkitHistoryContext.d.ts +2 -2
- package/dist/providers/FunkitI18nProvider.d.ts +1 -1
- package/dist/providers/FunkitProvider.d.ts +1 -1
- package/dist/providers/FunkitQuoteContext.track.d.ts +3 -3
- package/dist/themes/darkTheme.d.ts +1 -1
- package/dist/themes/lightTheme.d.ts +1 -1
- package/dist/utils/assets.d.ts +1 -1
- package/dist/utils/bluvo.d.ts +2 -2
- package/dist/utils/checkout.d.ts +2 -2
- package/dist/utils/customer.d.ts +2 -2
- package/dist/utils/flags/patches/enable-bitcoin-patch.d.ts +1 -1
- package/dist/utils/funkitProvider.d.ts +1 -1
- package/dist/utils/payment.d.ts +1 -1
- package/dist/utils/purifyCheckoutHistoryItem.d.ts +4 -5
- package/dist/utils/withdrawal.d.ts +1 -1
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/index.js +9 -9
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CheckoutInitTokenTransferAddressParams, type CheckoutInitTokenTransferResponse, type FunAddress } from '@funkit/api-base';
|
|
2
|
-
import { type FunkitCheckoutConfig } from '
|
|
2
|
+
import { type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
3
3
|
import { type UDAConfig } from './useUDAParams';
|
|
4
4
|
interface UseCheckoutTransferInitResponse {
|
|
5
5
|
transferInit: CheckoutInitTokenTransferResponse | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type FunCountdownProps } from '
|
|
2
|
+
import { type FunCountdownProps } from '../components/FunCountdown/FunCountdown';
|
|
3
3
|
export interface UseCountdownResult {
|
|
4
4
|
countdown: ReactNode;
|
|
5
5
|
isLastSecond: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CheckoutInitTokenTransferResponse } from '@funkit/api-base';
|
|
2
|
-
import type { TokenTransferSourceChainsAndAssets } from '
|
|
2
|
+
import type { TokenTransferSourceChainsAndAssets } from '../modals/CheckoutModal/TransferToken/TransferToken';
|
|
3
3
|
export declare function useEnabledTokenTransferChainTokens(transferInit?: CheckoutInitTokenTransferResponse | null, isWithdrawal?: boolean): TokenTransferSourceChainsAndAssets;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BridgeVirtualBankAccount, type Guid } from '@funkit/api-base';
|
|
2
|
-
import { type AllFiatAccounts } from '
|
|
2
|
+
import { type AllFiatAccounts } from '../domains/bridge';
|
|
3
3
|
export declare function useFiatEnabled(): boolean;
|
|
4
4
|
export declare function useFrogAccounts(): import("@tanstack/react-query").UseQueryResult<import("@funkit/api-base").SubAccount[] | null, Error>;
|
|
5
5
|
export declare function useClearFrogAccountsCache(): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunAddress } from '@funkit/api-base';
|
|
2
|
-
import type { GeneralWalletContextProps } from '
|
|
2
|
+
import type { GeneralWalletContextProps } from '../providers/GeneralWalletProvider';
|
|
3
3
|
export declare const useIsBlacklisted: (walletAddress: GeneralWalletContextProps["walletAddress"], customRecipient?: FunAddress) => {
|
|
4
4
|
isWalletBlacklisted: boolean;
|
|
5
5
|
isCustomRecipientBlacklisted: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FunkitCheckoutConfig } from '
|
|
1
|
+
import { type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
2
2
|
export declare const useIsDynamicRoutingEnabled: ({ checkoutConfig: _checkoutConfig, }?: {
|
|
3
3
|
checkoutConfig?: FunkitCheckoutConfig;
|
|
4
4
|
}) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NotificationItem } from '
|
|
1
|
+
import type { NotificationItem } from '../modals/CheckoutModal/TransferToken/types';
|
|
2
2
|
/**
|
|
3
3
|
* This might not work if multiple instances of this hook are used in the same page
|
|
4
4
|
* since it uses sessionStorage to store the processed notifications
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ConnectablePaymentMethodInfo, PaymentMethod } from '
|
|
2
|
-
import type { FunkitCheckoutConfig } from '
|
|
1
|
+
import { type ConnectablePaymentMethodInfo, PaymentMethod } from '../domains/paymentMethods';
|
|
2
|
+
import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
3
3
|
export declare function usePaymentMethodEnablement({ checkoutConfig, }: {
|
|
4
4
|
checkoutConfig: FunkitCheckoutConfig | undefined;
|
|
5
5
|
}): {
|
|
@@ -9,6 +9,6 @@ export declare function usePaymentMethodEnablement({ checkoutConfig, }: {
|
|
|
9
9
|
isBrokerageEnabled: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const usePaymentSources: (paymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string, checkoutConfig?: FunkitCheckoutConfig) => {
|
|
12
|
-
preferred: PaymentMethod[] | (import("
|
|
12
|
+
preferred: PaymentMethod[] | (import("../domains/paymentMethods").PaymentMethodBrokerageInfo | import("../domains/paymentMethods").PaymentMethodAccountInfo | import("../domains/paymentMethods").PaymentMethodVirtualBankInfo)[];
|
|
13
13
|
moreSources: PaymentMethod[];
|
|
14
14
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CheckoutInitTokenTransferResponse } from '@funkit/api-base';
|
|
2
|
-
import type { TokenTransferSourceChainsAndAssets } from '
|
|
2
|
+
import type { TokenTransferSourceChainsAndAssets } from '../modals/CheckoutModal/TransferToken/TransferToken';
|
|
3
3
|
export type TransferTokenDefault = {
|
|
4
4
|
token: string;
|
|
5
5
|
chainId: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type { FunkitConfig } from './providers/FunkitConfigContext';
|
|
|
26
26
|
export type { FunkitConnectChain as Chain } from './providers/FunkitConnectChainContext';
|
|
27
27
|
export type { ModalSizes } from './providers/ModalSizeContext';
|
|
28
28
|
export { useCheckoutListenerByCheckoutId, useCheckoutsListenerByUserId, } from './providers/FunkitHistoryContext';
|
|
29
|
-
export {
|
|
29
|
+
export { useFunkitRecentDeposits, useFunkitRecentDepositsImpl, } from './hooks/queries/useRecentDeposits';
|
|
30
30
|
export type { FunkitWagmiConfig, FunkitProviderProps, } from './providers/FunkitProvider';
|
|
31
31
|
export { FunkitProvider } from './providers/FunkitProvider';
|
|
32
32
|
export type { Theme, ThemeSet } from './providers/FunkitThemeProvider';
|
package/dist/index.js
CHANGED
|
@@ -1122,11 +1122,6 @@ function isHyenaCustomer(apiKey) {
|
|
|
1122
1122
|
function isLighterxyzCustomer(apiKey) {
|
|
1123
1123
|
return apiKey === LIGHTERXYZ_API_KEY;
|
|
1124
1124
|
}
|
|
1125
|
-
function isLighterEthSpot(apiKey, checkoutConfig) {
|
|
1126
|
-
return checkoutConfig && isLighterxyzCustomer(apiKey) && ["LIGHTER_ETH_SPOT_NEW_USER", "LIGHTER_ETH_SPOT"].includes(
|
|
1127
|
-
checkoutConfig.dynamicRoutingId || ""
|
|
1128
|
-
);
|
|
1129
|
-
}
|
|
1130
1125
|
function isLighterNativeFlow(apiKey, checkoutConfig) {
|
|
1131
1126
|
return !!checkoutConfig && isLighterxyzCustomer(apiKey) && checkoutConfig.targetChain === mainnet4.id.toString();
|
|
1132
1127
|
}
|
|
@@ -1432,7 +1427,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
1432
1427
|
localStorage.setItem(storageKey, version);
|
|
1433
1428
|
}
|
|
1434
1429
|
function getCurrentSdkVersion() {
|
|
1435
|
-
return "7.1.0-next.
|
|
1430
|
+
return "7.1.0-next.15";
|
|
1436
1431
|
}
|
|
1437
1432
|
function useFingerprint() {
|
|
1438
1433
|
const fingerprint = useCallback3(() => {
|
|
@@ -4327,6 +4322,15 @@ function useMultiStepDirectExecutionStatus(multiStepDirectExecution, disabled =
|
|
|
4327
4322
|
}
|
|
4328
4323
|
|
|
4329
4324
|
// src/utils/purifyCheckoutHistoryItem.ts
|
|
4325
|
+
function resolveLastDirectExecution(de) {
|
|
4326
|
+
return de.latestStep ?? de;
|
|
4327
|
+
}
|
|
4328
|
+
function getTransactionHashes(first, last) {
|
|
4329
|
+
const all = [first.txHash, first.toTxId, last.txHash, last.toTxId].filter(
|
|
4330
|
+
Boolean
|
|
4331
|
+
);
|
|
4332
|
+
return Array.from(new Set(all));
|
|
4333
|
+
}
|
|
4330
4334
|
var purifyCheckoutHistoryItem = (item) => {
|
|
4331
4335
|
if ("depositAddr" in item) {
|
|
4332
4336
|
return {
|
|
@@ -4345,22 +4349,26 @@ var purifyCheckoutHistoryItem = (item) => {
|
|
|
4345
4349
|
additionalActions: item?.clientMetadata?.evaluatedActionsParams ?? []
|
|
4346
4350
|
};
|
|
4347
4351
|
}
|
|
4352
|
+
const de = resolveLastDirectExecution(item);
|
|
4348
4353
|
return {
|
|
4349
4354
|
directExecution: true,
|
|
4350
|
-
id:
|
|
4355
|
+
id: de.txHash,
|
|
4356
|
+
// use first step's deposit address for source
|
|
4351
4357
|
fromAmountBaseUnit: item.fromAmountBaseUnit,
|
|
4352
4358
|
fromChainId: item.fromChainId,
|
|
4353
4359
|
fromTokenAddress: item.fromTokenAddress,
|
|
4360
|
+
// use last step's status for target
|
|
4361
|
+
toChainId: de.toChainId,
|
|
4362
|
+
toTokenAddress: de.toTokenAddress,
|
|
4363
|
+
toAmountBaseUnit: de.toAmountBaseUnit,
|
|
4354
4364
|
state: mapRelayExecutionStatusToCheckoutState(
|
|
4355
|
-
|
|
4365
|
+
de?.listenerInfo?.status ?? RelayExecutionStatus2.SUCCESS
|
|
4356
4366
|
),
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
toAmountBaseUnit: item.toAmountBaseUnit,
|
|
4360
|
-
txHash: item.txHash,
|
|
4367
|
+
txHashes: getTransactionHashes(item, de),
|
|
4368
|
+
// needs to use the original item's createdTimeMs for the earliest time
|
|
4361
4369
|
createdTimeMs: item.createdTimeMs,
|
|
4362
|
-
updatedTimeMs: getDirectExecutionUpdatedTimeMs(
|
|
4363
|
-
additionalActions:
|
|
4370
|
+
updatedTimeMs: getDirectExecutionUpdatedTimeMs(de),
|
|
4371
|
+
additionalActions: de?.clientMetadata?.evaluatedActionsParams ?? []
|
|
4364
4372
|
};
|
|
4365
4373
|
};
|
|
4366
4374
|
|
|
@@ -20408,28 +20416,28 @@ function isTokenTransferDirectExecution(de) {
|
|
|
20408
20416
|
function isWithdrawalDirectExecution(de) {
|
|
20409
20417
|
return !!de.clientMetadata.isWithdrawal;
|
|
20410
20418
|
}
|
|
20411
|
-
|
|
20419
|
+
function useRecentDepositsImpl({
|
|
20412
20420
|
isVisible,
|
|
20413
20421
|
// WARNING! memoizedFilterFunc must be a stable reference (ie: wrap it in useMemo), otherwise hook will constantly re-render
|
|
20414
20422
|
memoizedFilterFunc,
|
|
20415
|
-
|
|
20416
|
-
cutOffTimeMs = DEFAULT_NOTIF_CUTOFF
|
|
20417
|
-
|
|
20418
|
-
|
|
20419
|
-
|
|
20420
|
-
|
|
20423
|
+
fetchSize = 5,
|
|
20424
|
+
cutOffTimeMs = DEFAULT_NOTIF_CUTOFF,
|
|
20425
|
+
userId,
|
|
20426
|
+
refreshIntervalMs,
|
|
20427
|
+
apiKey
|
|
20428
|
+
}) {
|
|
20421
20429
|
const { data: directExecutions } = useQuery14({
|
|
20422
|
-
queryKey: ["
|
|
20430
|
+
queryKey: ["useRecentDepositsImpl", userId, fetchSize],
|
|
20423
20431
|
queryFn: async () => {
|
|
20424
20432
|
const directExecutions2 = await getDirectExecutionsByUserId2({
|
|
20425
|
-
userId
|
|
20426
|
-
limit:
|
|
20433
|
+
userId,
|
|
20434
|
+
limit: fetchSize,
|
|
20427
20435
|
apiKey
|
|
20428
20436
|
});
|
|
20429
20437
|
return directExecutions2;
|
|
20430
20438
|
},
|
|
20431
|
-
refetchInterval:
|
|
20432
|
-
enabled:
|
|
20439
|
+
refetchInterval: refreshIntervalMs,
|
|
20440
|
+
enabled: isVisible && !!userId
|
|
20433
20441
|
});
|
|
20434
20442
|
const data = useMemo24(() => {
|
|
20435
20443
|
if (!directExecutions) {
|
|
@@ -20446,7 +20454,51 @@ var useRecentDeposits = ({
|
|
|
20446
20454
|
).sort((a, b) => b.createdTimeMs - a.createdTimeMs);
|
|
20447
20455
|
}, [directExecutions, memoizedFilterFunc, cutOffTimeMs]);
|
|
20448
20456
|
return { data };
|
|
20457
|
+
}
|
|
20458
|
+
function useDefaultParams() {
|
|
20459
|
+
const { userInfo, isUserLoggedIn } = useGeneralWallet();
|
|
20460
|
+
const { apiKey } = useFunkitConfig();
|
|
20461
|
+
const { listRefresh } = useCheckoutRefreshInterval();
|
|
20462
|
+
return {
|
|
20463
|
+
apiKey,
|
|
20464
|
+
userId: isUserLoggedIn ? userInfo.id : "",
|
|
20465
|
+
refreshIntervalMs: listRefresh
|
|
20466
|
+
};
|
|
20467
|
+
}
|
|
20468
|
+
var useRecentDeposits = ({
|
|
20469
|
+
isVisible,
|
|
20470
|
+
// WARNING! memoizedFilterFunc must be a stable reference (ie: wrap it in useMemo), otherwise hook will constantly re-render
|
|
20471
|
+
memoizedFilterFunc,
|
|
20472
|
+
fetchSize = 5,
|
|
20473
|
+
cutOffTimeMs = DEFAULT_NOTIF_CUTOFF
|
|
20474
|
+
}) => {
|
|
20475
|
+
const defaultParams = useDefaultParams();
|
|
20476
|
+
return useRecentDepositsImpl({
|
|
20477
|
+
isVisible,
|
|
20478
|
+
memoizedFilterFunc,
|
|
20479
|
+
fetchSize,
|
|
20480
|
+
cutOffTimeMs,
|
|
20481
|
+
...defaultParams
|
|
20482
|
+
});
|
|
20449
20483
|
};
|
|
20484
|
+
function useFunkitRecentDeposits(query) {
|
|
20485
|
+
const defaultParams = useDefaultParams();
|
|
20486
|
+
return useFunkitRecentDepositsImpl({
|
|
20487
|
+
...query,
|
|
20488
|
+
...defaultParams
|
|
20489
|
+
});
|
|
20490
|
+
}
|
|
20491
|
+
function useFunkitRecentDepositsImpl(query) {
|
|
20492
|
+
const fetchSize = query.fetchSize ?? 5;
|
|
20493
|
+
const { data } = useRecentDepositsImpl({
|
|
20494
|
+
...query,
|
|
20495
|
+
fetchSize: fetchSize * 2
|
|
20496
|
+
// fetch extra to account for merging
|
|
20497
|
+
});
|
|
20498
|
+
return {
|
|
20499
|
+
data: data?.map((de) => purifyCheckoutHistoryItem(de)).slice(0, fetchSize)
|
|
20500
|
+
};
|
|
20501
|
+
}
|
|
20450
20502
|
|
|
20451
20503
|
// src/hooks/useOnNewNotification.ts
|
|
20452
20504
|
import { safeParseJson as safeParseJson4 } from "@funkit/utils";
|
|
@@ -32309,6 +32361,7 @@ function AccountSelectAsset({
|
|
|
32309
32361
|
checkoutItem,
|
|
32310
32362
|
updateSourceAsset,
|
|
32311
32363
|
updateTargetAsset,
|
|
32364
|
+
updateTargetAssetAmount,
|
|
32312
32365
|
applyDynamicRouting
|
|
32313
32366
|
} = useCheckoutContext();
|
|
32314
32367
|
const { walletAddress } = useGeneralWallet();
|
|
@@ -32411,6 +32464,17 @@ function AccountSelectAsset({
|
|
|
32411
32464
|
if (!tokenItem) {
|
|
32412
32465
|
return;
|
|
32413
32466
|
}
|
|
32467
|
+
const currentSourceAsset = checkoutItem?.selectedSourceAssetInfo;
|
|
32468
|
+
const sourceAssetChanged = !isTokenEquivalent5({
|
|
32469
|
+
firstTokenChainId: currentSourceAsset?.chainId || "",
|
|
32470
|
+
firstTokenAddress: currentSourceAsset?.address || "",
|
|
32471
|
+
secondTokenChainId: tokenItem.pickedChainId,
|
|
32472
|
+
secondTokenAddress: tokenItem.tokenAddress
|
|
32473
|
+
});
|
|
32474
|
+
const shouldResetTargetAssetAmount = currentSourceAsset && sourceAssetChanged && !checkoutConfig?.isDefiMode && paymentMethodInfo.paymentMethod !== "card" /* CARD */;
|
|
32475
|
+
if (shouldResetTargetAssetAmount) {
|
|
32476
|
+
updateTargetAssetAmount(0);
|
|
32477
|
+
}
|
|
32414
32478
|
updateSourceAsset(tokenItem);
|
|
32415
32479
|
if (isBrokerageAsset(tokenItem)) {
|
|
32416
32480
|
setSelectedBrokerageAsset(tokenItem);
|
|
@@ -32454,7 +32518,6 @@ function AccountSelectAsset({
|
|
|
32454
32518
|
const isAssetsEmpty = assetOptions.length === 0;
|
|
32455
32519
|
const isDisabled = isAssetsEmpty || !selectedChainTokenSymbol || isLoading;
|
|
32456
32520
|
const onBalanceTopUpSwitch = checkoutItem?.initSettings.onBalanceTopUpSwitch;
|
|
32457
|
-
const showLighterEthMessage = isLighterEthSpot(apiKey, checkoutConfig) && assetOptions.every((asset) => asset.isDisabled);
|
|
32458
32521
|
const checkoutId = checkoutItem?.id;
|
|
32459
32522
|
useEffect50(() => {
|
|
32460
32523
|
if (checkoutId && !isLoading) {
|
|
@@ -32484,26 +32547,6 @@ function AccountSelectAsset({
|
|
|
32484
32547
|
}
|
|
32485
32548
|
) : void 0
|
|
32486
32549
|
}
|
|
32487
|
-
) : showLighterEthMessage ? /* @__PURE__ */ React188.createElement(
|
|
32488
|
-
FunNoResults,
|
|
32489
|
-
{
|
|
32490
|
-
title: t("checkout.insufficientEth"),
|
|
32491
|
-
text: t("checkout.insufficientEthMessage"),
|
|
32492
|
-
variant: "actionable",
|
|
32493
|
-
actionButton: onBalanceTopUpSwitch ? /* @__PURE__ */ React188.createElement(
|
|
32494
|
-
FunButton,
|
|
32495
|
-
{
|
|
32496
|
-
type: "tertiary",
|
|
32497
|
-
onClick: () => {
|
|
32498
|
-
if (onBalanceTopUpSwitch) {
|
|
32499
|
-
onBalanceTopUpSwitch();
|
|
32500
|
-
}
|
|
32501
|
-
onClose?.();
|
|
32502
|
-
},
|
|
32503
|
-
title: t("checkout.topUpWallet")
|
|
32504
|
-
}
|
|
32505
|
-
) : void 0
|
|
32506
|
-
}
|
|
32507
32550
|
) : /* @__PURE__ */ React188.createElement(Box, { display: "flex", flexDirection: "column", gap: "4" }, assetOptions.map(({ asset, isDisabled: isDisabled2, badgeText, minUsdRequired }) => /* @__PURE__ */ React188.createElement(
|
|
32508
32551
|
FunAssetItem,
|
|
32509
32552
|
{
|
|
@@ -39508,11 +39551,12 @@ export {
|
|
|
39508
39551
|
useFunkitCheckout,
|
|
39509
39552
|
useFunkitDisconnect,
|
|
39510
39553
|
useFunkitMaxCheckoutUsdInfo,
|
|
39554
|
+
useFunkitRecentDeposits,
|
|
39555
|
+
useFunkitRecentDepositsImpl,
|
|
39511
39556
|
useFunkitReconnect,
|
|
39512
39557
|
useFunkitSwitchChains,
|
|
39513
39558
|
useFunkitTranslation,
|
|
39514
39559
|
useFunkitUserInfo,
|
|
39515
|
-
useRecentDeposits,
|
|
39516
39560
|
useSoftHiddenCheckout,
|
|
39517
39561
|
useUpdateActiveFunkitCheckout
|
|
39518
39562
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PaymentMethodBrokerageInfo } from '
|
|
2
|
+
import type { PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
|
|
3
3
|
import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '../stepTransition';
|
|
4
4
|
export declare const BROKERAGE_SUCCESS_MODAL_CONTENT_ID = "brokerage-success-modal-content";
|
|
5
5
|
export type BrokerageSuccessState = CheckoutModalCommonState & {
|
|
@@ -20,8 +20,8 @@ declare enum BrokerageTwoFAStatus {
|
|
|
20
20
|
addressWhitelistRequired = "addressWhitelistRequired",
|
|
21
21
|
secondMfaRequired = "secondMfaRequired"
|
|
22
22
|
}
|
|
23
|
-
import type { BluvoExchangeInfo } from '
|
|
24
|
-
import type { PaymentMethodBrokerageInfo } from '
|
|
23
|
+
import type { BluvoExchangeInfo } from '../../../consts/bluvo';
|
|
24
|
+
import type { PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
|
|
25
25
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
26
26
|
export type BrokerageTwoFAState = CheckoutModalCommonState & {
|
|
27
27
|
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type BluvoExchangeType } from '
|
|
3
|
-
import { type PaymentMethodBrokerageInfo } from '
|
|
2
|
+
import { type BluvoExchangeType } from '../../../consts/bluvo';
|
|
3
|
+
import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type ConnectExchangeState = CheckoutModalCommonState & {
|
|
6
6
|
brokerType: BluvoExchangeType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BluvoExchangeType } from '
|
|
3
|
-
import { type PaymentMethodBrokerageInfo } from '
|
|
2
|
+
import { BluvoExchangeType } from '../../../consts/bluvo';
|
|
3
|
+
import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type SelectBrokerageState = CheckoutModalCommonState;
|
|
6
6
|
export type SelectBrokerageNext = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitCheckoutConfig } from '
|
|
2
|
+
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
3
3
|
interface CheckoutPrimaryInfoProps {
|
|
4
4
|
showTokenAmount: boolean;
|
|
5
5
|
config: FunkitCheckoutConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
-
import { type PaymentMethodInfo } from '
|
|
3
|
+
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type ConfirmationStepState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: PaymentMethodInfo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitActiveCheckoutItem } from '
|
|
2
|
+
import type { FunkitActiveCheckoutItem } from '../../../providers/FunkitCheckoutContext';
|
|
3
3
|
interface DisclaimerTextProps {
|
|
4
4
|
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
5
5
|
continueText: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
3
|
import { type Config } from 'wagmi';
|
|
4
|
-
import type { ErrorNotification } from '
|
|
4
|
+
import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
5
5
|
export interface CheckoutConfirmationError extends ErrorNotification {
|
|
6
6
|
durationMs?: number;
|
|
7
7
|
code: ConfirmationErrorCode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address } from 'viem';
|
|
2
|
-
import type { ErrorNotification } from '
|
|
3
|
-
import { type PaymentMethodInfo } from '
|
|
2
|
+
import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
3
|
+
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
export interface PostCheckoutError extends ErrorNotification {
|
|
5
5
|
disableContinue: boolean;
|
|
6
6
|
durationMs?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ErrorNotification } from '
|
|
1
|
+
import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
2
2
|
interface UseQuoteRefreshOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Freeze the latest quote state, e.g. so we do not change the quote mid-confirmation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FunkitCheckoutQuoteResult } from '
|
|
2
|
-
import { type CheckoutQuoteResult } from '
|
|
1
|
+
import type { FunkitCheckoutQuoteResult } from '../../../domains/quote';
|
|
2
|
+
import { type CheckoutQuoteResult } from '../../../providers/FunkitQuoteContext';
|
|
3
3
|
export interface SourceAssetConfirmed {
|
|
4
4
|
isQuoteSuccess: boolean;
|
|
5
5
|
maxTargetAssetAmount: number | undefined;
|
package/dist/modals/CheckoutModal/DirectExecutionNotifCenter/DirectExecutionNotifCenter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
-
import type { PaymentMethodInfo } from '
|
|
3
|
+
import type { PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type DirectExecutionNotifCenterState = CheckoutModalCommonState & {
|
|
6
6
|
depositAddress: Address;
|
package/dist/modals/CheckoutModal/DirectExecutionNotifCenter/DirectExecutionNotifCenterContent.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PaymentMethodInfo } from '
|
|
2
|
+
import type { PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
3
3
|
interface DirectExecutionNotifCenterContentProps {
|
|
4
4
|
onClose: (options?: {
|
|
5
5
|
isNewDeposit?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MeldQuote, MeldServiceProvider } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type PaymentMethodInfo } from '
|
|
3
|
+
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type InputAmountState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: PaymentMethodInfo;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ExchangeRates } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type FunkitTextCustomizationsConfig } from '
|
|
4
|
-
import type { AssetHoldingsItem } from '
|
|
3
|
+
import { type FunkitTextCustomizationsConfig } from '../../../providers/FunkitConfigContext';
|
|
4
|
+
import type { AssetHoldingsItem } from '../../../utils/assets';
|
|
5
5
|
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
6
6
|
import { FunCheckoutStep, type ModalStepComponentProps } from '../stepTransition';
|
|
7
7
|
interface InputAmountLoadedProps extends ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PaymentMethodInfo } from '
|
|
2
|
-
import type { AssetHoldingsItem } from '
|
|
1
|
+
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
2
|
+
import type { AssetHoldingsItem } from '../../../utils/assets';
|
|
3
3
|
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
4
4
|
export interface AmountInputInitOptions {
|
|
5
5
|
checkoutConfig: FunkitCheckoutConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
|
-
import type { FunInputChangeEvent } from '
|
|
2
|
+
import type { FunInputChangeEvent } from '../../../components/FunInput/FunInput';
|
|
3
3
|
import { type AmountInputDerivedState, type AmountInputInitOptions } from './state';
|
|
4
4
|
import { type InputAmountSuggestion } from './utils';
|
|
5
5
|
export interface UseAmountInputResult extends AmountInputDerivedState {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssetHoldingsItem } from '
|
|
2
|
-
import { type PaymentMethodInfo } from '
|
|
3
|
-
import type { QueryResult } from '
|
|
1
|
+
import type { AssetHoldingsItem } from '../../../utils/assets';
|
|
2
|
+
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
3
|
+
import type { QueryResult } from '../../../types/utils';
|
|
4
4
|
export declare function useAvailableBalanceForCheckout(paymentMethodInfo: PaymentMethodInfo, targetChainId: string, assetChainId: string, assetSymbol: string | null): QueryResult<AssetHoldingsItem>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MeldQuote, MeldServiceProvider } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { ErrorNotification } from '
|
|
3
|
+
import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
4
4
|
import { FunCheckoutStep, type NextPayload } from '../stepTransition';
|
|
5
5
|
export declare function useMeldUI({ meldEnabled, manuallySelectedQuote, fiatAmount, fiatCurrency, onNext, onClose, }: {
|
|
6
6
|
meldEnabled: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ErrorNotification } from '
|
|
2
|
-
import type { useFunkitTranslation } from '
|
|
1
|
+
import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
2
|
+
import type { useFunkitTranslation } from '../../../hooks/useFunkitTranslation';
|
|
3
3
|
import type { AmountInputError } from './state';
|
|
4
4
|
type TFunction = ReturnType<typeof useFunkitTranslation>['t'];
|
|
5
5
|
export declare const ASSET_DECIMALS = 5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PaymentMethodCardInfo } from '
|
|
2
|
+
import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
|
|
3
3
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
4
|
export type MeldCurrencySelectState = CheckoutModalCommonState & {
|
|
5
5
|
defaultCurrency: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MeldQuote, MeldServiceProvider } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { PaymentMethodCardInfo } from '
|
|
3
|
+
import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type MeldQuotesState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: PaymentMethodCardInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MeldQuote } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { PaymentMethodCardInfo } from '
|
|
3
|
+
import type { PaymentMethodCardInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type MeldRedirectState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: PaymentMethodCardInfo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TransferTokenDefault } from '
|
|
2
|
+
import type { TransferTokenDefault } from '../../hooks/useTokenChain';
|
|
3
3
|
import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
5
5
|
export type SelectAssetState = CheckoutModalCommonState & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitCheckoutConfig } from '
|
|
2
|
+
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
3
3
|
interface DefiPurchaseSectionProps {
|
|
4
4
|
config: FunkitCheckoutConfig;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodCardInfo, type PaymentMethodVirtualBankIncompleteInfo } from '
|
|
2
|
+
import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodCardInfo, type PaymentMethodVirtualBankIncompleteInfo } from '../../../domains/paymentMethods';
|
|
3
3
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
4
|
export type SourceChangeState = CheckoutModalCommonState & {
|
|
5
5
|
paymentMethodInfo: ConnectablePaymentMethodInfo | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CheckoutHistoryItem } from '@funkit/api-base';
|
|
3
3
|
import type { Address } from 'viem';
|
|
4
|
-
import { type CheckoutStatus } from '
|
|
4
|
+
import { type CheckoutStatus } from '../../../domains/checkout';
|
|
5
5
|
export type NotificationStatus = CheckoutStatus | 'delayed';
|
|
6
6
|
interface CheckoutNotificationProps {
|
|
7
7
|
checkout: CheckoutHistoryItem;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TrackEventData } from '
|
|
1
|
+
import type { TrackEventData } from '../../../hooks/track/useTrack';
|
|
2
2
|
import type { NotificationItem } from './types';
|
|
3
3
|
export declare const trackEventFromNotification: (item: NotificationItem) => TrackEventData;
|