Adjust AccountId20 detection with partial match (#5605)
This commit is contained in:
@@ -8,6 +8,7 @@ Contributed:
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `AccountId20` detection with partial match
|
||||
- Cleanup block author extraction derives
|
||||
- Drop support for Node 14 (EOL 30 Apr 2023)
|
||||
|
||||
|
||||
@@ -418,11 +418,10 @@ function registerTypes (lookup: PortableRegistry, lookups: Record<string, string
|
||||
}
|
||||
|
||||
lookup.registry.register({
|
||||
AccountId: ['sp_core::crypto::AccountId32'].includes(nsAccountId)
|
||||
? 'AccountId32'
|
||||
: ['account::AccountId20', 'primitive_types::H160'].includes(nsAccountId)
|
||||
? 'AccountId20'
|
||||
: 'AccountId32', // other, default to AccountId32
|
||||
// known: account::AccountId20, fp_account::AccountId20, primitive_types::H160
|
||||
AccountId: nsAccountId.endsWith('::AccountId20') || nsAccountId.endsWith('::H160')
|
||||
? 'AccountId20'
|
||||
: 'AccountId32',
|
||||
Address: isMultiAddress
|
||||
? 'MultiAddress'
|
||||
: 'AccountId',
|
||||
|
||||
Reference in New Issue
Block a user