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

[BUG] Error: Expected a valid key to convert, with length 1, 2, 4, 8, 32, 33 #157

Closed
ltfschoen opened this issue Apr 19, 2024 · 9 comments · Fixed by #158
Closed

[BUG] Error: Expected a valid key to convert, with length 1, 2, 4, 8, 32, 33 #157

ltfschoen opened this issue Apr 19, 2024 · 9 comments · Fixed by #158
Labels
bug Something isn't working

Comments

@ltfschoen
Copy link
Contributor

Describe the bug
If I connect with Polkadot.js Extension and one of the accounts is an EVM account (i.e. 0x____) instead of a Substrate SS58 address then it crashes with browse console error Error: Expected a valid key to convert, with length 1, 2, 4, 8, 32, 33 unless I know to hide that specific address within Polkadot.js Extension

To Reproduce
Steps to reproduce the behavior:

  1. Import an EVM address (e.g. for Moonbeam) into Polkadot.js Extension and don't hide it
  2. Click Connect Wallet
  3. Click Polkadot.js
  4. See error

Expected behavior
It should try/catch and ignore that EVM wallet instead of crashing

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

Uploading Screenshot 2024-04-19 at 6.42.28 pm.png…

Desktop (please complete the following information):

  • OS: [e.g. iOS] macOS 14.1.1
  • Browser [e.g. chrome, safari] Brave
  • Version [e.g. 22] latest version

Note
Once you take on this PR paste a comment with your hand -> ✋ so that people know that someone is working on this issue.

@ltfschoen ltfschoen added the bug Something isn't working label Apr 19, 2024
ltfschoen added a commit to ltfschoen/LasticUI that referenced this issue Apr 19, 2024
@ltfschoen
Copy link
Contributor Author

Oh, i just realised that i'd created this same issue before here #69

Is this an appropriate temporary solution?

@poppyseedDev
Copy link
Contributor

@vikiival

@poppyseedDev
Copy link
Contributor

@ltfschoen could you provide more info on can you import an EVM address (e.g. for Moonbeam) into Polkadot.js Extension?

@ltfschoen
Copy link
Contributor Author

@ltfschoen could you provide more info on can you import an EVM address (e.g. for Moonbeam) into Polkadot.js Extension?

yes, it is possible to import an EVM address that you use across multiple EVM chain accounts, such as Moonbeam, Ethereum, etc.

@poppyseedDev
Copy link
Contributor

poppyseedDev commented Apr 24, 2024

@ltfschoen could you provide more info on can you import an EVM address (e.g. for Moonbeam) into Polkadot.js Extension?

yes, it is possible to import an EVM address that you use across multiple EVM chain accounts, such as Moonbeam, Ethereum, etc.

Hei @ltfschoen could you send a video of how to import this account into polkadot js.

@ltfschoen
Copy link
Contributor Author

@ltfschoen could you provide more info on can you import an EVM address (e.g. for Moonbeam) into Polkadot.js Extension?

yes, it is possible to import an EVM address that you use across multiple EVM chain accounts, such as Moonbeam, Ethereum, etc.

Hei @ltfschoen could you send a video of how to import this account into polkadot js.

it shows how to do it at 2 mins into this video (I'm not the presenter) https://youtu.be/9ohp8k4Hz8c?feature=shared

the videos are published in the wiki https://guide.kusama.network/docs/learn-guides-accounts/

@vikiival
Copy link

So @poppyseedDev I managed to break the app and replicate @ltfschoen's issue

Screenshot 2024-05-15 at 12 16 05

Screenshot 2024-05-15 at 12 16 14

Reproduce:

  1. Install Talisman
  2. Create one polkadot and one evm address
  3. Login to Lastic - select all wallets
  4. disconnect
  5. connect again

and 🎉

@poppyseedDev
Copy link
Contributor

Nice thanks @vikiival! Okay, let's then fix this.

poppyseedDev added a commit that referenced this issue May 21, 2024
fix: Fixes #157 prevent crash if polkadot.js ext includes evm acct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants