CreateType is typed, add createTypeUnsafe just in case (#1199)
* Use unsafe internally * Add comments * Remove <> in createType * Fix lint * Fix classOf * Remove createType from Text * Fix lint * Fix Fallback type * Fix fallback in createType
This commit is contained in:
committed by
Jaco Greeff
parent
ec0b9a84a3
commit
441148889d
@@ -58,7 +58,7 @@ function calculateUnlocking (stakingLedger: StakingLedger | undefined, eraLength
|
||||
const groupedResult = groupByEra(unlockingChunks);
|
||||
const results = Object.entries(groupedResult).map(([eraString, value]): { value: BN; remainingBlocks: BN } => ({
|
||||
value,
|
||||
remainingBlocks: remainingBlocks(createType<BlockNumber>('BlockNumber', eraString), eraLength, bestNumber)
|
||||
remainingBlocks: remainingBlocks(createType('BlockNumber', eraString), eraLength, bestNumber)
|
||||
}));
|
||||
|
||||
return results.length ? results : undefined;
|
||||
|
||||
Reference in New Issue
Block a user