@reef-knot/core-react 4.1.1 → 4.2.0

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.
@@ -0,0 +1,2 @@
1
+ export declare const providersStore: import("mipd").Store;
2
+ //# sourceMappingURL=eip6963.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eip6963.d.ts","sourceRoot":"","sources":["../src/eip6963.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,sBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { createStore } from 'mipd';
2
+
3
+ const providersStore = createStore();
4
+
5
+ export { providersStore };
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoConnect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutoConnect.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc,uBAAwB,OAAO,SA6CzD,CAAC"}
1
+ {"version":3,"file":"useAutoConnect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutoConnect.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc,uBAAwB,OAAO,SAmDzD,CAAC"}
@@ -38,7 +38,13 @@ const useAutoConnect = autoConnectEnabled => {
38
38
  const savedReconnectWalletId = yield storage === null || storage === void 0 ? void 0 : storage.getItem(LS_KEY_RECONNECT_WALLET_ID);
39
39
  const walletData = walletDataList.find(data => data.walletId === savedReconnectWalletId);
40
40
  if (walletData) {
41
- const createConnectorFn = ((_b = (_a = walletData === null || walletData === void 0 ? void 0 : walletData.walletconnectExtras) === null || _a === void 0 ? void 0 : _a.connectionViaURI) === null || _b === void 0 ? void 0 : _b.condition) ? walletData === null || walletData === void 0 ? void 0 : walletData.walletconnectExtras.connectionViaURI.createConnectorFn : walletData === null || walletData === void 0 ? void 0 : walletData.createConnectorFn;
41
+ let createConnectorFn = walletData.createConnectorFn;
42
+ if ((_b = (_a = walletData === null || walletData === void 0 ? void 0 : walletData.walletconnectExtras) === null || _a === void 0 ? void 0 : _a.connectionViaURI) === null || _b === void 0 ? void 0 : _b.condition) {
43
+ createConnectorFn = walletData.walletconnectExtras.connectionViaURI.createConnectorFn;
44
+ }
45
+ // Wait for all EIP-6963 wallets to load their code and fire "eip6963:announceProvider" event
46
+ // Without the delay, this code can be called from a browser's cache faster than wallet extension code
47
+ yield new Promise(resolve => setTimeout(resolve, 100));
42
48
  yield reconnectAsync({
43
49
  connectors: [createConnectorFn]
44
50
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/walletData/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC/C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,kBAAkB,oFAM5B,sBAAsB;;CAmBxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/walletData/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC/C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC;IACpB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,kBAAkB,oFAM5B,sBAAsB;;CAoBxB,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { providersStore } from '../eip6963.js';
2
+
1
3
  const getWalletsDataList = ({
2
4
  walletsList,
3
5
  rpc,
@@ -13,7 +15,8 @@ const getWalletsDataList = ({
13
15
  rpc,
14
16
  defaultChain,
15
17
  walletconnectProjectId,
16
- safeAllowedDomains
18
+ safeAllowedDomains,
19
+ providersStore
17
20
  }));
18
21
  return {
19
22
  walletsDataList
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/core-react",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -37,22 +37,23 @@
37
37
  "lint": "eslint --ext ts,tsx,js,mjs ."
38
38
  },
39
39
  "devDependencies": {
40
- "@reef-knot/ledger-connector": "^4.0.1",
41
- "@reef-knot/wallets-list": "^2.0.1",
42
- "@reef-knot/types": "^2.0.1",
43
- "@reef-knot/ui-react": "^2.1.1",
44
- "@reef-knot/wallets-helpers": "^2.0.1",
40
+ "@reef-knot/ledger-connector": "^4.1.0",
41
+ "@reef-knot/wallets-list": "^2.1.0",
42
+ "@reef-knot/types": "^2.1.0",
43
+ "@reef-knot/ui-react": "^2.1.3",
44
+ "@reef-knot/wallets-helpers": "^2.1.0",
45
45
  "eslint-config-custom": "*",
46
46
  "react": "18.2.0",
47
47
  "viem": "2.13.3",
48
- "wagmi": "2.11.2"
48
+ "wagmi": "2.11.2",
49
+ "mipd": "0.0.7"
49
50
  },
50
51
  "peerDependencies": {
51
- "@reef-knot/ledger-connector": "^4.0.0",
52
- "@reef-knot/wallets-list": "^2.0.0",
53
- "@reef-knot/types": "^2.0.0",
54
- "@reef-knot/ui-react": "^2.0.0",
55
- "@reef-knot/wallets-helpers": "^2.0.0",
52
+ "@reef-knot/ledger-connector": "^4.1.0",
53
+ "@reef-knot/wallets-list": "^2.1.0",
54
+ "@reef-knot/types": "^2.0.1",
55
+ "@reef-knot/ui-react": "^2.1.3",
56
+ "@reef-knot/wallets-helpers": "^2.0.2",
56
57
  "react": ">=18",
57
58
  "viem": "2.13.3",
58
59
  "wagmi": "2.11.2",