Skip to content

Commit

Permalink
test: fix chain-history provider mock
Browse files Browse the repository at this point in the history
  • Loading branch information
mkazlauskas committed Dec 22, 2024
1 parent ac178a4 commit 8bc0b1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Cardano, ChainHistoryProvider } from '@cardano-sdk/core';
import { currentEpoch, queryTransactionsResult } from './ProviderStub';

export const chainHistoryProviderStub = (): ChainHistoryProvider => ({
transactionsByAddresses: jest.fn().mockResolvedValue(queryTransactionsResult),
transactionsByAddresses: jest.fn().mockResolvedValue({ pageResults: queryTransactionsResult }),
transactionsByHashes: jest.fn().mockResolvedValue(queryTransactionsResult),
blocksByHashes: jest.fn().mockResolvedValue([
{
Expand Down
1 change: 1 addition & 0 deletions packages/cardano/src/wallet/test/mocks/ProviderStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const queryTransactionsResult: Cardano.HydratedTx[] = [
blockHeader: {
slot: Cardano.Slot(ledgerTip.slot - 100_000)
},
id: Cardano.TransactionId('0000000000000000000000000000000000000000000000000000000000000000'),
body: {
certificates: [
{
Expand Down

0 comments on commit 8bc0b1b

Please sign in to comment.