Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Regression: Extension's account list shows sr25519 accounts on chains that support only ethereum accounts #11875

@la10736

Description

@la10736

In #11592 @valentinfernandez1 implemented the support account type in InjectedAccountExt. The side effect of this implementation is that the non ethereum account from all the extensions are not filtered. Previously the non ethereum account was filtered in keyring.loadAll because try to add these account generate an exception but now that we're providing an explicit account type the addFromAddress doesn't raise any exception for the standard polkadot accounts.

The practical issue is that you can find some accounts listed in "My Accounts/extension" that seam legit and connected but you cannot use. The user can thinks that are valid address and transfert some funds on these accounts that doesn't have any know private key. I'm really scared by this regression because the founds moved on these accounts are lost.

I've experimented this behavior on several chains (Moonbeam, Moonriver, VFlow,...) with several extensions connected (Polkadot.js, Talisman and Subwallet).

I wasn't able to find a fix and I cannot understand in depth if the filtering due the inject extension is just a lucky side effect or something on that the code relay on.

This is the commit that generate the issue

Console on previous version, in the last version these errors disappear.

Api.tsx_+_3_modules:236 Keyring: Unable to inject {"address":"5D9txxK9DTvgCznTjJo7q1cxAgmWa83CzHvcz8zhBtLgaLBV","meta":{"name":"ZkVerify Sudo Testnet (talisman)","source":"talisman","whenCreated":0}}
eval @ bundle.js_+_11_modules:656
loadAll @ bundle.js_+_11_modules:650
loadOnReady @ Api.tsx_+_3_modules:236
await in loadOnReady
eval @ Api.tsx_+_3_modules:394
emit @ index.js:202
emit @ Api.js_+_127_modules:5647
#onProviderConnect @ Api.js_+_127_modules:6859
await in #onProviderConnect
eval @ Api.js_+_127_modules:6522
emit @ index.js:201
#emit @ index.js_+_1_modules:443
#onSocketOpen @ index.js_+_1_modules:559Understand this warning
Api.tsx_+_3_modules:236 Keyring: Unable to inject {"address":"5EhREncHsntgJaax9YQphk1xN3LxPu2Rzbz4A3g7Ut8cRXWq","meta":{"name":"Unknow Zkverify Testnet (talisman)","source":"talisman","whenCreated":1}}
eval @ bundle.js_+_11_modules:656
loadAll @ bundle.js_+_11_modules:650
loadOnReady @ Api.tsx_+_3_modules:236
await in loadOnReady
eval @ Api.tsx_+_3_modules:394
emit @ index.js:202
emit @ Api.js_+_127_modules:5647
#onProviderConnect @ Api.js_+_127_modules:6859
await in #onProviderConnect
eval @ Api.js_+_127_modules:6522
emit @ index.js:201
#emit @ index.js_+_1_modules:443
#onSocketOpen @ index.js_+_1_modules:559Understand this warning
...

Let mu know if I can help, Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions