verida-js icon indicating copy to clipboard operation
verida-js copied to clipboard

loadFromSession does not set account on returned Context object

Open nick-verida opened this issue 3 years ago • 0 comments

I have code that does something similar to this:

const did = veridaContext.account.accountDid

This is fine if logging in normally, but if I reconstruct the context like this it fails because account is undefined:

      if (hasSession(this.CONTEXT_NAME)) {
        // we know we have a session already
  
        veridaContext = await account.loadFromSession(this.CONTEXT_NAME);
      }

Worth noting that veridaContext.getClient() also fails.

See code for loadFromSession

nick-verida avatar May 17 '22 10:05 nick-verida