LasticXYZ / LasticUI

A UI for the Coretime Parachain
https://lastic-ui.vercel.app
GNU Affero General Public License v3.0
14 stars 17 forks source link

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

Closed ltfschoen closed 5 months ago

ltfschoen commented 6 months ago

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):

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 commented 6 months ago

Oh, i just realised that i'd created this same issue before here https://github.com/LasticXYZ/LasticUI/issues/69

Is this an appropriate temporary solution?

poppyseedDev commented 6 months ago

@vikiival

poppyseedDev commented 6 months ago

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

ltfschoen commented 6 months ago

@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.

ltfschoen commented 6 months ago

Related issues:

Example solutions:

poppyseedDev commented 6 months ago

@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 commented 6 months ago

@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 commented 6 months ago

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 commented 6 months ago

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