@funkit/connect 9.3.0 → 9.3.2
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 +25 -0
- package/dist/{chunk-FHIMKOGH.js → chunk-AGBRSMZ7.js} +5 -3
- package/dist/{chunk-TWG76V3I.js → chunk-MXNOQTKX.js} +11 -3
- package/dist/{chunk-NKJYA7IM.js → chunk-RHUOOPDI.js} +5 -3
- package/dist/clients/fanatics.css +4527 -4327
- package/dist/clients/fanatics.d.ts +5 -0
- package/dist/clients/fanatics.js +14 -3
- package/dist/components/Box/Box.d.ts +38 -38
- package/dist/components/Dropdown/BaseDropdown.css.d.ts +2 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +10 -0
- package/dist/css/sprinkles.css.d.ts +84 -52
- package/dist/domains/asset.d.ts +8 -3
- package/dist/hooks/track/CheckoutModalEvent.d.ts +3 -1
- package/dist/index.css +4565 -4339
- package/dist/index.js +1966 -1753
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +1 -1
- package/dist/providers/FunkitConfigContext.d.ts +7 -0
- package/dist/providers/FunkitThemeProvider.d.ts +69 -21
- package/dist/providers/SwappedProvider.d.ts +3 -1
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/swapped.d.ts +5 -2
- package/dist/wallets/walletConnectors/index.js +35 -35
- package/package.json +5 -4
package/dist/domains/asset.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ import type { Address } from 'viem';
|
|
|
3
3
|
import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
4
4
|
import type { AssetHoldingsItem } from '../utils/assets';
|
|
5
5
|
import { PaymentMethod } from '../domains/paymentMethods';
|
|
6
|
+
/**
|
|
7
|
+
* Calculates the minimum USD value an asset must have to be considered usable for checkout.
|
|
8
|
+
* Accounts for the customer's configured minimum deposit and a global floor.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getMinValueThreshold(config: FunkitCheckoutConfig | undefined, minUsdRequired?: number): number;
|
|
6
11
|
export declare const isStablecoin: (symbol: string) => boolean;
|
|
7
12
|
export declare function isPreferredChain(chainId: number, additionalChains?: number[]): boolean;
|
|
8
13
|
export declare function isNativeTokenAddress(address: Address): boolean;
|
|
@@ -18,14 +23,14 @@ interface AssetUsableToPayParms {
|
|
|
18
23
|
assetTokenAddress: string;
|
|
19
24
|
assetUsdAmount: number | null;
|
|
20
25
|
isAllowedForCheckout: boolean;
|
|
21
|
-
|
|
26
|
+
minValueThreshold: number;
|
|
22
27
|
isDynamicRoutingEnabled: boolean;
|
|
23
28
|
t: TFunction;
|
|
24
29
|
}
|
|
25
|
-
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, isAllowedForCheckout,
|
|
30
|
+
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, isAllowedForCheckout, minValueThreshold, isDynamicRoutingEnabled, t, }: AssetUsableToPayParms) => {
|
|
26
31
|
isUsable: boolean;
|
|
27
32
|
reason: string;
|
|
28
|
-
|
|
33
|
+
minUsdWithFees?: number;
|
|
29
34
|
};
|
|
30
35
|
export declare function getUsdAvailableAmount(targetChainId: string, assetChainId: string | undefined, assetUsdAmount: number | null | undefined, paymentMethod: PaymentMethod | undefined): number | null;
|
|
31
36
|
export {};
|
|
@@ -55,5 +55,7 @@ export declare enum CheckoutModalEvent {
|
|
|
55
55
|
SWAPPED_IFRAME_ERROR = "fc::swapped_iframe::error",
|
|
56
56
|
SWAPPED_IFRAME_BACK = "fc::swapped_iframe::back",
|
|
57
57
|
SWAPPED_IFRAME_NEW_DEPOSIT_BACK = "fc::swapped_iframe::new_deposit_back",
|
|
58
|
-
SWAPPED_IFRAME_EXIT = "fc::swapped_iframe::exit"
|
|
58
|
+
SWAPPED_IFRAME_EXIT = "fc::swapped_iframe::exit",
|
|
59
|
+
SWAPPED_IFRAME_ORDER_DATA = "fc::swapped_iframe::order_data",
|
|
60
|
+
SWAPPED_IFRAME_LOGOUT = "fc::swapped_iframe::logout"
|
|
59
61
|
}
|