Skip to content

Commit

Permalink
chore: await instead of Promise.all
Browse files Browse the repository at this point in the history
  • Loading branch information
dozyio committed Feb 26, 2025
1 parent 2e81e49 commit c87a569
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/bitswap/src/bitswap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ export class Bitswap implements BitswapInterface {
async notify (cid: CID, block: Uint8Array, options: ProgressOptions<BitswapNotifyProgressEvents> & AbortOptions = {}): Promise<void> {
if (this.peerWantLists === undefined) {
// download only
await Promise.all([
this.wantList.receivedBlock(cid, options)
])
await this.wantList.receivedBlock(cid, options)
} else {
await Promise.all([
this.peerWantLists.receivedBlock(cid, options),
Expand Down

0 comments on commit c87a569

Please sign in to comment.