Skip to content

Commit

Permalink
fix: replace getPendingTransactions with getBlockWithTxs
Browse files Browse the repository at this point in the history
getPendingTransactions was removed
  • Loading branch information
Sekhmet committed Dec 14, 2023
1 parent 6d480de commit 034753c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/starknet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export class StarknetProvider extends BaseProvider {
}

async processPool(blockNumber: number) {
const txs = await this.provider.getPendingTransactions();
const block = await this.provider.getBlockWithTxs('pending');
const receipts = await Promise.all(
txs.map(async tx => {
block.transactions.map(async tx => {
if (!tx.transaction_hash) return null;

try {
Expand All @@ -92,7 +92,7 @@ export class StarknetProvider extends BaseProvider {
})
);

const txsWithReceipts = txs.filter((_, index) => receipts[index] !== null);
const txsWithReceipts = block.transactions.filter((_, index) => receipts[index] !== null);
const eventsMap = receipts.reduce((acc, receipt) => {
if (receipt === null) return acc;

Expand Down

0 comments on commit 034753c

Please sign in to comment.