Swap accountId check (Ethereum-addr chains have === 20) (#2816)

This commit is contained in:
Jaco Greeff
2020-11-03 19:27:39 +01:00
committed by GitHub
parent 2bc3b711b2
commit b6ff8a400e
2 changed files with 2 additions and 2 deletions
@@ -16,7 +16,7 @@ function retrieve (api: ApiInterfaceRx, address: Address | AccountId | AccountIn
? address
: decodeAddress((address || '').toString());
if (decoded.length === 32) {
if (decoded.length > 8) {
return of(api.registry.createType('AccountId', decoded));
}
@@ -19,7 +19,7 @@ function retrieve (api: ApiInterfaceRx, address: Address | AccountId | AccountIn
? address
: decodeAddress((address || '').toString());
if (decoded.length === 32) {
if (decoded.length > 8) {
const accountId = api.registry.createType('AccountId', decoded);
return api.derive.accounts.idToIndex(accountId).pipe(