Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit cecba8b

Browse files
chaindata: use next era to fetch previous
1 parent d15533e commit cecba8b

File tree

1 file changed

+4
-1
lines changed
  • packages/common/src/chaindata/queries

1 file changed

+4
-1
lines changed

packages/common/src/chaindata/queries/Era.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ export const getTotalEraPoints = async (
4646
if (!chainType) {
4747
return {} as EraPointsInfo;
4848
}
49-
const [blockHash, err] = await chaindata.findEraBlockHash(era, chainType);
49+
const [blockHash, err] = await chaindata.findEraBlockHash(
50+
era + 1,
51+
chainType,
52+
);
5053

5154
if (blockHash) {
5255
const apiAt = await chaindata?.api?.at(blockHash);

0 commit comments

Comments
 (0)