fix: filter-out non eth accounts from eth chains (#11877)

* fix: filter-out non eth accounts from eth chains

* leave ctx type as it was
This commit is contained in:
Josep M Sobrepere 2025-10-06 06:00:17 +02:00 committed by GitHub
parent f9c0373a95
commit ad05c525ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -175,7 +175,17 @@ async function loadOnReady (api: ApiPromise, endpoint: LinkOption | null, fork:
ss58Format,
store,
type: isEthereum ? 'ethereum' : 'ed25519'
}, injectedAccounts);
},
isEthereum
? injectedAccounts.map((account) => {
const copy = { ...account };
copy.type = 'ethereum';
return copy;
})
: injectedAccounts
);
const defaultSection = Object.keys(api.tx)[0];
const defaultMethod = Object.keys(api.tx[defaultSection])[0];