jazz-tools 0.10.6 → 0.10.7

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.
@@ -26,6 +26,7 @@ import {
26
26
  setupJazzTestSync,
27
27
  } from "../testing";
28
28
 
29
+ // @ts-ignore Typescript in VSCode doesn't like top level await
29
30
  const Crypto = await WasmCrypto.create();
30
31
 
31
32
  class TestJazzContextManager<Acc extends Account> extends JazzContextManager<
@@ -53,16 +54,20 @@ class TestJazzContextManager<Acc extends Account> extends JazzContextManager<
53
54
  AccountSchema: props.AccountSchema,
54
55
  });
55
56
 
56
- this.updateContext(props, {
57
- me: context.account,
58
- node: context.node,
59
- done: () => {
60
- context.done();
57
+ await this.updateContext(
58
+ props,
59
+ {
60
+ me: context.account,
61
+ node: context.node,
62
+ done: () => {
63
+ context.done();
64
+ },
65
+ logOut: async () => {
66
+ await context.logOut();
67
+ },
61
68
  },
62
- logOut: async () => {
63
- await context.logOut();
64
- },
65
- });
69
+ authProps,
70
+ );
66
71
  }
67
72
  }
68
73
 
package/src/types.ts CHANGED
@@ -24,6 +24,7 @@ export type JazzAuthContext<Acc extends Account> = {
24
24
  authenticate: AuthenticateAccountFunction;
25
25
  logOut: () => Promise<void>;
26
26
  done: () => void;
27
+ isAuthenticated?: boolean;
27
28
  };
28
29
 
29
30
  export type JazzGuestContext = {
@@ -32,6 +33,7 @@ export type JazzGuestContext = {
32
33
  authenticate: AuthenticateAccountFunction;
33
34
  logOut: () => void;
34
35
  done: () => void;
36
+ isAuthenticated?: boolean;
35
37
  };
36
38
 
37
39
  export type JazzContextType<Acc extends Account> =