Skip to content

Commit a3f66f2

Browse files
committed
fix: more details
1 parent 79fe5a1 commit a3f66f2

File tree

1 file changed

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

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const startCollectionLoop = jest
7373
.mockImplementation(() => {})
7474
const setup = async () => {
7575
logger = createLogger({
76-
name: 'DIPs Manager Test Logger',
76+
name: 'DIPs Test Logger',
7777
async: false,
7878
level: __LOG_LEVEL__ ?? 'error',
7979
})
@@ -305,7 +305,7 @@ describe('DipsManager', () => {
305305
allocationLifetime: 16,
306306
requireSupported: true,
307307
safety: true,
308-
protocolNetwork: 'eip155:42161',
308+
protocolNetwork: 'eip155:421614',
309309
allocationAmount: '1030',
310310
})
311311
// Mock fetch the subgraph deployment from the network subgraph
@@ -326,7 +326,7 @@ describe('DipsManager', () => {
326326
allocationLifetime: 16,
327327
requireSupported: true,
328328
safety: true,
329-
protocolNetwork: 'eip155:42161',
329+
protocolNetwork: 'eip155:421614',
330330
allocationAmount: '1030',
331331
})
332332
})
@@ -405,11 +405,14 @@ describe('DipsCollector', () => {
405405
jest.clearAllMocks()
406406

407407
// Create a test agreement
408+
// Note last_allocation_id is set to the testAllocationId
409+
// current_allocation_id is set to null so that we can collect payment
410+
// (also last_payment_collected_at is set to null)
408411
await managementModels.IndexingAgreement.create({
409412
id: testAgreementId,
410413
subgraph_deployment_id: testDeploymentId,
411-
current_allocation_id: testAllocationId,
412-
last_allocation_id: null,
414+
current_allocation_id: null,
415+
last_allocation_id: testAllocationId,
413416
last_payment_collected_at: null,
414417
cancelled_at: null,
415418
min_epochs_per_collection: BigInt(1),

0 commit comments

Comments
 (0)