Skip to content

Commit

Permalink
fixup! test(util-dev): chainHistory mock should respect block range
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceahasegan committed Nov 14, 2024
1 parent c48089d commit 98e7c0b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as AssetId from '../assetId';
import * as Crypto from '@cardano-sdk/crypto';
import { Cardano, Paginated } from '@cardano-sdk/core';
import { Cardano, Paginated, TransactionsByAddressesArgs } from '@cardano-sdk/core';
import { currentEpoch, handleAssetId, ledgerTip, stakeCredential } from './mockData';
import { somePartialStakePools } from '../createStubStakePoolProvider';
import delay from 'delay';
Expand Down Expand Up @@ -230,8 +230,8 @@ export const mockChainHistoryProvider2 = (delayMs: number) => {
return {
blocksByHashes: delayedJestFn(blocksByHashes),
healthCheck: delayedJestFn({ ok: true }),
transactionsByAddresses: jest.fn(({ blockRange: { lowerBound } }: { blockRange: { lowerBound: number } }) =>
delay(delayMs).then(() => blockRangeTransactions(lowerBound))
transactionsByAddresses: jest.fn(({ blockRange }: TransactionsByAddressesArgs) =>
delay(delayMs).then(() => blockRangeTransactions(blockRange?.lowerBound || 0))
),
transactionsByHashes: delayedJestFn(queryTransactionsResult2)
};
Expand Down

0 comments on commit 98e7c0b

Please sign in to comment.