Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types mismatch for credentials property on Agent #1187

Closed
baristikir opened this issue Jan 2, 2023 · 2 comments · Fixed by #1188
Closed

Types mismatch for credentials property on Agent #1187

baristikir opened this issue Jan 2, 2023 · 2 comments · Fixed by #1188

Comments

@baristikir
Copy link

Overview

After upgrading to "@aries-framework/core": "^0.3.1" the types on Agents credentials are resulting into any.
Looking at the migration docs from 0.2.X to 0.3.X I couldn't find any changes regarding to credentials.

Reproduce

const agent = new Agent({ config, dependencies: agentDependencies })
await agent.credentials // typed as `any`
@TimoGlastra
Copy link
Contributor

That's definitely a bug, thanks for reporting @baristikir!

I could reproduce it locally. One workaround you can use for now is adding an empty modules key to the agent constructor, that seemed to resolve the issue. I'll dig into it more, but for now that should do the trick:

const agent = new Agent({
  dependencies: agentDependencies,
  config: {
    label: 'hello'
  },
  modules: {}
})

agent.credentials // correctly typed with {} for modules

@TimoGlastra
Copy link
Contributor

I've created #1188 to fix the issue. We'll try to get this into a 0.3.2 release ASAP

TimoGlastra added a commit that referenced this issue Jan 4, 2023
Fixes #1187

Signed-off-by: Timo Glastra <timo@animo.id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants