@funkit/connect 6.14.1 → 6.14.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 +6 -0
- package/dist/consts/funkit.d.ts +1 -0
- package/dist/index.js +17 -12
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +63 -63
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/consts/funkit.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -565,7 +565,8 @@ var PLACEHOLDER_FUNKIT_USER_INFO = {
|
|
|
565
565
|
nameTruncated: "Guest",
|
|
566
566
|
type: "unknown",
|
|
567
567
|
typeLabel: "",
|
|
568
|
-
iconSrc: ""
|
|
568
|
+
iconSrc: "",
|
|
569
|
+
isConnected: false
|
|
569
570
|
};
|
|
570
571
|
|
|
571
572
|
// src/utils/funLogger.ts
|
|
@@ -1683,7 +1684,8 @@ function GeneralWalletProvider({ children }) {
|
|
|
1683
1684
|
nameTruncated: ensName ? formatENS(ensName) : formatAddress2(address),
|
|
1684
1685
|
type: "eoa",
|
|
1685
1686
|
typeLabel: connector?.name || "",
|
|
1686
|
-
iconSrc: ensAvatar || ""
|
|
1687
|
+
iconSrc: ensAvatar || "",
|
|
1688
|
+
isConnected: true
|
|
1687
1689
|
};
|
|
1688
1690
|
}
|
|
1689
1691
|
return PLACEHOLDER_FUNKIT_USER_INFO;
|
|
@@ -22023,11 +22025,12 @@ function usePaymentMethodEnablement({
|
|
|
22023
22025
|
};
|
|
22024
22026
|
}
|
|
22025
22027
|
var usePaymentSources = (paymentMethodInfo, targetChainId, checkoutConfig) => {
|
|
22026
|
-
const {
|
|
22028
|
+
const { userInfo, walletAddress } = useGeneralWallet();
|
|
22027
22029
|
const { data: allFiatAccounts } = useVirtualFiatAccounts();
|
|
22028
22030
|
const matchingFiatAccount = useMatchingVirtualFiatAccount(allFiatAccounts);
|
|
22029
22031
|
const { hasUsableBalance } = useWalletAssetHoldings(targetChainId);
|
|
22030
22032
|
const { apiKey } = useFunkitConfig();
|
|
22033
|
+
const isConnected = userInfo.isConnected;
|
|
22031
22034
|
const { isFiatEnabled, isTokenTransferEnabled, isCardEnabled } = usePaymentMethodEnablement({ checkoutConfig });
|
|
22032
22035
|
const accountPaymentMethodInfo = createPaymentMethodInfo({
|
|
22033
22036
|
paymentMethod: "balance" /* ACCOUNT_BALANCE */,
|
|
@@ -22039,17 +22042,17 @@ var usePaymentSources = (paymentMethodInfo, targetChainId, checkoutConfig) => {
|
|
|
22039
22042
|
bridgeCustomer: allFiatAccounts.bridgeCustomer
|
|
22040
22043
|
}) : null;
|
|
22041
22044
|
const showBalanceOption = isKatanaCustomer(apiKey) || hasUsableBalance;
|
|
22042
|
-
const connectedAccountInfo = paymentMethodInfo?.paymentMethod !== "balance" /* ACCOUNT_BALANCE */ &&
|
|
22045
|
+
const connectedAccountInfo = paymentMethodInfo?.paymentMethod !== "balance" /* ACCOUNT_BALANCE */ && isConnected && showBalanceOption ? accountPaymentMethodInfo : null;
|
|
22043
22046
|
const connected = [
|
|
22044
22047
|
paymentMethodInfo,
|
|
22045
22048
|
connectedAccountInfo,
|
|
22046
22049
|
virtualBankPaymentMethodInfo
|
|
22047
22050
|
].filter(isNotNullish7);
|
|
22048
|
-
const ignoreFallback =
|
|
22051
|
+
const ignoreFallback = isConnected && !hasUsableBalance;
|
|
22049
22052
|
const fallback2 = connected.length === 0 && !ignoreFallback ? isTokenTransferEnabled ? ["token_transfer" /* TOKEN_TRANSFER */] : isCardEnabled ? ["card" /* CARD */] : ["balance" /* ACCOUNT_BALANCE */] : [];
|
|
22050
22053
|
const isTokenInNewSources = !fallback2.includes("token_transfer" /* TOKEN_TRANSFER */) && isTokenTransferEnabled;
|
|
22051
|
-
const isWalletInNewSources = !
|
|
22052
|
-
const isBankInNewSources = !matchingFiatAccount &&
|
|
22054
|
+
const isWalletInNewSources = !isConnected;
|
|
22055
|
+
const isBankInNewSources = !matchingFiatAccount && isConnected && isFiatEnabled;
|
|
22053
22056
|
const newSources = [
|
|
22054
22057
|
isTokenInNewSources && "token_transfer" /* TOKEN_TRANSFER */,
|
|
22055
22058
|
!fallback2.includes("card" /* CARD */) && isCardEnabled && "card" /* CARD */,
|
|
@@ -22303,7 +22306,7 @@ function LoadingAccount({
|
|
|
22303
22306
|
modalState,
|
|
22304
22307
|
onNext
|
|
22305
22308
|
}) {
|
|
22306
|
-
const { walletAddress } = useGeneralWallet();
|
|
22309
|
+
const { walletAddress, userInfo } = useGeneralWallet();
|
|
22307
22310
|
const { apiKey } = useFunkitConfig();
|
|
22308
22311
|
const { targetChainId, isDefiMode } = modalState;
|
|
22309
22312
|
const { isLoading: isFetchingAssets, walletAssets } = useWalletAssets();
|
|
@@ -22327,7 +22330,7 @@ function LoadingAccount({
|
|
|
22327
22330
|
if (isLoadingFlags || isLoadingFiat || !checkoutConfig) {
|
|
22328
22331
|
return;
|
|
22329
22332
|
}
|
|
22330
|
-
if (startsOnSelectAssetStep) {
|
|
22333
|
+
if (startsOnSelectAssetStep && userInfo.isConnected) {
|
|
22331
22334
|
const paymentMethodInfo = createPaymentMethodInfo({
|
|
22332
22335
|
paymentMethod: "balance" /* ACCOUNT_BALANCE */,
|
|
22333
22336
|
walletAddress
|
|
@@ -22379,7 +22382,8 @@ function LoadingAccount({
|
|
|
22379
22382
|
targetChainId,
|
|
22380
22383
|
onNext,
|
|
22381
22384
|
updateSelectedPaymentMethodInfo,
|
|
22382
|
-
checkoutConfig
|
|
22385
|
+
checkoutConfig,
|
|
22386
|
+
userInfo.isConnected
|
|
22383
22387
|
]);
|
|
22384
22388
|
return startsOnConfirmationStep ? /* @__PURE__ */ React150.createElement(ConfirmationStepLoading, null) : /* @__PURE__ */ React150.createElement(FunAssetLoading, { count: 5 });
|
|
22385
22389
|
}
|
|
@@ -30691,7 +30695,8 @@ var FunkitWeb2Provider = ({
|
|
|
30691
30695
|
nameTruncated,
|
|
30692
30696
|
type,
|
|
30693
30697
|
typeLabel,
|
|
30694
|
-
iconSrc
|
|
30698
|
+
iconSrc,
|
|
30699
|
+
isConnected: true
|
|
30695
30700
|
};
|
|
30696
30701
|
}, [loggedInUser, loginMethod]);
|
|
30697
30702
|
const contextValue = {
|
|
@@ -31630,7 +31635,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
31630
31635
|
localStorage.setItem(storageKey5, version);
|
|
31631
31636
|
}
|
|
31632
31637
|
function getCurrentSdkVersion() {
|
|
31633
|
-
return "6.14.
|
|
31638
|
+
return "6.14.2";
|
|
31634
31639
|
}
|
|
31635
31640
|
function useFingerprint() {
|
|
31636
31641
|
const fingerprint = useCallback50(() => {
|
|
@@ -1,100 +1,100 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
zealWallet
|
|
4
|
+
} from "./chunk-RNBEDQHF.js";
|
|
5
5
|
import {
|
|
6
6
|
zerionWallet
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q3H3TRBS.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
xdefiWallet
|
|
10
|
+
} from "./chunk-BOU4WKRZ.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
talismanWallet
|
|
13
|
+
} from "./chunk-DRO6WYMM.js";
|
|
14
|
+
import {
|
|
15
|
+
safepalWallet
|
|
16
|
+
} from "./chunk-EC6CHBSZ.js";
|
|
14
17
|
import {
|
|
15
18
|
tahoWallet
|
|
16
19
|
} from "./chunk-ZZZRUXZE.js";
|
|
17
20
|
import {
|
|
18
21
|
tokenPocketWallet
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-J3LI3FYZ.js";
|
|
20
23
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
trustWallet
|
|
25
|
+
} from "./chunk-RKPCWHXL.js";
|
|
23
26
|
import {
|
|
24
27
|
tokenaryWallet
|
|
25
28
|
} from "./chunk-D6AOOO5F.js";
|
|
26
29
|
import {
|
|
27
|
-
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
trustWallet
|
|
31
|
-
} from "./chunk-VYBAYMP3.js";
|
|
30
|
+
uniswapWallet
|
|
31
|
+
} from "./chunk-LH7BMNFZ.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
walletConnectWallet
|
|
34
|
+
} from "./chunk-NP5QGWNL.js";
|
|
35
35
|
import {
|
|
36
36
|
phantomWallet
|
|
37
37
|
} from "./chunk-362NXNTM.js";
|
|
38
|
-
import {
|
|
39
|
-
rainbowWallet
|
|
40
|
-
} from "./chunk-2KUBG3S6.js";
|
|
41
|
-
import {
|
|
42
|
-
roninWallet
|
|
43
|
-
} from "./chunk-NWIQNBJU.js";
|
|
44
38
|
import {
|
|
45
39
|
rabbyWallet
|
|
46
40
|
} from "./chunk-BBOM42DL.js";
|
|
41
|
+
import {
|
|
42
|
+
rainbowWallet
|
|
43
|
+
} from "./chunk-3CICVJUN.js";
|
|
47
44
|
import {
|
|
48
45
|
ramperWallet
|
|
49
46
|
} from "./chunk-BYXPFMI7.js";
|
|
50
47
|
import {
|
|
51
|
-
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import {
|
|
54
|
-
safepalWallet
|
|
55
|
-
} from "./chunk-NT2HYJKW.js";
|
|
48
|
+
roninWallet
|
|
49
|
+
} from "./chunk-QLVVUKYB.js";
|
|
56
50
|
import {
|
|
57
51
|
safeWallet
|
|
58
52
|
} from "./chunk-BQQQL6UD.js";
|
|
59
53
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
54
|
+
safeheronWallet
|
|
55
|
+
} from "./chunk-RZIO5TFF.js";
|
|
62
56
|
import {
|
|
63
|
-
|
|
64
|
-
} from "./chunk-
|
|
57
|
+
subWallet
|
|
58
|
+
} from "./chunk-ZSI5N4VV.js";
|
|
65
59
|
import {
|
|
66
60
|
metaMaskWallet
|
|
67
|
-
} from "./chunk-
|
|
68
|
-
import {
|
|
69
|
-
okxWallet
|
|
70
|
-
} from "./chunk-TDIEHTMB.js";
|
|
61
|
+
} from "./chunk-UYGJO62F.js";
|
|
71
62
|
import {
|
|
72
63
|
mewWallet
|
|
73
64
|
} from "./chunk-OL5ZO7E4.js";
|
|
74
65
|
import {
|
|
75
|
-
|
|
76
|
-
} from "./chunk-
|
|
66
|
+
oktoWallet
|
|
67
|
+
} from "./chunk-ADIXAKUL.js";
|
|
68
|
+
import {
|
|
69
|
+
okxWallet
|
|
70
|
+
} from "./chunk-AFXHGWBH.js";
|
|
77
71
|
import {
|
|
78
72
|
omniWallet
|
|
79
73
|
} from "./chunk-7CUY5G6R.js";
|
|
74
|
+
import {
|
|
75
|
+
ledgerWallet
|
|
76
|
+
} from "./chunk-BRBKM4PW.js";
|
|
80
77
|
import {
|
|
81
78
|
oneInchWallet
|
|
82
79
|
} from "./chunk-OESTDX6I.js";
|
|
83
80
|
import {
|
|
84
|
-
|
|
85
|
-
} from "./chunk-
|
|
81
|
+
oneKeyWallet
|
|
82
|
+
} from "./chunk-SHBUZ7U7.js";
|
|
86
83
|
import {
|
|
87
|
-
|
|
88
|
-
} from "./chunk-
|
|
84
|
+
foxWallet
|
|
85
|
+
} from "./chunk-CNPKISHN.js";
|
|
89
86
|
import {
|
|
90
87
|
frontierWallet
|
|
91
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-VWCLFMWJ.js";
|
|
92
89
|
import {
|
|
93
|
-
|
|
94
|
-
} from "./chunk-
|
|
90
|
+
frameWallet
|
|
91
|
+
} from "./chunk-IFON7E6U.js";
|
|
95
92
|
import {
|
|
96
93
|
imTokenWallet
|
|
97
94
|
} from "./chunk-COZ7MIQS.js";
|
|
95
|
+
import {
|
|
96
|
+
gateWallet
|
|
97
|
+
} from "./chunk-CJGUM55H.js";
|
|
98
98
|
import {
|
|
99
99
|
injectedWallet
|
|
100
100
|
} from "./chunk-XWUJE7MW.js";
|
|
@@ -103,51 +103,51 @@ import {
|
|
|
103
103
|
} from "./chunk-MJXPRJZT.js";
|
|
104
104
|
import {
|
|
105
105
|
bybitWallet
|
|
106
|
-
} from "./chunk-
|
|
107
|
-
import {
|
|
108
|
-
clvWallet
|
|
109
|
-
} from "./chunk-M3NZ6R2E.js";
|
|
106
|
+
} from "./chunk-LNEC5RNX.js";
|
|
110
107
|
import {
|
|
111
108
|
coin98Wallet
|
|
112
|
-
} from "./chunk-
|
|
113
|
-
import {
|
|
114
|
-
coinbaseWallet
|
|
115
|
-
} from "./chunk-H4IRCEZN.js";
|
|
109
|
+
} from "./chunk-KIDC67XJ.js";
|
|
116
110
|
import {
|
|
117
111
|
coreWallet
|
|
118
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-JCHN6A47.js";
|
|
119
113
|
import {
|
|
120
114
|
dawnWallet
|
|
121
115
|
} from "./chunk-HWPKCIBE.js";
|
|
116
|
+
import {
|
|
117
|
+
coinbaseWallet
|
|
118
|
+
} from "./chunk-H4IRCEZN.js";
|
|
122
119
|
import {
|
|
123
120
|
desigWallet
|
|
124
121
|
} from "./chunk-OPAZMNA7.js";
|
|
125
122
|
import {
|
|
126
123
|
enkryptWallet
|
|
127
124
|
} from "./chunk-OLOIXTYS.js";
|
|
125
|
+
import {
|
|
126
|
+
clvWallet
|
|
127
|
+
} from "./chunk-2GJQ4XZQ.js";
|
|
128
128
|
import {
|
|
129
129
|
argentWallet
|
|
130
130
|
} from "./chunk-WSQ2YJO2.js";
|
|
131
131
|
import {
|
|
132
132
|
bifrostWallet
|
|
133
|
-
} from "./chunk-
|
|
134
|
-
import {
|
|
135
|
-
bitskiWallet
|
|
136
|
-
} from "./chunk-HS3C7OQV.js";
|
|
133
|
+
} from "./chunk-UIASLGLV.js";
|
|
137
134
|
import {
|
|
138
135
|
bitverseWallet
|
|
139
136
|
} from "./chunk-3HZRRP4Y.js";
|
|
140
137
|
import {
|
|
141
|
-
|
|
142
|
-
} from "./chunk-
|
|
138
|
+
bitskiWallet
|
|
139
|
+
} from "./chunk-HS3C7OQV.js";
|
|
143
140
|
import {
|
|
144
|
-
|
|
145
|
-
} from "./chunk-
|
|
146
|
-
import "./chunk-23WIEY36.js";
|
|
141
|
+
bitgetWallet
|
|
142
|
+
} from "./chunk-5W7VDOCL.js";
|
|
147
143
|
import {
|
|
148
144
|
braveWallet
|
|
149
145
|
} from "./chunk-BPZ2XJO2.js";
|
|
150
146
|
import "./chunk-DNSG5Q7V.js";
|
|
147
|
+
import {
|
|
148
|
+
bloomWallet
|
|
149
|
+
} from "./chunk-S27IADFU.js";
|
|
150
|
+
import "./chunk-23WIEY36.js";
|
|
151
151
|
export {
|
|
152
152
|
argentWallet,
|
|
153
153
|
bifrostWallet,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "6.14.
|
|
3
|
+
"version": "6.14.2",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"ua-parser-js": "^1.0.37",
|
|
93
93
|
"use-debounce": "^10.0.5",
|
|
94
94
|
"uuid": "^9.0.1",
|
|
95
|
+
"@funkit/utils": "1.1.11",
|
|
95
96
|
"@funkit/api-base": "1.12.3",
|
|
96
97
|
"@funkit/core": "2.3.48",
|
|
97
98
|
"@funkit/wagmi-tools": "3.0.71",
|
|
98
|
-
"@funkit/chains": "0.4.0",
|
|
99
99
|
"@funkit/fun-relay": "2.0.3",
|
|
100
|
-
"@funkit/
|
|
100
|
+
"@funkit/chains": "0.4.0"
|
|
101
101
|
},
|
|
102
102
|
"repository": {
|
|
103
103
|
"type": "git",
|