Skip to content

Commit

Permalink
replaced unnecessary Promise.all
Browse files Browse the repository at this point in the history
  • Loading branch information
Imod7 committed Aug 13, 2024
1 parent aef2a8d commit 2bf433d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/pallets/PalletsOnGoingReferendaService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class PalletsOnGoingReferendaService extends AbstractService {
async derivePalletOnGoingReferenda(hash: BlockHash): Promise<IPalletOnGoingReferenda> {
const { api } = this;
const historicApi = await api.at(hash);
const [{ number }] = await Promise.all([api.rpc.chain.getHeader(hash)]);
const { number } = await api.rpc.chain.getHeader(hash);
const referenda: IReferendaInfo[] = [];
if (historicApi.query.referenda) {
const referendaEntries = await historicApi.query.referenda.referendumInfoFor.entries();
Expand Down

0 comments on commit 2bf433d

Please sign in to comment.