Skip to content

Commit 775fff5

Browse files
authored
Apply wildcard type matches (renamed pallets) (#4741)
* Apply wildcard type matches (renamed pallets) * typo
1 parent 9345a18 commit 775fff5

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## master
4+
5+
Changes:
6+
7+
- Apply windcard matches for `democracy::vote::Vote` and `identity::type::Data`
8+
9+
310
## 8.0.2 Apr 11, 2022
411

512
Changes:

packages/types/src/metadata/PortableRegistry/PortableRegistry.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ const PRIMITIVE_ALIAS: Record<string, string> = {
2424

2525
// These are types where we have a specific decoding/encoding override + helpers
2626
const PATHS_ALIAS = splitNamespace([
27-
// these have a specific encoding or logic (for pallets)
28-
'pallet_democracy::vote::Vote',
29-
'pallet_identity::types::Data',
27+
// full matching on exact names...
3028
// these are well-known types with additional encoding
3129
'sp_core::crypto::AccountId32',
3230
'sp_runtime::generic::era::Era',
3331
'sp_runtime::multiaddress::MultiAddress',
3432
// ethereum overrides (Frontier, Moonbeam, Polkadot claims)
3533
'account::AccountId20',
3634
'polkadot_runtime_common::claims::EthereumAddress',
35+
// wildcard matching in place...
36+
// these have a specific encoding or logic, use a wildcard for {pallet, darwinia}_democracy
37+
'*_democracy::vote::Vote',
38+
'*_identity::types::Data',
3739
// shorten some well-known types
3840
'primitive_types::*',
3941
'sp_arithmetic::per_things::*',

0 commit comments

Comments
 (0)