fix: simplify logic and use LightClientUpdate.fromJson

This commit is contained in:
Derrick Hammer 2023-07-13 01:45:43 -04:00
parent 76e22fa342
commit 17cb00231c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 7 deletions

View File

@ -61,12 +61,8 @@ export default class Prover implements IProver {
}
}
for (let i = 0; i < trueCount; i++) {
updates.push(
capella.ssz.LightClientUpdate.deserialize(res[startPeriod + i]),
return updates.concat(
res.map((u: any) => capella.ssz.LightClientUpdate.fromJson(u.data)),
);
}
return updates;
}
}