@funkit/connect 3.1.1 → 3.2.1
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 +35 -0
- package/README.md +0 -10
- package/dist/components/Box/Box.d.ts +21 -21
- package/dist/components/Dialog/Dialog.d.ts +4 -12
- package/dist/components/Dialog/hooks.d.ts +4 -0
- package/dist/components/FunAsset/FunAssetLoading.d.ts +4 -0
- package/dist/components/FunButton/FunIconButton.d.ts +2 -9
- package/dist/components/FunOptionBox/FunOptionBox.d.ts +2 -4
- package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +4 -2
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +20 -6
- package/dist/config/getDefaultConfig.d.ts +9 -9
- package/dist/consts/customers.d.ts +1 -0
- package/dist/consts/payment.d.ts +28 -2
- package/dist/css/sprinkles.css.d.ts +21 -21
- package/dist/hooks/useFunListeners.d.ts +0 -4
- package/dist/hooks/useMesh.d.ts +7 -5
- package/dist/hooks/useWalletAssets.d.ts +11 -0
- package/dist/index.css +1922 -1904
- package/dist/index.js +17385 -16666
- package/dist/modals/CheckoutModal/CheckoutPrimaryInfo.d.ts +4 -2
- package/dist/modals/CheckoutModal/ConfirmationStep.d.ts +4 -9
- package/dist/modals/CheckoutModal/ConnectExchange.d.ts +5 -5
- package/dist/modals/CheckoutModal/InputAmount.d.ts +7 -5
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +20 -0
- package/dist/modals/CheckoutModal/MeshVerification.d.ts +3 -3
- package/dist/modals/CheckoutModal/MoonpaySetup.d.ts +18 -0
- package/dist/modals/CheckoutModal/SelectAsset.d.ts +8 -7
- package/dist/modals/CheckoutModal/SelectBrokerage.d.ts +20 -0
- package/dist/modals/CheckoutModal/SelectPaymentMethod.d.ts +13 -7
- package/dist/modals/CheckoutModal/SourceChange.d.ts +26 -0
- package/dist/modals/CheckoutModal/TransferSetup.d.ts +14 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +26 -26
- package/dist/modals/CheckoutModal/useAvailableBalanceForCheckout.d.ts +4 -0
- package/dist/modals/CheckoutModal/useSourceAssetConfirm.d.ts +3 -1
- package/dist/modals/CheckoutModal/useUpdateSourceAssetForCard.d.ts +4 -2
- package/dist/modals/CheckoutModal/useWalletAssetHoldings.d.ts +5 -0
- package/dist/providers/FunkitCheckoutContext.d.ts +5 -5
- package/dist/providers/FunkitConfigContext.d.ts +14 -0
- package/dist/providers/FunkitFlagsProvider.d.ts +25 -0
- package/dist/providers/FunkitMeshProvider.d.ts +14 -9
- package/dist/providers/FunkitMoonpayProvider.d.ts +1 -2
- package/dist/providers/GeneralWalletProvider.d.ts +14 -22
- package/dist/types/utils.d.ts +5 -0
- package/dist/utils/address.d.ts +4 -0
- package/dist/utils/assets.d.ts +7 -3
- package/dist/utils/checkout.d.ts +5 -7
- package/dist/utils/deposit.d.ts +2 -3
- package/dist/utils/flags/impl.d.ts +5 -22
- package/dist/utils/mesh.d.ts +14 -1
- package/dist/wallets/walletConnectors/index.js +36 -36
- package/package.json +4 -4
- package/dist/components/ConnectButton/formatAddress.d.ts +0 -2
- package/dist/components/FunPayments/FunPaymentSetup.d.ts +0 -17
- package/dist/components/Icons/WalletIcon.d.ts +0 -2
- package/dist/hooks/useInputAmountRestriction.d.ts +0 -7
- package/dist/modals/CheckoutModal/PaymentSetup.d.ts +0 -38
- package/dist/modals/CheckoutModal/useBottomSection.d.ts +0 -2
- package/dist/utils/flags/index.d.ts +0 -12
- package/dist/wallets/walletConnectors/chunk-FLTQRYFS.js +0 -27
- package/dist/components/Icons/{Checked.d.ts → CheckIcon.d.ts} +0 -0
- package/dist/wallets/walletConnectors/{chunk-5K4DIMYR.js → chunk-4HKPVECK.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AXPQHNUI.js → chunk-4K3EKHXR.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-B7FHT3CB.js → chunk-5MVCKMZT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-QP2BIVXD.js → chunk-5NZLWT3Y.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-2EMZOYQI.js → chunk-B5D7DYVV.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-L7QI6PBN.js → chunk-HLH777AC.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-EFIENLEE.js → chunk-HMDUVRZP.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AUVBWDIK.js → chunk-KDGMYRMC.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UZEMNN3Q.js → chunk-VU6B3HMD.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UWZQZY4S.js → chunk-YRK6XWL6.js} +4 -4
package/dist/types/utils.d.ts
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FunkitTextCustomizationsConfig } from '../providers/FunkitConfigContext';
|
|
2
|
+
export declare function formatAddress(address: string): string;
|
|
3
|
+
export declare function formatAddressLastFour(address: string): string;
|
|
4
|
+
export declare const getWalletLabel: (textCustomizations: FunkitTextCustomizationsConfig, walletAddress?: string) => string;
|
package/dist/utils/assets.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PaymentMethod } from '../consts/payment';
|
|
2
2
|
import { FunkitActiveCheckoutItem, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
3
|
+
import { FlagValues } from '../providers/FunkitFlagsProvider';
|
|
4
|
+
export declare const getNormalizedTokenBalance: (tokenBalance: bigint | number, decimals: number) => number;
|
|
5
|
+
export declare const isAssetUsableToPayForCheckout: (flags: FlagValues, checkoutItem: FunkitActiveCheckoutItem, paymentMethod: PaymentMethod, assetChainId: string, assetTokenAddress: string, isWeb2Login: boolean, isWeb3Login: boolean) => {
|
|
5
6
|
isUsable: boolean;
|
|
6
7
|
reason: string;
|
|
7
8
|
};
|
|
@@ -29,7 +30,10 @@ export type RecommendedAsset = {
|
|
|
29
30
|
symbol: string;
|
|
30
31
|
label: string | null;
|
|
31
32
|
} | null;
|
|
32
|
-
export declare const getRecommendedAsset: (checkoutItem: FunkitActiveCheckoutItem, accountHoldingsMap: AssetHoldingsMap, isWeb3Login: boolean, isWeb2Login: boolean) => RecommendedAsset;
|
|
33
|
+
export declare const getRecommendedAsset: (flags: FlagValues, checkoutItem: FunkitActiveCheckoutItem, accountHoldingsMap: AssetHoldingsMap, isWeb3Login: boolean, isWeb2Login: boolean) => RecommendedAsset;
|
|
34
|
+
/**
|
|
35
|
+
* @returns formatted max usable USD balance from a given assets map */
|
|
36
|
+
export declare const getTotalAssetBalance: (assets: AssetHoldingsMap) => string;
|
|
33
37
|
/**
|
|
34
38
|
*
|
|
35
39
|
* @param {FunkitCheckoutConfig} checkoutConfig
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CheckoutHistoryItem, CheckoutState } from '@funkit/api-base';
|
|
2
2
|
import { Address, Hex } from 'viem';
|
|
3
3
|
import { UseConfigReturnType } from 'wagmi';
|
|
4
|
+
import { PaymentMethod } from '../consts/payment';
|
|
4
5
|
import { FunkitActiveCheckoutItem, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
5
6
|
export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
|
|
6
7
|
export declare const MESH_TIME_ESTIMATE_MS = 300000;
|
|
@@ -84,15 +85,11 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
|
|
|
84
85
|
};
|
|
85
86
|
/**
|
|
86
87
|
* Decorates a list of token strings with their chainId-specific tokenAddress and pickedChainId
|
|
87
|
-
* @param
|
|
88
|
+
* @param tokensChainMap Map of token strings e.g. ['ETH', 'MATIC', ...]
|
|
88
89
|
* @param targetChainId The targetChain identifier of the checkout
|
|
89
90
|
* @returns List of tokenItem objects
|
|
90
91
|
*/
|
|
91
|
-
export declare function decorateTokenList(tokensChainMap: {
|
|
92
|
-
[ticker: string]: {
|
|
93
|
-
[chainId: string]: true;
|
|
94
|
-
};
|
|
95
|
-
}, targetChainId: string, apiKey: string): Promise<{
|
|
92
|
+
export declare function decorateTokenList(tokensChainMap: Record<string, Set<string>>, targetChainId: string, apiKey: string): Promise<{
|
|
96
93
|
symbol: string;
|
|
97
94
|
tokenAddress: null | Hex;
|
|
98
95
|
tokenUnitPriceUsd: null | number;
|
|
@@ -111,7 +108,8 @@ export declare function categorizeCheckoutHistories(checkoutHistoryList: Checkou
|
|
|
111
108
|
};
|
|
112
109
|
export declare function getCheckoutStateStepNumber(state: CheckoutState): 0 | 1 | 3 | 2;
|
|
113
110
|
export declare function formatTokenAmountForMoonpay(amount: number, mpCurrencyCode: string): string;
|
|
114
|
-
export declare function
|
|
111
|
+
export declare function hackTimeEstimationForImportantCustomer(originalTimeEstimation: number, paymentMethod: PaymentMethod, apiKey: string): any;
|
|
112
|
+
export declare function getEstimateEndTimeInfo(createdTimeMs: number, checkoutItem: FunkitActiveCheckoutItem, apiKey: string): {
|
|
115
113
|
estimatedEndTimeMs: number;
|
|
116
114
|
estimatedEndTimeFromNowMs: number;
|
|
117
115
|
isExceededEstimation: boolean;
|
package/dist/utils/deposit.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const MINIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 35;
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
}): boolean;
|
|
2
|
+
export declare const MAXIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 10000;
|
|
3
|
+
export declare function isAmountInvalidForMoonpay(amountUsd: number): boolean;
|
|
5
4
|
export declare function generateInsufficientAmountForMoonpayError(isShortened: boolean): string;
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import type { AbstractFlags,
|
|
1
|
+
import type { AbstractFlags, InferFlagType } from './types';
|
|
2
2
|
export interface UserContext {
|
|
3
3
|
apiKey: string;
|
|
4
4
|
userId?: string;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private _config;
|
|
11
|
-
fetchFlagConfig: () => Promise<T>;
|
|
12
|
-
static createForTesting<T extends AbstractFlags>(flags: T, fetchFlagConfig: <T>() => Promise<T>): FeatureFlag<T>;
|
|
13
|
-
constructor(_config: T, fetchFlagConfig?: () => Promise<T>);
|
|
14
|
-
private flagConfig;
|
|
15
|
-
private userContext;
|
|
16
|
-
private derivedFlags;
|
|
17
|
-
private isUsingOnlineConfig;
|
|
18
|
-
init(userContext: UserContext): Promise<void>;
|
|
19
|
-
private deriveAllFlags;
|
|
20
|
-
private deriveFlag;
|
|
21
|
-
private evalCondition;
|
|
22
|
-
getBool(flagKey: FilterKeysBy<BooleanFlagConfig, T>, fallback: boolean): boolean;
|
|
23
|
-
getNumber(flagKey: FilterKeysBy<NumberFlagConfig, T>, fallback: number): number;
|
|
24
|
-
getString(flagKey: FilterKeysBy<StringFlagConfig, T>, fallback: string): string;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
6
|
+
export declare function fetchConfigFromServer<F extends AbstractFlags>(): Promise<F>;
|
|
7
|
+
export declare function deriveAllFlags<T extends AbstractFlags>(config: T, userContext: UserContext): {
|
|
8
|
+
[K in keyof T]?: InferFlagType<T[K]>;
|
|
9
|
+
};
|
package/dist/utils/mesh.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AssetHoldingsMap } from '../utils/assets';
|
|
1
2
|
export declare const FUNKIT_MESH_CLIENT_ID = "8132aff4-56c9-4b1d-85b4-08dbdcc6199d";
|
|
2
3
|
export declare enum MeshExchanges {
|
|
3
4
|
Robinhood = "Robinhood",
|
|
@@ -35,11 +36,15 @@ export declare const EXCHANGE_NAME_TO_TYPE: {
|
|
|
35
36
|
[x: string]: string;
|
|
36
37
|
};
|
|
37
38
|
export declare function fetchMeshLinkToken(funkitUserId: string, selectedExchange: MeshExchanges, funApiKey: string): Promise<import("@funkit/api-base").GetLinkTokenResponse>;
|
|
39
|
+
interface CryptoCurrencyPosition {
|
|
40
|
+
symbol: string;
|
|
41
|
+
amount: number;
|
|
42
|
+
}
|
|
38
43
|
export declare function fetchMeshAccountCryptoHoldings({ authToken, apiKey, exchange, }: {
|
|
39
44
|
authToken: string;
|
|
40
45
|
apiKey: string;
|
|
41
46
|
exchange: MeshExchanges;
|
|
42
|
-
}): Promise<
|
|
47
|
+
}): Promise<CryptoCurrencyPosition[]>;
|
|
43
48
|
export declare function fetchMeshSupportedTokensByBrokerageAndSupportedFunkitChains({ exchange, apiKey, }: {
|
|
44
49
|
exchange: MeshExchanges;
|
|
45
50
|
apiKey: string;
|
|
@@ -52,3 +57,11 @@ export declare function fetchMeshSupportedTokensAndIdByChainIdAndBrokerage({ cha
|
|
|
52
57
|
meshSupportedTokens: string[];
|
|
53
58
|
meshNetworkId: string | undefined;
|
|
54
59
|
}>;
|
|
60
|
+
interface MeshAccountInfo {
|
|
61
|
+
authToken: string;
|
|
62
|
+
exchange: MeshExchanges;
|
|
63
|
+
targetChain: string;
|
|
64
|
+
apiKey: string;
|
|
65
|
+
}
|
|
66
|
+
export declare function fetchMeshAccountHoldingsMap(info: MeshAccountInfo): Promise<AssetHoldingsMap>;
|
|
67
|
+
export {};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
zerionWallet
|
|
7
|
-
} from "./chunk-DBP432DI.js";
|
|
3
|
+
xdefiWallet
|
|
4
|
+
} from "./chunk-RVIZMVFR.js";
|
|
8
5
|
import {
|
|
9
6
|
zealWallet
|
|
10
7
|
} from "./chunk-BUUV6BS4.js";
|
|
11
8
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
9
|
+
zerionWallet
|
|
10
|
+
} from "./chunk-DBP432DI.js";
|
|
11
|
+
import {
|
|
12
|
+
mewWallet
|
|
13
|
+
} from "./chunk-CVYXTHZ6.js";
|
|
14
14
|
import {
|
|
15
15
|
tahoWallet
|
|
16
16
|
} from "./chunk-6AYBA6IH.js";
|
|
17
17
|
import {
|
|
18
18
|
talismanWallet
|
|
19
19
|
} from "./chunk-OTXHQMSG.js";
|
|
20
|
-
import {
|
|
21
|
-
tokenaryWallet
|
|
22
|
-
} from "./chunk-FAYEL4JP.js";
|
|
23
20
|
import {
|
|
24
21
|
tokenPocketWallet
|
|
25
22
|
} from "./chunk-ISJYPD3T.js";
|
|
23
|
+
import {
|
|
24
|
+
tokenaryWallet
|
|
25
|
+
} from "./chunk-FAYEL4JP.js";
|
|
26
26
|
import {
|
|
27
27
|
trustWallet
|
|
28
28
|
} from "./chunk-X45WXZDO.js";
|
|
@@ -30,50 +30,47 @@ import {
|
|
|
30
30
|
uniswapWallet
|
|
31
31
|
} from "./chunk-QFRZGNNV.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import {
|
|
36
|
-
phantomWallet
|
|
37
|
-
} from "./chunk-KEVUI6AA.js";
|
|
33
|
+
walletConnectWallet
|
|
34
|
+
} from "./chunk-OFU3PEVT.js";
|
|
38
35
|
import {
|
|
39
36
|
rabbyWallet
|
|
40
37
|
} from "./chunk-H5LLXNOI.js";
|
|
41
|
-
import {
|
|
42
|
-
ramperWallet
|
|
43
|
-
} from "./chunk-TKXQYHWJ.js";
|
|
44
38
|
import {
|
|
45
39
|
rainbowWallet
|
|
46
40
|
} from "./chunk-OHJBALD3.js";
|
|
41
|
+
import {
|
|
42
|
+
ramperWallet
|
|
43
|
+
} from "./chunk-TKXQYHWJ.js";
|
|
47
44
|
import {
|
|
48
45
|
roninWallet
|
|
49
46
|
} from "./chunk-63YLN6R5.js";
|
|
50
47
|
import {
|
|
51
48
|
safeWallet
|
|
52
49
|
} from "./chunk-Z2QCE6O6.js";
|
|
50
|
+
import {
|
|
51
|
+
safeheronWallet
|
|
52
|
+
} from "./chunk-FCIRHRFH.js";
|
|
53
53
|
import {
|
|
54
54
|
safepalWallet
|
|
55
55
|
} from "./chunk-AKAT37SI.js";
|
|
56
56
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunk-
|
|
57
|
+
subWallet
|
|
58
|
+
} from "./chunk-N3ELQYCY.js";
|
|
59
|
+
import {
|
|
60
|
+
injectedWallet
|
|
61
|
+
} from "./chunk-E5NYR4SS.js";
|
|
59
62
|
import {
|
|
60
63
|
metaMaskWallet
|
|
61
64
|
} from "./chunk-ODRDT73B.js";
|
|
62
|
-
import {
|
|
63
|
-
ledgerWallet
|
|
64
|
-
} from "./chunk-ZMHCZCGS.js";
|
|
65
|
-
import {
|
|
66
|
-
mewWallet
|
|
67
|
-
} from "./chunk-CVYXTHZ6.js";
|
|
68
65
|
import {
|
|
69
66
|
oktoWallet
|
|
70
67
|
} from "./chunk-MBQTOALG.js";
|
|
71
|
-
import {
|
|
72
|
-
okxWallet
|
|
73
|
-
} from "./chunk-5HXH52SO.js";
|
|
74
68
|
import {
|
|
75
69
|
omniWallet
|
|
76
70
|
} from "./chunk-II6YBG2B.js";
|
|
71
|
+
import {
|
|
72
|
+
okxWallet
|
|
73
|
+
} from "./chunk-5HXH52SO.js";
|
|
77
74
|
import {
|
|
78
75
|
oneInchWallet
|
|
79
76
|
} from "./chunk-I7MKK24W.js";
|
|
@@ -81,8 +78,8 @@ import {
|
|
|
81
78
|
oneKeyWallet
|
|
82
79
|
} from "./chunk-ZP2SV6KN.js";
|
|
83
80
|
import {
|
|
84
|
-
|
|
85
|
-
} from "./chunk-
|
|
81
|
+
phantomWallet
|
|
82
|
+
} from "./chunk-KEVUI6AA.js";
|
|
86
83
|
import {
|
|
87
84
|
foxWallet
|
|
88
85
|
} from "./chunk-WAOREEBE.js";
|
|
@@ -93,14 +90,17 @@ import {
|
|
|
93
90
|
gateWallet
|
|
94
91
|
} from "./chunk-YIJ5ULO3.js";
|
|
95
92
|
import {
|
|
96
|
-
|
|
97
|
-
} from "./chunk-
|
|
98
|
-
import {
|
|
99
|
-
injectedWallet
|
|
100
|
-
} from "./chunk-E5NYR4SS.js";
|
|
93
|
+
frameWallet
|
|
94
|
+
} from "./chunk-KPVNJO3R.js";
|
|
101
95
|
import {
|
|
102
96
|
kresusWallet
|
|
103
97
|
} from "./chunk-QQJKQCII.js";
|
|
98
|
+
import {
|
|
99
|
+
ledgerWallet
|
|
100
|
+
} from "./chunk-ZMHCZCGS.js";
|
|
101
|
+
import {
|
|
102
|
+
imTokenWallet
|
|
103
|
+
} from "./chunk-BMJOLT2N.js";
|
|
104
104
|
import {
|
|
105
105
|
bybitWallet
|
|
106
106
|
} from "./chunk-3AZNOY75.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
"react-virtuoso": "4.10.1",
|
|
92
92
|
"ua-parser-js": "^1.0.37",
|
|
93
93
|
"uuid": "^9.0.1",
|
|
94
|
-
"@funkit/api-base": "1.1.
|
|
95
|
-
"@funkit/wagmi-tools": "3.0.
|
|
96
|
-
"@funkit/core": "2.1.
|
|
94
|
+
"@funkit/api-base": "1.1.2",
|
|
95
|
+
"@funkit/wagmi-tools": "3.0.9",
|
|
96
|
+
"@funkit/core": "2.1.7"
|
|
97
97
|
},
|
|
98
98
|
"repository": {
|
|
99
99
|
"type": "git",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Address } from 'viem';
|
|
3
|
-
import { PaymentMethod } from '../../consts/payment';
|
|
4
|
-
import { MeshExchanges } from '../../utils/mesh';
|
|
5
|
-
interface FunPaymentSetupProps {
|
|
6
|
-
paymentMethod: undefined | null | PaymentMethod;
|
|
7
|
-
onBackToHome: () => void;
|
|
8
|
-
onExchangeConfirm: (exchange: MeshExchanges) => void;
|
|
9
|
-
paymentAddress: Address;
|
|
10
|
-
token: string;
|
|
11
|
-
tokenChainId: string;
|
|
12
|
-
tokenAmountUsd: number;
|
|
13
|
-
redirectToCheckoutHistory?: (depositAddress: string) => void;
|
|
14
|
-
isParentLoading: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare function FunPaymentSetup({ paymentAddress, paymentMethod, onBackToHome, onExchangeConfirm, token, tokenChainId, tokenAmountUsd, redirectToCheckoutHistory, isParentLoading, }: FunPaymentSetupProps): React.JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Address } from 'viem';
|
|
3
|
-
import { PaymentMethod, PaymentMethodInfo } from '../../consts/payment';
|
|
4
|
-
import { MeshExchanges } from '../../utils/mesh';
|
|
5
|
-
import { CheckoutModalCommonState, FunCheckoutStep, StateTransitionProps, StepTransition, TransitionPayload } from './stepTransition';
|
|
6
|
-
export type PaymentSetupState = CheckoutModalCommonState & {
|
|
7
|
-
step: FunCheckoutStep.PAYMENT_SETUP;
|
|
8
|
-
} & ({
|
|
9
|
-
paymentMethod: PaymentMethod.BROKERAGE;
|
|
10
|
-
} | {
|
|
11
|
-
paymentMethod: PaymentMethod.CARD;
|
|
12
|
-
paymentAddress: Address;
|
|
13
|
-
token: string;
|
|
14
|
-
tokenChainId: string;
|
|
15
|
-
depositAmount: number;
|
|
16
|
-
} | {
|
|
17
|
-
paymentMethod: PaymentMethod.TRANSFER;
|
|
18
|
-
address: Address;
|
|
19
|
-
});
|
|
20
|
-
export type PaymentSetupNext = TransitionPayload<{
|
|
21
|
-
step: FunCheckoutStep.PAYMENT_SETUP;
|
|
22
|
-
hasActiveConnection: true;
|
|
23
|
-
paymentMethod: PaymentMethod.BROKERAGE;
|
|
24
|
-
paymentInfo: PaymentMethodInfo;
|
|
25
|
-
} | {
|
|
26
|
-
step: FunCheckoutStep.PAYMENT_SETUP;
|
|
27
|
-
hasActiveConnection: false;
|
|
28
|
-
paymentMethod: PaymentMethod.BROKERAGE;
|
|
29
|
-
exchange: MeshExchanges;
|
|
30
|
-
} | {
|
|
31
|
-
step: FunCheckoutStep.PAYMENT_SETUP;
|
|
32
|
-
paymentMethod: PaymentMethod.CARD;
|
|
33
|
-
depositAddress: Address;
|
|
34
|
-
}>;
|
|
35
|
-
export declare function paymentSetupNext(state: PaymentSetupState, payload: PaymentSetupNext): StepTransition[FunCheckoutStep.PAYMENT_SETUP];
|
|
36
|
-
type Props = StateTransitionProps<PaymentSetupState, PaymentSetupNext>;
|
|
37
|
-
export declare function PaymentSetup({ modalState, onNext }: Props): React.JSX.Element | null;
|
|
38
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FlagKey } from './config';
|
|
2
|
-
import { FeatureFlag } from './impl';
|
|
3
|
-
export { FlagKey };
|
|
4
|
-
declare const singleton: FeatureFlag<{
|
|
5
|
-
disable_mantle_source_assets: import("./types").BooleanFlagConfig;
|
|
6
|
-
disable_zksync_source_assets_for_mantle_checkouts: import("./types").BooleanFlagConfig;
|
|
7
|
-
disable_zksync_source_assets_for_dydx_checkouts: import("./types").BooleanFlagConfig;
|
|
8
|
-
supported_exchanges: import("./types").StringFlagConfig;
|
|
9
|
-
blocked_countries: import("./types").StringFlagConfig;
|
|
10
|
-
show_powered_tagline: import("./types").BooleanFlagConfig;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const flags: Pick<typeof singleton, "init" | "getBool" | "getNumber" | "getString">;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isIOS
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
|
-
|
|
10
|
-
// src/wallets/walletConnectors/dawnWallet/dawnWallet.ts
|
|
11
|
-
var dawnWallet = () => ({
|
|
12
|
-
id: "dawn",
|
|
13
|
-
name: "Dawn",
|
|
14
|
-
iconUrl: async () => (await import("./dawnWallet-ONVAA3S4.js")).default,
|
|
15
|
-
iconBackground: "#000000",
|
|
16
|
-
installed: hasInjectedProvider({ flag: "isDawn" }),
|
|
17
|
-
hidden: () => !isIOS(),
|
|
18
|
-
downloadUrls: {
|
|
19
|
-
ios: "https://apps.apple.com/us/app/dawn-ethereum-wallet/id1673143782",
|
|
20
|
-
mobile: "https://dawnwallet.xyz"
|
|
21
|
-
},
|
|
22
|
-
createConnector: getInjectedConnector({ flag: "isDawn" })
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
dawnWallet
|
|
27
|
-
};
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isMobile
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
2
5
|
import {
|
|
3
6
|
getInjectedConnector,
|
|
4
7
|
hasInjectedProvider
|
|
5
8
|
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isMobile
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
9
|
import {
|
|
10
10
|
getWalletConnectConnector
|
|
11
11
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isAndroid
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
2
5
|
import {
|
|
3
6
|
getInjectedConnector,
|
|
4
7
|
hasInjectedProvider
|
|
5
8
|
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
9
|
import {
|
|
10
10
|
getWalletConnectConnector
|
|
11
11
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isAndroid
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
2
5
|
import {
|
|
3
6
|
getInjectedConnector,
|
|
4
7
|
hasInjectedProvider
|
|
5
8
|
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
9
|
import {
|
|
10
10
|
getWalletConnectConnector
|
|
11
11
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-WRA2DVJ7.js";
|
|
6
2
|
import {
|
|
7
3
|
isAndroid,
|
|
8
4
|
isIOS
|
|
9
5
|
} from "./chunk-RETKWSKD.js";
|
|
6
|
+
import {
|
|
7
|
+
getInjectedConnector,
|
|
8
|
+
hasInjectedProvider
|
|
9
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
10
10
|
import {
|
|
11
11
|
getWalletConnectConnector
|
|
12
12
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isAndroid
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
2
5
|
import {
|
|
3
6
|
getInjectedConnector,
|
|
4
7
|
hasInjectedProvider
|
|
5
8
|
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
9
|
import {
|
|
10
10
|
getWalletConnectConnector
|
|
11
11
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isMobile
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
2
5
|
import {
|
|
3
6
|
getInjectedConnector,
|
|
4
7
|
hasInjectedProvider
|
|
5
8
|
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isMobile
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
9
|
import {
|
|
10
10
|
getWalletConnectConnector
|
|
11
11
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isAndroid
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
2
5
|
import {
|
|
3
6
|
getInjectedConnector,
|
|
4
7
|
hasInjectedProvider
|
|
5
8
|
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
9
|
import {
|
|
10
10
|
getWalletConnectConnector
|
|
11
11
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isIOS
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
2
5
|
import {
|
|
3
6
|
getInjectedConnector,
|
|
4
7
|
hasInjectedProvider
|
|
5
8
|
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isIOS
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
9
|
import {
|
|
10
10
|
getWalletConnectConnector
|
|
11
11
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
isAndroid
|
|
4
|
+
} from "./chunk-RETKWSKD.js";
|
|
2
5
|
import {
|
|
3
6
|
getInjectedConnector,
|
|
4
7
|
hasInjectedProvider
|
|
5
8
|
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
-
import {
|
|
7
|
-
isAndroid
|
|
8
|
-
} from "./chunk-RETKWSKD.js";
|
|
9
9
|
import {
|
|
10
10
|
getWalletConnectConnector
|
|
11
11
|
} from "./chunk-23WIEY36.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getInjectedConnector,
|
|
4
|
-
hasInjectedProvider
|
|
5
|
-
} from "./chunk-WRA2DVJ7.js";
|
|
6
2
|
import {
|
|
7
3
|
isAndroid,
|
|
8
4
|
isIOS
|
|
9
5
|
} from "./chunk-RETKWSKD.js";
|
|
6
|
+
import {
|
|
7
|
+
getInjectedConnector,
|
|
8
|
+
hasInjectedProvider
|
|
9
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
10
10
|
import {
|
|
11
11
|
getWalletConnectConnector
|
|
12
12
|
} from "./chunk-23WIEY36.js";
|