btc-wallet 0.5.52-beta → 0.5.53-beta
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/dist/index.js +12 -6
- package/dist/index.js.map +2 -2
- package/esm/index.js +12 -6
- package/esm/index.js.map +2 -2
- package/package.json +1 -1
package/esm/index.js
CHANGED
@@ -2320,12 +2320,15 @@ var ConnectProvider = ({
|
|
2320
2320
|
name: ((_a = Object.keys(options.aaOptions.accountContracts)) == null ? void 0 : _a[0]) || "BTC",
|
2321
2321
|
version: ((_c = options.aaOptions.accountContracts[((_b = Object.keys(options.aaOptions.accountContracts)) == null ? void 0 : _b[0]) || "BTC"]) == null ? void 0 : _c[0].version) || "1.0.0"
|
2322
2322
|
});
|
2323
|
-
const
|
2323
|
+
const getConnectorId = useCallback7(() => {
|
2324
|
+
if (typeof window === "undefined") {
|
2325
|
+
return "";
|
2326
|
+
}
|
2324
2327
|
const id = localStorage.getItem("current-connector-id");
|
2325
|
-
|
2328
|
+
return id != null ? id : "";
|
2326
2329
|
}, []);
|
2327
2330
|
const getConnector = useCallback7(() => {
|
2328
|
-
const connectorId2 =
|
2331
|
+
const connectorId2 = getConnectorId();
|
2329
2332
|
return connectors.find((item) => item.metadata.id === connectorId2);
|
2330
2333
|
}, [connectorId, connectors]);
|
2331
2334
|
const setAccountContract = useCallback7(
|
@@ -2339,8 +2342,11 @@ var ConnectProvider = ({
|
|
2339
2342
|
[options.aaOptions.accountContracts, _setAccountContract]
|
2340
2343
|
);
|
2341
2344
|
useEffect5(() => {
|
2342
|
-
|
2343
|
-
|
2345
|
+
const connectorId2 = getConnectorId();
|
2346
|
+
if (connectorId2) {
|
2347
|
+
setConnectorId(connectorId2);
|
2348
|
+
}
|
2349
|
+
}, [autoConnect, getConnectorId]);
|
2344
2350
|
const evmSupportChainIds = useMemo5(() => {
|
2345
2351
|
var _a2;
|
2346
2352
|
let chainIds = (_a2 = options.aaOptions.accountContracts[accountContract.name]) == null ? void 0 : _a2.filter((item) => item.version === accountContract.version).map((item) => item.chainIds).reduce((a, b) => {
|
@@ -4981,7 +4987,7 @@ function getGroup(state) {
|
|
4981
4987
|
|
4982
4988
|
// src/index.ts
|
4983
4989
|
var getVersion = () => {
|
4984
|
-
return "0.5.
|
4990
|
+
return "0.5.53-beta";
|
4985
4991
|
};
|
4986
4992
|
if (typeof window !== "undefined") {
|
4987
4993
|
window.__BTC_WALLET_VERSION = getVersion();
|