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

Incompatible Signer type between @polkadot/types and /@polkadot/extension-inject #1482

Closed
Tbaut opened this issue Nov 29, 2024 · 5 comments
Closed
Assignees
Labels
Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability. P1 - High Essential for progress, blocks other tasks. Must be completed soon to maintain project flow.

Comments

@Tbaut
Copy link
Contributor

Tbaut commented Nov 29, 2024

Hello there, I'm getting the following issue:
It sounds like the @polkadot/types that is used in @polkadot/extension-inject is not compatible with the latest version of @polkadot/types. E.g, when doing a .signAndSend(account.address, { signer: injector.signer } I get the following error on the signer:

Type 'import("/ChainSafe/cypress-polkadot-wallet/node_modules/@polkadot/extension-inject/node_modules/@polkadot/types/types/extrinsic").Signer' is not assignable to type 'import("/ChainSafe/cypress-polkadot-wallet/node_modules/@polkadot/types/types/extrinsic").Signer'.
  Types of property 'update' are incompatible.
    Type '((id: number, status: H256 | ISubmittableResult) => void) | undefined' is not assignable to type '((id: number, status: ISubmittableResult | H256) => void) | undefined'.
      Type '(id: number, status: H256 | ISubmittableResult) => void' is not assignable to type '(id: number, status: ISubmittableResult | H256) => void'.
        Types of parameters 'status' and 'status' are incompatible.
          Type 'ISubmittableResult | H256' is not assignable to type 'H256 | ISubmittableResult'.
            Type 'ISubmittableResult' is not assignable to type 'H256 | ISubmittableResult'.
              Type 'import("/ChainSafe/cypress-polkadot-wallet/node_modules/@polkadot/types/types/extrinsic").ISubmittableResult' is not assignable to type 'import("/ChainSafe/cypress-polkadot-wallet/node_modules/@polkadot/extension-inject/node_modules/@polkadot/types/types/extrinsic").ISubmittableResult'.
                Types of property 'dispatchError' are incompatible.
                  Type 'import("/ChainSafe/cypress-polkadot-wallet/node_modules/@polkadot/types/interfaces/system/types").DispatchError | undefined' is not assignable to type 'import("/ChainSafe/cypress-polkadot-wallet/node_modules/@polkadot/extension-inject/node_modules/@polkadot/types/interfaces/system/types").DispatchError | undefined'.
                    Property '#private' is missing in type 'import("/ChainSafe/cypress-polkadot-wallet/node_modules/@polkadot/types/interfaces/system/types").DispatchError' but required in type 'import("/ChainSafe/cypress-polkadot-wallet/node_modules/@polkadot/extension-inject/node_modules/@polkadot/types/interfaces/system/types").DispatchError'.ts(2322)
Enum.d.ts(21, 5): '#private' is declared here.
submittable.d.ts(11, 5): The expected type comes from property 'signer' which is declared here on type 'Partial<SignerOptions>'

The code is here, it's super simple, and it only happens in this branch where I bumped all deps to the latest: https://github.com/ChainSafe/cypress-polkadot-wallet/blob/tbaut-bump-11-29/packages/example/src/main.ts#L92

@TarikGul
Copy link
Member

TarikGul commented Dec 2, 2024

Yea, I need to bump all the polkadot deps this week. This should be done by tomorrow and resolve the following issue.

@Tbaut
Copy link
Contributor Author

Tbaut commented Dec 2, 2024

Thanks a lot, that's what I thought.

@TarikGul TarikGul added Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability. P1 - High Essential for progress, blocks other tasks. Must be completed soon to maintain project flow. labels Dec 3, 2024
@TarikGul TarikGul self-assigned this Dec 3, 2024
@TarikGul
Copy link
Member

TarikGul commented Dec 4, 2024

Let me know if that latest release solves this issue for you :)?

@Tbaut
Copy link
Contributor Author

Tbaut commented Dec 4, 2024

Yup yup, it's all green now. Thank you 🙏

@Tbaut Tbaut closed this as completed Dec 4, 2024
@polkadot-js-bot
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability. P1 - High Essential for progress, blocks other tasks. Must be completed soon to maintain project flow.
Development

No branches or pull requests

3 participants