@megaeth-labs/wallet-sdk-react 0.1.8 → 0.1.9

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.cjs CHANGED
@@ -57,7 +57,10 @@ var Context = (0, import_react.createContext)({});
57
57
  var startedInitialisation = false;
58
58
  var MegaProvider = ({ config, children }) => {
59
59
  const [initialised, setInitialised] = (0, import_react.useState)(false);
60
- const [status, setStatus] = (0, import_react.useState)({ status: "disconnected" });
60
+ const [status, setStatus] = (0, import_react.useState)({
61
+ status: "disconnected",
62
+ network: config.network
63
+ });
61
64
  const value = (0, import_react.useMemo)(
62
65
  () => ({
63
66
  config,
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { UseMutationOptions, UndefinedInitialDataOptions } from '@tanstack/react-query';
1
3
  import * as _megaeth_labs_wallet_sdk from '@megaeth-labs/wallet-sdk';
2
4
  import { Config, mega, ConnectionStatus } from '@megaeth-labs/wallet-sdk';
3
5
  export { mega } from '@megaeth-labs/wallet-sdk';
4
- import * as _tanstack_react_query from '@tanstack/react-query';
5
- import { UseMutationOptions, UndefinedInitialDataOptions } from '@tanstack/react-query';
6
6
  import React, { PropsWithChildren } from 'react';
7
7
 
8
8
  interface MegaProviderProps extends PropsWithChildren {
@@ -13,6 +13,7 @@ declare const useStatus: () => {
13
13
  initialised: boolean;
14
14
  status: "connected" | "disconnected" | "cancelled";
15
15
  address?: `0x${string}`;
16
+ network: _megaeth_labs_wallet_sdk.Network;
16
17
  };
17
18
  declare const useConnect: (options?: Omit<UseMutationOptions<Awaited<ReturnType<typeof mega.connect>>, Error, void, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<ConnectionStatus, Error, void, unknown>;
18
19
  declare const useDisconnect: (options?: Omit<UseMutationOptions<Awaited<ReturnType<typeof mega.disconnect>>, Error, void, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<ConnectionStatus, Error, void, unknown>;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { UseMutationOptions, UndefinedInitialDataOptions } from '@tanstack/react-query';
1
3
  import * as _megaeth_labs_wallet_sdk from '@megaeth-labs/wallet-sdk';
2
4
  import { Config, mega, ConnectionStatus } from '@megaeth-labs/wallet-sdk';
3
5
  export { mega } from '@megaeth-labs/wallet-sdk';
4
- import * as _tanstack_react_query from '@tanstack/react-query';
5
- import { UseMutationOptions, UndefinedInitialDataOptions } from '@tanstack/react-query';
6
6
  import React, { PropsWithChildren } from 'react';
7
7
 
8
8
  interface MegaProviderProps extends PropsWithChildren {
@@ -13,6 +13,7 @@ declare const useStatus: () => {
13
13
  initialised: boolean;
14
14
  status: "connected" | "disconnected" | "cancelled";
15
15
  address?: `0x${string}`;
16
+ network: _megaeth_labs_wallet_sdk.Network;
16
17
  };
17
18
  declare const useConnect: (options?: Omit<UseMutationOptions<Awaited<ReturnType<typeof mega.connect>>, Error, void, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<ConnectionStatus, Error, void, unknown>;
18
19
  declare const useDisconnect: (options?: Omit<UseMutationOptions<Awaited<ReturnType<typeof mega.disconnect>>, Error, void, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<ConnectionStatus, Error, void, unknown>;
package/dist/index.js CHANGED
@@ -19,7 +19,10 @@ var Context = createContext({});
19
19
  var startedInitialisation = false;
20
20
  var MegaProvider = ({ config, children }) => {
21
21
  const [initialised, setInitialised] = useState(false);
22
- const [status, setStatus] = useState({ status: "disconnected" });
22
+ const [status, setStatus] = useState({
23
+ status: "disconnected",
24
+ network: config.network
25
+ });
23
26
  const value = useMemo(
24
27
  () => ({
25
28
  config,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megaeth-labs/wallet-sdk-react",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "MegaETH Wallet SDK React Wrapper for web applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,7 +30,7 @@
30
30
  "access": "restricted"
31
31
  },
32
32
  "dependencies": {
33
- "@megaeth-labs/wallet-sdk": "0.1.9"
33
+ "@megaeth-labs/wallet-sdk": "0.1.11"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@tanstack/react-query": "^5",