verida-js
verida-js copied to clipboard
loadFromSession does not set account on returned Context object
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