Skip to content

Commit 93b1bc4

Browse files
committed
test: details
1 parent eb77a71 commit 93b1bc4

File tree

1 file changed

+10
-8
lines changed
  • packages/indexer-common/src/indexing-fees/__tests__

1 file changed

+10
-8
lines changed

packages/indexer-common/src/indexing-fees/__tests__/dips.test.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const mockSubgraphDeployment = (id: string) => {
6363
stakedTokens: BigNumber.from('1000'),
6464
signalledTokens: BigNumber.from('1000'),
6565
queryFeesAmount: BigNumber.from('0'),
66-
protocolNetwork: 'arbitrum-one',
66+
protocolNetwork: 'eip155:42161',
6767
}
6868
}
6969

@@ -303,6 +303,9 @@ describe('DipsManager', () => {
303303
identifierType: SubgraphIdentifierType.DEPLOYMENT,
304304
decisionBasis: IndexingDecisionBasis.ALWAYS,
305305
allocationLifetime: 16,
306+
requireSupported: true,
307+
safety: true,
308+
protocolNetwork: 'eip155:42161',
306309
})
307310
// Mock fetch the subgraph deployment from the network subgraph
308311
network.networkMonitor.subgraphDeployment = jest
@@ -435,14 +438,13 @@ describe('DipsCollector', () => {
435438

436439
const client = dipsCollector.gatewayDipsServiceClient
437440

438-
client.CollectPayment = jest
439-
.fn()
441+
client.CollectPayment = jest.fn().mockResolvedValue({
442+
version: 1,
443+
status: CollectPaymentStatus.ACCEPT,
444+
tapReceipt: Buffer.from('1234', 'hex'),
445+
})
446+
;(decodeTapReceipt as jest.Mock)
440447
.mockResolvedValue({
441-
version: 1,
442-
status: CollectPaymentStatus.ACCEPT,
443-
tapReceipt: Buffer.from('1234', 'hex'),
444-
})(decodeTapReceipt as jest.Mock)
445-
.mockReturnValue({
446448
allocation_id: toAddress(testAllocationId),
447449
signer_address: toAddress('0xabcd56df41234949a75a6693c77834c00b8abbbb'),
448450
signature: Buffer.from('1234', 'hex'),

0 commit comments

Comments
 (0)