Skip to content

Commit

Permalink
update dealID to deal to match interface
Browse files Browse the repository at this point in the history
  • Loading branch information
gfournieriExec committed Dec 12, 2024
1 parent bfe1942 commit e0efce4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ type DealSponsored implements DealEvent @entity {
id: ID!
transaction: Transaction!
timestamp: BigInt!
dealId: Deal!
deal: Deal!
sponsor: Account!
}

Expand Down
2 changes: 1 addition & 1 deletion src/Modules/IexecPoco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export function handleDealSponsored(event: DealSponsoredEvent): void {
dealSponsoredEvent.transaction = logTransaction(event).id;
dealSponsoredEvent.transaction = logTransaction(event).id;
dealSponsoredEvent.timestamp = event.block.timestamp;
dealSponsoredEvent.dealId = event.params.dealId.toHex();
dealSponsoredEvent.deal = event.params.dealId.toHex();
dealSponsoredEvent.sponsor = event.params.sponsor.toHex();
dealSponsoredEvent.save();
}
4 changes: 2 additions & 2 deletions test/Modules/IexecPoco.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('IexecPoco', () => {

// Create the mock event
let mockEvent = newTypedMockEventWithParams<DealSponsored>([
new ethereum.EventParam('dealId', ethereum.Value.fromFixedBytes(dealId)),
new ethereum.EventParam('deal', ethereum.Value.fromFixedBytes(dealId)),
new ethereum.EventParam('sponsor', ethereum.Value.fromAddress(sponsor)),
]);
mockEvent.block.timestamp = timestamp;
Expand All @@ -31,7 +31,7 @@ describe('IexecPoco', () => {
.concat('-')
.concat(mockEvent.logIndex.toString());

assert.fieldEquals('DealSponsored', entityId, 'dealId', dealId.toHex());
assert.fieldEquals('DealSponsored', entityId, 'deal', dealId.toHex());
assert.fieldEquals('DealSponsored', entityId, 'sponsor', sponsor.toHex());
assert.fieldEquals('DealSponsored', entityId, 'timestamp', timestamp.toString());

Expand Down

0 comments on commit e0efce4

Please sign in to comment.