@funkit/connect 9.6.0 → 9.6.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 +6 -0
- package/dist/index.js +24 -9
- package/dist/wallets/walletConnectors/index.js +20 -20
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2981,7 +2981,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
2981
2981
|
localStorage.setItem(storageKey, version);
|
|
2982
2982
|
}
|
|
2983
2983
|
function getCurrentSdkVersion() {
|
|
2984
|
-
return "9.6.
|
|
2984
|
+
return "9.6.1";
|
|
2985
2985
|
}
|
|
2986
2986
|
function useFingerprint() {
|
|
2987
2987
|
const fingerprint = useCallback3(() => {
|
|
@@ -3835,19 +3835,31 @@ function getCompletionTxInfo(directExecution) {
|
|
|
3835
3835
|
customRedirectUrl: void 0
|
|
3836
3836
|
};
|
|
3837
3837
|
}
|
|
3838
|
-
|
|
3838
|
+
var GET_CAPABILITIES_TIMEOUT_MS = 2e3;
|
|
3839
|
+
async function getCapabilitiesWithTimeout(wallet, chainId) {
|
|
3839
3840
|
if (!wallet.account) {
|
|
3840
|
-
return
|
|
3841
|
+
return null;
|
|
3841
3842
|
}
|
|
3843
|
+
let timer;
|
|
3842
3844
|
try {
|
|
3843
|
-
|
|
3844
|
-
account: wallet.account,
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3845
|
+
return await Promise.race([
|
|
3846
|
+
wallet.getCapabilities({ account: wallet.account, chainId }),
|
|
3847
|
+
new Promise((resolve) => {
|
|
3848
|
+
timer = setTimeout(() => resolve(null), GET_CAPABILITIES_TIMEOUT_MS);
|
|
3849
|
+
})
|
|
3850
|
+
]);
|
|
3848
3851
|
} catch {
|
|
3852
|
+
return null;
|
|
3853
|
+
} finally {
|
|
3854
|
+
clearTimeout(timer);
|
|
3855
|
+
}
|
|
3856
|
+
}
|
|
3857
|
+
async function supportsAtomicBatch(wallet, chainId) {
|
|
3858
|
+
const capabilities = await getCapabilitiesWithTimeout(wallet, chainId);
|
|
3859
|
+
if (!capabilities) {
|
|
3849
3860
|
return false;
|
|
3850
3861
|
}
|
|
3862
|
+
return capabilities.atomicBatch?.supported ?? capabilities.atomic?.status === "supported";
|
|
3851
3863
|
}
|
|
3852
3864
|
async function disableAtomicBatchIfSupported(wallet, chainId) {
|
|
3853
3865
|
const hasAtomicBatch = await supportsAtomicBatch(wallet, chainId);
|
|
@@ -3858,7 +3870,10 @@ async function disableAtomicBatchIfSupported(wallet, chainId) {
|
|
|
3858
3870
|
get(target, prop, receiver) {
|
|
3859
3871
|
if (prop === "getCapabilities") {
|
|
3860
3872
|
return async (params) => {
|
|
3861
|
-
const capabilities = await
|
|
3873
|
+
const capabilities = await getCapabilitiesWithTimeout(
|
|
3874
|
+
target,
|
|
3875
|
+
params?.chainId ?? chainId
|
|
3876
|
+
);
|
|
3862
3877
|
return {
|
|
3863
3878
|
...capabilities,
|
|
3864
3879
|
atomicBatch: { supported: false },
|
|
@@ -77,9 +77,6 @@ import {
|
|
|
77
77
|
import {
|
|
78
78
|
phantomWallet
|
|
79
79
|
} from "./chunk-57GN4W23.js";
|
|
80
|
-
import {
|
|
81
|
-
foxWallet
|
|
82
|
-
} from "./chunk-YGMU5VWD.js";
|
|
83
80
|
import {
|
|
84
81
|
frameWallet
|
|
85
82
|
} from "./chunk-MTJIPVYB.js";
|
|
@@ -92,6 +89,9 @@ import {
|
|
|
92
89
|
import {
|
|
93
90
|
imTokenWallet
|
|
94
91
|
} from "./chunk-BWLMNATA.js";
|
|
92
|
+
import {
|
|
93
|
+
dawnWallet
|
|
94
|
+
} from "./chunk-PARFRRNI.js";
|
|
95
95
|
import {
|
|
96
96
|
injectedWallet
|
|
97
97
|
} from "./chunk-HPUEYLLS.js";
|
|
@@ -101,52 +101,52 @@ import {
|
|
|
101
101
|
import {
|
|
102
102
|
ledgerWallet
|
|
103
103
|
} from "./chunk-V4EXM3KB.js";
|
|
104
|
-
import {
|
|
105
|
-
bybitWallet
|
|
106
|
-
} from "./chunk-7IEUTLHY.js";
|
|
107
104
|
import {
|
|
108
105
|
clvWallet
|
|
109
106
|
} from "./chunk-3ZJN3PXP.js";
|
|
107
|
+
import {
|
|
108
|
+
bitskiWallet
|
|
109
|
+
} from "./chunk-Y36HPFB3.js";
|
|
110
110
|
import {
|
|
111
111
|
coin98Wallet
|
|
112
112
|
} from "./chunk-RZQ4B4Z7.js";
|
|
113
|
-
import {
|
|
114
|
-
coinbaseWallet
|
|
115
|
-
} from "./chunk-OUM6H3WU.js";
|
|
116
113
|
import {
|
|
117
114
|
coreWallet
|
|
118
115
|
} from "./chunk-55VS2NKG.js";
|
|
119
|
-
import {
|
|
120
|
-
dawnWallet
|
|
121
|
-
} from "./chunk-PARFRRNI.js";
|
|
122
116
|
import {
|
|
123
117
|
desigWallet
|
|
124
118
|
} from "./chunk-TNVLCMJD.js";
|
|
119
|
+
import {
|
|
120
|
+
coinbaseWallet
|
|
121
|
+
} from "./chunk-OUM6H3WU.js";
|
|
125
122
|
import {
|
|
126
123
|
enkryptWallet
|
|
127
124
|
} from "./chunk-2DKNXOPL.js";
|
|
128
125
|
import {
|
|
129
|
-
|
|
130
|
-
} from "./chunk-
|
|
131
|
-
import {
|
|
132
|
-
bitgetWallet
|
|
133
|
-
} from "./chunk-IMNI4AGV.js";
|
|
126
|
+
foxWallet
|
|
127
|
+
} from "./chunk-YGMU5VWD.js";
|
|
134
128
|
import {
|
|
135
129
|
bifrostWallet
|
|
136
130
|
} from "./chunk-OD6B2ISG.js";
|
|
137
131
|
import {
|
|
138
|
-
|
|
139
|
-
} from "./chunk-
|
|
132
|
+
bitgetWallet
|
|
133
|
+
} from "./chunk-IMNI4AGV.js";
|
|
134
|
+
import {
|
|
135
|
+
argentWallet
|
|
136
|
+
} from "./chunk-XTD6OMZP.js";
|
|
140
137
|
import {
|
|
141
138
|
bitverseWallet
|
|
142
139
|
} from "./chunk-RZH4FSX7.js";
|
|
143
140
|
import {
|
|
144
141
|
bloomWallet
|
|
145
142
|
} from "./chunk-S6R4B763.js";
|
|
146
|
-
import "./chunk-FMVNQKZL.js";
|
|
147
143
|
import {
|
|
148
144
|
braveWallet
|
|
149
145
|
} from "./chunk-XVH4JIXB.js";
|
|
146
|
+
import {
|
|
147
|
+
bybitWallet
|
|
148
|
+
} from "./chunk-7IEUTLHY.js";
|
|
149
|
+
import "./chunk-FMVNQKZL.js";
|
|
150
150
|
import "./chunk-YYYRPQHB.js";
|
|
151
151
|
import "./chunk-3K2MFXCO.js";
|
|
152
152
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.1",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
"use-debounce": "^10.0.5",
|
|
106
106
|
"uuid": "^9.0.1",
|
|
107
107
|
"@funkit/api-base": "4.0.0",
|
|
108
|
-
"@funkit/chains": "1.1.2",
|
|
109
108
|
"@funkit/fun-relay": "2.6.5",
|
|
110
|
-
"@funkit/utils": "2.0.0"
|
|
109
|
+
"@funkit/utils": "2.0.0",
|
|
110
|
+
"@funkit/chains": "1.1.2"
|
|
111
111
|
},
|
|
112
112
|
"repository": {
|
|
113
113
|
"type": "git",
|