Limit address inputs based on keyring type (#8925)

This commit is contained in:
Jaco 2023-02-02 09:37:04 +02:00 committed by GitHub
parent e328d15c76
commit fa569250e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ const MULTI_DEFAULT: string[] = [];
function transformToAddress (value?: string | Uint8Array | null): string | null {
try {
return toAddress(value) || null;
return toAddress(value, false, keyring.keyring.type === 'ethereum' ? 20 : 32) || null;
} catch (error) {
// noop, handled by return
}