Cleanuop preimage check (#1674)

This commit is contained in:
Jaco Greeff
2019-12-16 11:56:42 +01:00
committed by GitHub
parent 10bc6b4060
commit bd57359dc5
@@ -27,7 +27,7 @@ interface Result {
function parse (api: ApiInterfaceRx, { depositors, proposals, preimages }: Result): DeriveProposal[] {
return proposals
.filter(([, , proposer], index): boolean =>
!!(preimages[index]?.isSome) && !!(depositors[index]?.isSome) && !proposer.isEmpty
!!(depositors[index]?.isSome) && !proposer.isEmpty
)
.map(([propIndex, hash, proposer], index): DeriveProposal => {
const preimage = preimages[index].unwrapOr(null);