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

Type 'Secp256k1KeyIdentity' is not assignable to type 'Identity #849

Open
letmejustputthishere opened this issue Feb 15, 2024 · 1 comment

Comments

@letmejustputthishere
Copy link
Member

Describe the bug
When creating an HttpAgent passing a Secp256k1KeyIdentity as the identity, ts complains with the following error

Type 'Secp256k1KeyIdentity' is not assignable to type 'Identity | Promise<Identity> | undefined'.
    Type 'Secp256k1KeyIdentity' is not assignable to type 'Identity'.
      The types returned by 'getPrincipal()' are incompatible between these types.

To Reproduce
Steps to reproduce the behavior:

Use @dfinity/agent@0.21.4 and @dfinity/identity-secp256k1@1.0.0 and try to create an HttpAgent with a secp identity.

Expected behavior
The types should be compatible

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@let4be
Copy link

let4be commented May 13, 2024

Yea, I noticed the same issue yesterday. Currenly had to use 'any' type...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants