polkadot-js/apps

Block Details broken for blocks/chains with V1 Weight

Opened this issue · 0 comments

The Block Details tab in the explorer throws an error for chains still using V1Weight, and all chains if looking up an old block that still used V1. The error thrown is v2Weight.proofSize.toBn is not a function. I suspect this was caused by #10639, when a V1 Weight object is automatically converted to V2, the proofSize of the result gets set to BN_ZERO, which seems to not have a toBn method I assume? Not sure what the correct way to go about fixing this would be, so opening this issue instead of submitting a PR.