@xyo-network/xl1-protocol-sdk 1.21.2 → 1.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3997,16 +3997,16 @@ var SimpleBlockValidationViewer = class extends AbstractCreatableProvider {
3997
3997
  const validateState = state ? this.doValidateState.bind(this) : void 0;
3998
3998
  const chainIdAtBlockNumber = (blockNumber) => this.chainContractViewer.chainIdAtBlockNumber(blockNumber);
3999
3999
  const qualification = { head: headBlock._hash, range: asXL1BlockRange11([0, headBlock.block], true) };
4000
- const [protocolResults = [], stateResults = []] = await Promise.all([
4000
+ const [protocolResults, stateResults] = await Promise.all([
4001
4001
  validateProtocol?.(blocksWithMeta, chainIdAtBlockNumber),
4002
4002
  validateState?.(blocksWithMeta, chainIdAtBlockNumber)
4003
4003
  ]);
4004
- const blockResults = protocolResults.map((r, i) => {
4004
+ const blockResults = blocksWithMeta.map((r, i) => {
4005
4005
  const errors = [];
4006
- if (!isHydratedBlock(r)) {
4007
- errors.push(...r);
4006
+ if (protocolResults && !isHydratedBlock(protocolResults[i])) {
4007
+ errors.push(...protocolResults[i]);
4008
4008
  }
4009
- if (!isHydratedBlock(stateResults[i])) {
4009
+ if (stateResults && !isHydratedBlock(stateResults[i])) {
4010
4010
  errors.push(...stateResults[i]);
4011
4011
  }
4012
4012
  return errors.length === 0 ? r : errors;