@reef-knot/core-react 7.0.1 → 7.1.0-alpha.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.
@@ -1 +1 @@
1
- {"version":3,"file":"localStorage.d.ts","sourceRoot":"","sources":["../../src/constants/localStorage.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AAMnE,eAAO,MAAM,0BAA0B,kCAAkC,CAAC"}
1
+ {"version":3,"file":"localStorage.d.ts","sourceRoot":"","sources":["../../src/constants/localStorage.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AASnE,eAAO,MAAM,0BAA0B,kCAAkC,CAAC"}
@@ -1,9 +1,14 @@
1
1
  import React, { ReactNode } from 'react';
2
+ import type { EIP6963ProviderDetail } from '../eip6963';
2
3
  type RequirementsData = {
3
4
  icon?: ReactNode;
4
5
  title?: string;
5
6
  text?: ReactNode;
6
7
  };
8
+ type EIP6963ModalData = {
9
+ providers: readonly EIP6963ProviderDetail[];
10
+ onSelect: (provider: EIP6963ProviderDetail) => void | Promise<void>;
11
+ };
7
12
  type ModalTypes = {
8
13
  type: 'wallet' | 'ledger';
9
14
  props?: undefined;
@@ -16,6 +21,9 @@ type ModalTypes = {
16
21
  } | {
17
22
  type: 'requirements';
18
23
  props: RequirementsData;
24
+ } | {
25
+ type: 'eip6963';
26
+ props: EIP6963ModalData;
19
27
  };
20
28
  type ModalResult = {
21
29
  success: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"reefKnotModalContext.d.ts","sourceRoot":"","sources":["../../src/context/reefKnotModalContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AAM3E,KAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,C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AAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC,GAAG,UAAU,CAAC;AAEf,KAAK,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AAE7D,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IACvE,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,YAAY,EAAE,eAAe,GAAG,SAAS,CAAC;IAC1C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C,CAAC;AAIF,eAAO,MAAM,oBAAoB,iDACsB,CAAC;AAGxD,eAAO,MAAM,4BAA4B,kBAEtC,KAAK,CAAC,iBAAiB,4CAkEzB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { useLocalStorage } from "../helpers/useLocalStorage.js";
2
2
  import { LS_KEY_TERMS_ACCEPTANCE } from "../constants/localStorage.js";
3
- import { createContext, useMemo, useState } from "react";
3
+ import { createContext, useMemo, useRef, useState } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/context/reefKnotModalContext.tsx
@@ -10,37 +10,40 @@ ReefKnotModalContext.displayName = "ReefKnotModalContext";
10
10
  const ReefKnotModalContextProvider = ({ children }) => {
11
11
  const [termsChecked, setTermsChecked] = useLocalStorage(LS_KEY_TERMS_ACCEPTANCE, false);
12
12
  const [modalStack, updateModalStack] = useState([]);
13
+ const modalStackRef = useRef([]);
13
14
  const stableCallbacks = useMemo(() => ({
14
15
  openModal: ({ onClose = NOOP, ...props }) => {
15
- updateModalStack((old) => [...old, {
16
+ const next = [...modalStackRef.current, {
16
17
  ...props,
17
18
  onClose
18
- }]);
19
+ }];
20
+ modalStackRef.current = next;
21
+ updateModalStack(next);
19
22
  },
20
23
  openModalAsync: async ({ type, props }) => {
21
24
  return new Promise((resolve) => {
22
- updateModalStack((old) => [...old, {
25
+ const next = [...modalStackRef.current, {
23
26
  type,
24
27
  props,
25
28
  onClose: resolve
26
- }]);
29
+ }];
30
+ modalStackRef.current = next;
31
+ updateModalStack(next);
27
32
  });
28
33
  },
29
34
  closeModal: (result) => {
30
- updateModalStack((old) => {
31
- old.pop()?.onClose(result);
32
- return [...old];
33
- });
35
+ const old = modalStackRef.current;
36
+ const modal = old[old.length - 1];
37
+ const next = old.slice(0, -1);
38
+ modalStackRef.current = next;
39
+ updateModalStack(next);
40
+ modal?.onClose(result);
34
41
  },
35
42
  forceCloseAllModals: () => {
36
- updateModalStack((old) => {
37
- let modal = old.pop();
38
- while (modal) {
39
- modal?.onClose({ success: false });
40
- modal = old.pop();
41
- }
42
- return [];
43
- });
43
+ const old = modalStackRef.current;
44
+ modalStackRef.current = [];
45
+ for (let i = old.length - 1; i >= 0; i -= 1) old[i]?.onClose({ success: false });
46
+ updateModalStack([]);
44
47
  }
45
48
  }), []);
46
49
  const contextValue = useMemo(() => ({
package/dist/eip6963.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ import type { EIP6963ProviderDetail } from 'mipd';
1
2
  export declare const providersStore: import("mipd").Store;
3
+ export type { EIP6963ProviderDetail };
2
4
  //# sourceMappingURL=eip6963.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eip6963.d.ts","sourceRoot":"","sources":["../src/eip6963.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,sBAAgB,CAAC"}
1
+ {"version":3,"file":"eip6963.d.ts","sourceRoot":"","sources":["../src/eip6963.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,MAAM,CAAC;AAElD,eAAO,MAAM,cAAc,sBAAgB,CAAC;AAC5C,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Connector } from 'wagmi';
2
+ import type { WalletAdapterData } from '@reef-knot/types';
3
+ type GetConnectedProviderNameArgs = {
4
+ connector?: Connector | null;
5
+ walletDataList: WalletAdapterData[];
6
+ };
7
+ export declare const getConnectedProviderName: ({ connector, walletDataList, }: GetConnectedProviderNameArgs) => string | undefined;
8
+ export {};
9
+ //# sourceMappingURL=getConnectedProviderName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConnectedProviderName.d.ts","sourceRoot":"","sources":["../../src/helpers/getConnectedProviderName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,KAAK,4BAA4B,GAAG;IAClC,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,wBAAwB,mCAGlC,4BAA4B,KAAG,MAAM,GAAG,SAe1C,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { providersStore } from "../eip6963.js";
2
+
3
+ //#region src/helpers/getConnectedProviderName.ts
4
+ const getConnectedProviderName = ({ connector, walletDataList }) => {
5
+ if (!connector) return void 0;
6
+ return (providersStore.getProviders().find((p) => p.info.rdns === connector.id) ?? providersStore.getProviders().find((p) => p.info.rdns === walletDataList.find((wallet) => wallet.walletId === connector.id)?.rdns))?.info.name ?? connector.name;
7
+ };
8
+
9
+ //#endregion
10
+ export { getConnectedProviderName };
@@ -6,4 +6,5 @@ export * from './useDisconnect';
6
6
  export * from './useConnectorInfo';
7
7
  export * from './useConnect';
8
8
  export * from './useReefKnotModal';
9
+ export * from './useEIP6963Providers';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
@@ -6,3 +6,4 @@ import { useAutoConnectCheck } from "./useAutoConnectCheck.js";
6
6
  import { useDisconnect, useForceDisconnect } from "./useDisconnect.js";
7
7
  import { useConnectorInfo } from "./useConnectorInfo.js";
8
8
  import { useConnect } from "./useConnect.js";
9
+ import { useEIP6963Providers } from "./useEIP6963Providers.js";
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoConnect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutoConnect.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,cAAc,uBAAwB,OAAO,SAwDzD,CAAC"}
1
+ {"version":3,"file":"useAutoConnect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutoConnect.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,uBAAwB,OAAO,SAoEzD,CAAC"}
@@ -3,8 +3,10 @@ import { LS_KEY_RECONNECT_WALLET_ID } from "../constants/localStorage.js";
3
3
  import { checkTermsAccepted } from "../helpers/checkTermsAccepted.js";
4
4
  import { useEagerConnect } from "./useEagerConnect.js";
5
5
  import { withCallback } from "../helpers/withCallback.js";
6
+ import { providersStore } from "../eip6963.js";
6
7
  import { useEffect } from "react";
7
8
  import { useConfig, useConnection, useReconnect } from "wagmi";
9
+ import { injected } from "wagmi/connectors";
8
10
 
9
11
  //#region src/hooks/useAutoConnect.ts
10
12
  const useAutoConnect = (autoConnectEnabled) => {
@@ -19,11 +21,19 @@ const useAutoConnect = (autoConnectEnabled) => {
19
21
  if (!await eagerConnect() && checkTermsAccepted() && await storage?.getItem("recentConnectorId")) {
20
22
  const savedReconnectWalletId = await storage?.getItem(LS_KEY_RECONNECT_WALLET_ID);
21
23
  const walletData = walletDataList.find((data) => data.walletId === savedReconnectWalletId);
24
+ await new Promise((resolve) => setTimeout(resolve, 100));
25
+ const reconnectWithCallback = withCallback(reconnectAsync, onReconnect);
22
26
  if (walletData) {
23
27
  let createConnectorFn = walletData.createConnectorFn;
24
28
  if (walletData?.walletconnectExtras?.connectionViaURI?.condition) createConnectorFn = walletData.walletconnectExtras.connectionViaURI.createConnectorFn;
25
- await new Promise((resolve) => setTimeout(resolve, 100));
26
- await withCallback(reconnectAsync, onReconnect)({ connectors: [createConnectorFn] });
29
+ await reconnectWithCallback({ connectors: [createConnectorFn] });
30
+ } else {
31
+ const eip6963Provider = providersStore.getProviders().find((p) => p.info.rdns === savedReconnectWalletId);
32
+ if (eip6963Provider) await reconnectWithCallback({ connectors: [injected({ target: {
33
+ id: eip6963Provider.info.rdns,
34
+ name: eip6963Provider.info.name,
35
+ provider: () => eip6963Provider.provider
36
+ } })] });
27
37
  }
28
38
  }
29
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useConnectorInfo.d.ts","sourceRoot":"","sources":["../../src/hooks/useConnectorInfo.ts"],"names":[],"mappings":"AAOA,KAAK,aAAa,GAAG;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,aAyBnC,CAAC"}
1
+ {"version":3,"file":"useConnectorInfo.d.ts","sourceRoot":"","sources":["../../src/hooks/useConnectorInfo.ts"],"names":[],"mappings":"AASA,KAAK,aAAa,GAAG;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,aA4BnC,CAAC"}
@@ -1,17 +1,23 @@
1
+ import { useReefKnotContext } from "./useReefKnotContext.js";
1
2
  import { hasInjected, isDappBrowserProvider } from "../helpers/providerDetectors.js";
3
+ import { getConnectedProviderName } from "../helpers/getConnectedProviderName.js";
2
4
  import { useConnection } from "wagmi";
3
5
  import { idLedgerHid, idLedgerLive } from "@reef-knot/ledger-connector";
4
6
 
5
7
  //#region src/hooks/useConnectorInfo.ts
6
8
  const useConnectorInfo = () => {
7
9
  const { connector } = useConnection();
10
+ const { walletDataList } = useReefKnotContext();
8
11
  const isLedger = Boolean(connector?.id === idLedgerHid);
9
12
  const isLedgerLive = Boolean(connector?.id === idLedgerLive);
10
13
  const isGnosis = Boolean(connector?.id === "safe");
11
14
  const isInjected = hasInjected();
12
15
  const isDappBrowser = isDappBrowserProvider();
13
16
  return {
14
- connectorName: isDappBrowser ? void 0 : connector?.name,
17
+ connectorName: isDappBrowser ? void 0 : getConnectedProviderName({
18
+ connector,
19
+ walletDataList
20
+ }),
15
21
  isGnosis,
16
22
  isLedger,
17
23
  isLedgerLive,
@@ -0,0 +1,3 @@
1
+ import type { EIP6963ProviderDetail } from 'mipd';
2
+ export declare const useEIP6963Providers: () => readonly EIP6963ProviderDetail[];
3
+ //# sourceMappingURL=useEIP6963Providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEIP6963Providers.d.ts","sourceRoot":"","sources":["../../src/hooks/useEIP6963Providers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,MAAM,CAAC;AAGlD,eAAO,MAAM,mBAAmB,QAAO,SAAS,qBAAqB,EAcpE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { providersStore } from "../eip6963.js";
2
+ import { useEffect, useState } from "react";
3
+
4
+ //#region src/hooks/useEIP6963Providers.ts
5
+ const useEIP6963Providers = () => {
6
+ const [providers, setProviders] = useState(() => providersStore.getProviders());
7
+ useEffect(() => {
8
+ return providersStore.subscribe((providerDetails) => setProviders(providerDetails), { emitImmediately: true });
9
+ }, []);
10
+ return providers;
11
+ };
12
+
13
+ //#endregion
14
+ export { useEIP6963Providers };
package/dist/index.d.ts CHANGED
@@ -5,4 +5,6 @@ export * from './context/reefKnotContext';
5
5
  export * from './context/reefKnotProvider';
6
6
  export { ReefKnotModalContextProvider } from './context/reefKnotModalContext';
7
7
  export type { ReefKnotModalContextValue } from './context/reefKnotModalContext';
8
+ export { providersStore } from './eip6963';
9
+ export type { EIP6963ProviderDetail } from './eip6963';
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,YAAY,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,YAAY,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -6,12 +6,14 @@ import { ReefKnotModalContextProvider } from "./context/reefKnotModalContext.js"
6
6
  import { useReefKnotModal } from "./hooks/useReefKnotModal.js";
7
7
  import { checkTermsAccepted } from "./helpers/checkTermsAccepted.js";
8
8
  import { connectEagerly, useEagerConnect } from "./hooks/useEagerConnect.js";
9
+ import { providersStore } from "./eip6963.js";
9
10
  import { useAutoConnect } from "./hooks/useAutoConnect.js";
10
11
  import { useAutoConnectCheck } from "./hooks/useAutoConnectCheck.js";
11
12
  import { useDisconnect, useForceDisconnect } from "./hooks/useDisconnect.js";
12
13
  import { hasInjected, isDappBrowserProvider } from "./helpers/providerDetectors.js";
13
14
  import { useConnectorInfo } from "./hooks/useConnectorInfo.js";
14
15
  import { useConnect } from "./hooks/useConnect.js";
16
+ import { useEIP6963Providers } from "./hooks/useEIP6963Providers.js";
15
17
  import "./hooks/index.js";
16
18
  import { getUnsupportedChainError } from "./helpers/getUnsupportedChainError.js";
17
19
  import { getWalletsDataList } from "./helpers/getWalletsDataList.js";
@@ -19,4 +21,4 @@ import { getDefaultConfig } from "./helpers/getDefaultConfig.js";
19
21
  import "./helpers/index.js";
20
22
  import { ReefKnotProvider } from "./context/reefKnotProvider.js";
21
23
 
22
- export { LS_KEY_RECONNECT_WALLET_ID, LS_KEY_TERMS_ACCEPTANCE, ReefKnotContext, ReefKnotModalContextProvider, ReefKnotProvider, checkTermsAccepted, connectEagerly, getDefaultConfig, getUnsupportedChainError, getWalletsDataList, hasInjected, isDappBrowserProvider, useAutoConnect, useAutoConnectCheck, useConnect, useConnectorInfo, useDisconnect, useEagerConnect, useForceDisconnect, useLocalStorage, useReefKnotContext, useReefKnotModal };
24
+ export { LS_KEY_RECONNECT_WALLET_ID, LS_KEY_TERMS_ACCEPTANCE, ReefKnotContext, ReefKnotModalContextProvider, ReefKnotProvider, checkTermsAccepted, connectEagerly, getDefaultConfig, getUnsupportedChainError, getWalletsDataList, hasInjected, isDappBrowserProvider, providersStore, useAutoConnect, useAutoConnectCheck, useConnect, useConnectorInfo, useDisconnect, useEIP6963Providers, useEagerConnect, useForceDisconnect, useLocalStorage, useReefKnotContext, useReefKnotModal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reef-knot/core-react",
3
- "version": "7.0.1",
3
+ "version": "7.1.0-alpha.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -39,10 +39,10 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@reef-knot/ledger-connector": "5.0.0",
42
- "@reef-knot/types": "5.0.0",
43
- "@reef-knot/ui-react": "3.0.0",
42
+ "@reef-knot/types": "5.1.0-alpha.1",
43
+ "@reef-knot/ui-react": "3.1.0-alpha.1",
44
44
  "@reef-knot/wallets-helpers": "3.0.0",
45
- "@reef-knot/wallets-list": "5.1.0",
45
+ "@reef-knot/wallets-list": "5.1.1-alpha.1",
46
46
  "build-config": "*",
47
47
  "eslint-config-custom": "*",
48
48
  "mipd": "0.0.7",
@@ -52,10 +52,10 @@
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@reef-knot/ledger-connector": "5.0.0",
55
- "@reef-knot/types": "5.0.0",
56
- "@reef-knot/ui-react": "3.0.0",
55
+ "@reef-knot/types": "5.1.0-alpha.1",
56
+ "@reef-knot/ui-react": "3.1.0-alpha.1",
57
57
  "@reef-knot/wallets-helpers": "3.0.0",
58
- "@reef-knot/wallets-list": "5.1.0",
58
+ "@reef-knot/wallets-list": "5.1.1-alpha.1",
59
59
  "@tanstack/react-query": "^5.29.0",
60
60
  "react": ">=18",
61
61
  "viem": ">=2.44",