mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-10-26 21:29:49 +00:00
typegen: keep array and null inputs for types that contain an account
getSimilarTypes widened lookup types by name before its class checks, with
type.includes('AccountId32') and type.includes('MultiAddress'). Those also
match every type that only contains one: Vec<AccountId32>,
Option<AccountId32>, ITuple<[AccountId32, u32]>, Vec<MultiAddress>. They
were widened like a bare account and returned before reaching the Vec,
Option or Tuple branch, so the generated augment typed
multisig.asMulti(otherSignatories) as `Vec<AccountId32> | string |
Uint8Array` (no string[]), an Option<AccountId32> argument without null,
and a tuple key without its tuple form.
The names are now matched whole. The augment is regenerated
(yarn build:metadata); for these types it now matches what upstream
generates, e.g. `Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]`.
This commit is contained in:
1 parent
2a358917c7
commit
9caac8b0d4
12 files changed
+157
-138
No files matched your search
@@ -47,7 +47,7 @@ declare module '@pezkuwi/api-base/types/storage' {
|
||||
* Amounts currently reserved in the accounts of the bidders currently winning
|
||||
* (sub-)ranges.
|
||||
**/
|
||||
reservedAmounts: AugmentedQuery<ApiType, (arg: ITuple<[AccountId32, u32]> | string | Uint8Array) => Observable<Option<u128>>, [ITuple<[AccountId32, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[AccountId32, u32]>]>;
|
||||
reservedAmounts: AugmentedQuery<ApiType, (arg: ITuple<[AccountId32, u32]> | [AccountId32 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<u128>>, [ITuple<[AccountId32, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[AccountId32, u32]>]>;
|
||||
/**
|
||||
* The winning bids for each of the 10 ranges at each sample in the final Ending Period of
|
||||
* the current auction. The map's key is the 0-based index into the Sample Size. The
|
||||
@@ -2089,7 +2089,7 @@ declare module '@pezkuwi/api-base/types/storage' {
|
||||
* Records information about the maximum slash of a stash within a slashing span,
|
||||
* as well as how much reward has been paid out.
|
||||
**/
|
||||
spanSlash: AugmentedQuery<ApiType, (arg: ITuple<[AccountId32, u32]> | string | Uint8Array) => Observable<PezpalletStakingSlashingSpanRecord>, [ITuple<[AccountId32, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[AccountId32, u32]>]>;
|
||||
spanSlash: AugmentedQuery<ApiType, (arg: ITuple<[AccountId32, u32]> | [AccountId32 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<PezpalletStakingSlashingSpanRecord>, [ITuple<[AccountId32, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[AccountId32, u32]>]>;
|
||||
/**
|
||||
* All unapplied slashes that are queued for later.
|
||||
**/
|
||||
|
||||
Reference in new issue
Block a user