@ludo.ninja/components 2.2.2 → 2.2.4

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.
@@ -17,10 +17,10 @@ const useAddWalletElrond = () => {
17
17
  text: '',
18
18
  });
19
19
  },
20
- onError: (err) => {
20
+ onError: ({ graphQLErrors, message }) => {
21
21
  openAlert({
22
22
  ...data_1.alertError,
23
- caption: err.message,
23
+ caption: graphQLErrors.length ? graphQLErrors[0].message : message,
24
24
  text: '',
25
25
  });
26
26
  },
@@ -17,10 +17,10 @@ const useAddWalletFlow = () => {
17
17
  text: '',
18
18
  });
19
19
  },
20
- onError: (err) => {
20
+ onError: ({ graphQLErrors, message }) => {
21
21
  openAlert({
22
22
  ...data_1.alertError,
23
- caption: err.message,
23
+ caption: graphQLErrors.length ? graphQLErrors[0].message : message,
24
24
  text: '',
25
25
  });
26
26
  },
@@ -17,10 +17,10 @@ const useAddWalletMetamask = () => {
17
17
  text: '',
18
18
  });
19
19
  },
20
- onError: (err) => {
20
+ onError: ({ graphQLErrors, message }) => {
21
21
  openAlert({
22
22
  ...data_1.alertError,
23
- caption: err.message,
23
+ caption: graphQLErrors.length ? graphQLErrors[0].message : message,
24
24
  text: '',
25
25
  });
26
26
  },
@@ -17,10 +17,10 @@ const useAddWalletSolana = () => {
17
17
  text: '',
18
18
  });
19
19
  },
20
- onError: (err) => {
20
+ onError: ({ graphQLErrors, message }) => {
21
21
  openAlert({
22
22
  ...data_1.alertError,
23
- caption: err.message,
23
+ caption: graphQLErrors.length ? graphQLErrors[0].message : message,
24
24
  text: '',
25
25
  });
26
26
  },
@@ -17,10 +17,10 @@ const useAddWalletTezos = () => {
17
17
  text: '',
18
18
  });
19
19
  },
20
- onError: (err) => {
20
+ onError: ({ graphQLErrors, message }) => {
21
21
  openAlert({
22
22
  ...data_1.alertError,
23
- caption: err.message,
23
+ caption: graphQLErrors.length ? graphQLErrors[0].message : message,
24
24
  text: '',
25
25
  });
26
26
  },
@@ -17,10 +17,10 @@ const useAddWalletTon = () => {
17
17
  text: '',
18
18
  });
19
19
  },
20
- onError: (err) => {
20
+ onError: ({ graphQLErrors, message }) => {
21
21
  openAlert({
22
22
  ...data_1.alertError,
23
- caption: err.message,
23
+ caption: graphQLErrors.length ? graphQLErrors[0].message : message,
24
24
  text: '',
25
25
  });
26
26
  },
@@ -1,7 +1,7 @@
1
1
  import { identitySchema as schema } from "@ludo.ninja/api";
2
2
  declare const useFetchUserWallets: ({ userId }: schema.IQueryFetchUserWalletsArgs) => {
3
3
  refetch: (variables?: Partial<schema.Exact<{
4
- userId: schema.Scalars["ID"];
4
+ userId: string;
5
5
  }>> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<schema.IFetchUserWalletsQuery>>;
6
6
  loading: boolean;
7
7
  error: import("@apollo/client").ApolloError | undefined;
@@ -4,7 +4,7 @@ declare const useFetchUserpic: () => {
4
4
  loading: boolean;
5
5
  error: import("@apollo/client").ApolloError | undefined;
6
6
  refetch: (variables?: Partial<schema.Exact<{
7
- userId: schema.Scalars["ID"];
7
+ userId: string;
8
8
  }>> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<schema.IFetchUserpicQuery>>;
9
9
  load: (userId: string) => void;
10
10
  userPic: string | null;
@@ -12,8 +12,8 @@ export declare const useFetchFindAllTopEntitiesByName: () => {
12
12
  loading: boolean;
13
13
  error: import("@apollo/client").ApolloError | undefined;
14
14
  load: ({ name, pageSize }: searchSchema.IQueryFindAllTopEntitiesByNameArgs) => Promise<import("@apollo/client").QueryResult<searchSchema.IFindAllTopEntitiesByNameQuery, searchSchema.Exact<{
15
- name: searchSchema.Scalars["String"];
16
- pageSize: searchSchema.Scalars["Int"];
15
+ name: string;
16
+ pageSize: number;
17
17
  }>>>;
18
18
  topEntities: {
19
19
  assets: AssetEntity[];
@@ -28,8 +28,8 @@ declare const _default: {
28
28
  loading: boolean;
29
29
  error: import("@apollo/client").ApolloError | undefined;
30
30
  load: ({ name, pageSize }: searchSchema.IQueryFindAllTopEntitiesByNameArgs) => Promise<import("@apollo/client").QueryResult<searchSchema.IFindAllTopEntitiesByNameQuery, searchSchema.Exact<{
31
- name: searchSchema.Scalars["String"];
32
- pageSize: searchSchema.Scalars["Int"];
31
+ name: string;
32
+ pageSize: number;
33
33
  }>>>;
34
34
  topEntities: {
35
35
  assets: AssetEntity[];
@@ -8,10 +8,10 @@ const store_1 = require("../store");
8
8
  const useRevokeToken_1 = __importDefault(require("../../../api/server-identities/mutations/useRevokeToken"));
9
9
  const env_1 = require("../../../store/env");
10
10
  const api_1 = require("@ludo.ninja/api");
11
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
11
12
  const nookies_1 = require("nookies");
12
- // import { ludoDomains, TEnvValue } from "@ludo.ninja/core/build/ludoDomains";
13
13
  const useSignOut = () => {
14
- const { /*NEXT_PUBLIC_ENV_VALUE,*/ NEXT_PUBLIC_ENV_DOMAIN } = (0, env_1.useEnvStore)((state) => ({
14
+ const { NEXT_PUBLIC_ENV_VALUE, NEXT_PUBLIC_ENV_DOMAIN } = (0, env_1.useEnvStore)((state) => ({
15
15
  NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
16
16
  NEXT_PUBLIC_ENV_DOMAIN: state.NEXT_PUBLIC_ENV_DOMAIN,
17
17
  }));
@@ -33,6 +33,9 @@ const useSignOut = () => {
33
33
  setUser(null);
34
34
  // when invite code is not required = no redirect
35
35
  // window.location.replace(ludoDomains[NEXT_PUBLIC_ENV_VALUE as TEnvValue]["welcome"]);
36
+ if (window.location.origin === ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["account"]) {
37
+ window.location.replace(ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["welcome"]);
38
+ }
36
39
  }
37
40
  };
38
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",