Additional derive cleanups (#4299)

* Additional derive cleanups

* map var

* Apply suggestions from code review

* Additional

* Metadata cleanups

* Adjust

* Apply HexString to all Metadata init

* typegen HexString

* generator HexString

* basepath
This commit is contained in:
Jaco
2021-12-08 14:15:26 +02:00
committed by GitHub
parent 8a7707eb41
commit 7c51354186
24 changed files with 146 additions and 143 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ function parseDetails (stashId: AccountId, controllerIdOpt: Option<AccountId> |
function getLedgers (api: ApiInterfaceRx, optIds: (Option<AccountId> | null)[], { withLedger = false }: StakingQueryFlags): Observable<Option<PalletStakingStakingLedger>[]> {
const ids = optIds
.filter((opt): opt is Option<AccountId> => withLedger && !!opt && opt.isSome)
.map((opt) => opt.unwrap());
.filter((o): o is Option<AccountId> => withLedger && !!o && o.isSome)
.map((o) => o.unwrap());
const emptyLed = api.registry.createType<Option<PalletStakingStakingLedger>>('Option<StakingLedger>');
return (