@funkit/connect 7.1.0 → 8.0.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 +50 -0
- package/dist/__generated__/default_configs.d.ts +29 -0
- package/dist/components/CheckoutTopAnnouncementBanner/CheckoutTopAnnouncementBanner.d.ts +2 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +5 -0
- package/dist/consts/assets.d.ts +1 -3
- package/dist/hooks/track/useTrack.d.ts +1 -0
- package/dist/hooks/useAllowedAssets.d.ts +3 -1
- package/dist/hooks/useFrogAccount.d.ts +1 -0
- package/dist/hooks/usePaymentSources.d.ts +1 -0
- package/dist/hooks/useTokenTransfer.d.ts +1 -1
- package/dist/hooks/useWalletAssetHoldings.d.ts +1 -0
- package/dist/index.js +868 -681
- package/dist/providers/FunkitConfigContext.d.ts +2 -0
- package/dist/utils/flags/config.d.ts +21 -21
- package/dist/utils/funLogger.d.ts +5 -1
- package/dist/utils/lighter.d.ts +1 -0
- package/dist/utils/transfer.d.ts +2 -2
- package/dist/wallets/walletConnectors/index.js +6 -6
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- d0ccffb: feat: tron support
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- d0ccffb: Add TRON chain to mainnet IDs for minimum transfer value calculation
|
|
12
|
+
- 1a5b5a3: unify assets images by exporting them fun-relay
|
|
13
|
+
- 7b30849: feat(connect): fetch allowlist in parallel
|
|
14
|
+
- 186c477: feat(connect): block direct execution fetch with placeholder id '0x'
|
|
15
|
+
- 9d16c08: fix(connect): use onChainTxHash for explorer links in AA transactions
|
|
16
|
+
|
|
17
|
+
For account abstraction transactions, `txHash` is a userOpHash (internal identifier) while `onChainTxHash` is the actual on-chain transaction hash visible on block explorers. Explorer links now prefer `onChainTxHash` with fallback to `txHash`.
|
|
18
|
+
|
|
19
|
+
- 97df9ab: Show impact <0.01% instead of negative price impact.
|
|
20
|
+
- 364816e: feat(connect): pass customer key to brokerage quotes
|
|
21
|
+
- 6322220: fix(connect): safe flatten/stringify for statsig event logging
|
|
22
|
+
- 16542cc: checkout top announcement banner implemented which controlled by statsig
|
|
23
|
+
- Updated dependencies [1a5b5a3]
|
|
24
|
+
- Updated dependencies [e43c096]
|
|
25
|
+
- Updated dependencies [9d16c08]
|
|
26
|
+
- Updated dependencies [d0ccffb]
|
|
27
|
+
- Updated dependencies [9ee69b4]
|
|
28
|
+
- Updated dependencies [a50aa11]
|
|
29
|
+
- @funkit/fun-relay@2.2.2
|
|
30
|
+
- @funkit/chains@1.0.0
|
|
31
|
+
- @funkit/api-base@2.0.0
|
|
32
|
+
|
|
33
|
+
## 7.1.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- ea97213: Add EITGHTYEIGHTUPS customer configuration and API key support
|
|
38
|
+
- b2057f1: set wide as default modal size
|
|
39
|
+
- 3e40d89: feat(connect,fun-relay): add LIT spot asset
|
|
40
|
+
- 5561b62: Fix logger to queue logs before configure() is called and flush them afterwards. Refactor logging implementation to eliminate duplicate code by consolidating validation and processing logic.
|
|
41
|
+
- 911ab29: feat(connect): add meld preloader to empty window
|
|
42
|
+
- 51c6e23: feat(connect): added ui customization option to disable wallet balance option instead of hiding it when balance is insufficient
|
|
43
|
+
- 8c0df14: feat(connect): remove preference check on meld providers
|
|
44
|
+
- c3f4c4c: feat(connect): update meld max limit messaging
|
|
45
|
+
- 6c6fa01: do not hide fiat payment method for lighter new asset
|
|
46
|
+
- Updated dependencies [ea97213]
|
|
47
|
+
- Updated dependencies [3e40d89]
|
|
48
|
+
- Updated dependencies [965b34b]
|
|
49
|
+
- @funkit/api-base@1.12.23
|
|
50
|
+
- @funkit/fun-relay@2.2.1
|
|
51
|
+
- @funkit/chains@0.5.3
|
|
52
|
+
|
|
3
53
|
## 7.1.0
|
|
4
54
|
|
|
5
55
|
### Minor Changes
|
|
@@ -24,6 +24,7 @@ declare const _default: {
|
|
|
24
24
|
readonly '0x1111111254EEB25477B68fb85Ed929f73A960582': "1inch V5 Router";
|
|
25
25
|
readonly '0x881D40237659C251811CEC9c364ef91dC08D300C': "Metamask Swap Router";
|
|
26
26
|
readonly '0x07d82CD44cd598ACf355Af8c8089b30b2a13B088': "Polymarket Withdrawal Block";
|
|
27
|
+
readonly '2ygdTkdUtN9PhoMko12bQi6PimJrqxcKmCvQGkCG6SN7': "Polymarket Withdrawal Block";
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
30
|
readonly blockedcountries: {
|
|
@@ -52,6 +53,14 @@ declare const _default: {
|
|
|
52
53
|
readonly token_transfer: 60;
|
|
53
54
|
};
|
|
54
55
|
};
|
|
56
|
+
readonly checkouttopannouncementbanner: {
|
|
57
|
+
readonly value: {
|
|
58
|
+
readonly title: "";
|
|
59
|
+
readonly subtitle: "";
|
|
60
|
+
readonly iconSrc: "https://sdk-cdn.fun.xyz/images/announcement-icon-rounded.svg";
|
|
61
|
+
readonly chainIdList: readonly [];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
55
64
|
readonly dynamicrouting: {
|
|
56
65
|
readonly value: readonly [{
|
|
57
66
|
readonly routeId: "LIGHTER_ETH_SPOT";
|
|
@@ -137,6 +146,23 @@ declare const _default: {
|
|
|
137
146
|
readonly path: "FUN_MAINNET_DEPOSIT";
|
|
138
147
|
};
|
|
139
148
|
}];
|
|
149
|
+
}, {
|
|
150
|
+
readonly routeId: "LIGHTER_LIT_SPOT_NEW_USER";
|
|
151
|
+
readonly rules: readonly [{
|
|
152
|
+
readonly when: {
|
|
153
|
+
readonly chainId: "1";
|
|
154
|
+
readonly tokenAddress: "0x232CE3bd40fCd6f80f3d55A522d03f25Df784Ee2";
|
|
155
|
+
};
|
|
156
|
+
readonly use: {
|
|
157
|
+
readonly path: "FUN_MAINNET_DEPOSIT";
|
|
158
|
+
readonly badge: "NATIVE";
|
|
159
|
+
};
|
|
160
|
+
}, {
|
|
161
|
+
readonly when: "*";
|
|
162
|
+
readonly use: {
|
|
163
|
+
readonly path: "FUN_MAINNET_DEPOSIT";
|
|
164
|
+
};
|
|
165
|
+
}];
|
|
140
166
|
}, {
|
|
141
167
|
readonly routeId: "LIGHTER_LINK_SPOT_NEW_USER";
|
|
142
168
|
readonly rules: readonly [{
|
|
@@ -246,6 +272,9 @@ declare const _default: {
|
|
|
246
272
|
readonly enabletokentransfer: {
|
|
247
273
|
readonly value: true;
|
|
248
274
|
};
|
|
275
|
+
readonly enabletokentransferuniversaldepositaddress: {
|
|
276
|
+
readonly value: true;
|
|
277
|
+
};
|
|
249
278
|
readonly ismexico: {
|
|
250
279
|
readonly value: {
|
|
251
280
|
readonly mexico: false;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { PaymentMethod, type PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
|
|
3
3
|
export declare const getDynamicValueIconComponent: () => React.JSX.Element;
|
|
4
|
+
export declare function SupportedChainList({ chainIdList, iconSize, style, }: {
|
|
5
|
+
chainIdList: string[];
|
|
6
|
+
iconSize?: number;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}): React.JSX.Element;
|
|
4
9
|
export declare function PaymentMethodIcon({ paymentIcon, keyIconSize, }: {
|
|
5
10
|
paymentIcon: ReactNode;
|
|
6
11
|
keyIconSize: number;
|
package/dist/consts/assets.d.ts
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const FALLBACK_ASSET = "https://sdk-cdn.fun.xyz/images/dollar_circle.png";
|
|
3
|
-
export declare function getAssetLogoSrc(symbol: string): string;
|
|
1
|
+
export { ASSET_LOGO_SRCS, FALLBACK_ASSET, getAssetLogoSrc, } from '@funkit/fun-relay';
|
|
@@ -6,6 +6,7 @@ export interface TrackEventData {
|
|
|
6
6
|
value?: string | number;
|
|
7
7
|
metadata?: object;
|
|
8
8
|
}
|
|
9
|
+
export declare const eventCounts: Partial<Record<CheckoutModalEvent | WithdrawModalEvent, number>>;
|
|
9
10
|
export declare const useTrack: () => {
|
|
10
11
|
logEvent: (eventNameOrTrackEventData: CheckoutModalEvent | TrackEventData) => void;
|
|
11
12
|
logMeasuredEvent: (trackEventData: Omit<TrackEventData, "value">) => void;
|
|
@@ -6,5 +6,7 @@ interface AllowedAssetsHookResult {
|
|
|
6
6
|
isAllowed: (chainId: number | string, tokenAddress: Address) => boolean;
|
|
7
7
|
isLoading: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare function useAllowedAssets(
|
|
9
|
+
export declare function useAllowedAssets({ enabled, }?: {
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
}): AllowedAssetsHookResult;
|
|
10
12
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type BridgeVirtualBankAccount, type Guid } from '@funkit/api-base';
|
|
2
2
|
import { type AllFiatAccounts } from '../domains/bridge';
|
|
3
|
+
export declare function useIfFiatEnabledRegardlessOfUDA(): boolean;
|
|
3
4
|
export declare function useFiatEnabled(): boolean;
|
|
4
5
|
export declare function useFrogAccounts(): import("@tanstack/react-query").UseQueryResult<import("@funkit/api-base").SubAccount[] | null, Error>;
|
|
5
6
|
export declare function useClearFrogAccountsCache(): {
|
|
@@ -12,4 +12,5 @@ export declare const usePaymentSources: (paymentMethodInfo: ConnectablePaymentMe
|
|
|
12
12
|
preferred: PaymentMethod[] | (import("../domains/paymentMethods").PaymentMethodBrokerageInfo | import("../domains/paymentMethods").PaymentMethodAccountInfo | import("../domains/paymentMethods").PaymentMethodVirtualBankInfo)[];
|
|
13
13
|
moreSources: PaymentMethod[];
|
|
14
14
|
comingSoon: PaymentMethod[];
|
|
15
|
+
hasUsableBalance: boolean;
|
|
15
16
|
};
|
|
@@ -18,7 +18,7 @@ interface UseTokenTransferResult {
|
|
|
18
18
|
estPriceImpact: FeeValue | undefined;
|
|
19
19
|
maxSlippage: FeeValue | undefined;
|
|
20
20
|
qrCodeUri: QRCodeUri | undefined;
|
|
21
|
-
blockchain: 'ethereum' | 'solana' | 'bitcoin';
|
|
21
|
+
blockchain: 'ethereum' | 'solana' | 'bitcoin' | 'tron';
|
|
22
22
|
}
|
|
23
23
|
export declare const useTokenTransfer: (selectedChainId: number, selectedToken: string, chainIds?: number[]) => UseTokenTransferResult;
|
|
24
24
|
/**
|