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

Account key pair type: undefined #243

Open
F-OBrien opened this issue Mar 1, 2022 · 0 comments
Open

Account key pair type: undefined #243

F-OBrien opened this issue Mar 1, 2022 · 0 comments

Comments

@F-OBrien
Copy link
Collaborator

F-OBrien commented Mar 1, 2022

Account information returned by web3Accounts returns a type: undefined for the keyPair type. Also when using web3Enable can calling polyWallet.accounts.get() on the returned Polymesh wallet there is no object entry for type.

As a result calling `await web3Accounts({ accountType: ['ed25519'], ss58Format: 12 }) (or other types) will still return all accounts.

The type object is missing or undefined even when importing a JSON generated using the Polkadot extension or https://mainnet-app.polymesh.network/#/accounts page that includes the correct type.
image
image

The type information appears to get stored somewhere as exporting accounts generated in the Polymesh wallet extension to JSON and importing to the Pokkadot extension returns the correct KeyPair type. Also importing an JSON from https://mainnet-app.polymesh.network/#/accounts and then exporting again and importing to the Polkadot extension returns the correct type. I have confirmed this by importing and exporting both sd25519 and ed25519.

(side note: it should possibly be noted somewhere that the wallet creates sr25519 keys and the restore from seed option also only creates sr25519 accounts even is using a seed phrase or hex seed previously used to create a ed25519 pair. Other account pair types are only possible through JSON import.)

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

1 participant