Skip to content

Commit d216a93

Browse files
committed
fix: build issues and feedback from PaymentCollection PR
1 parent d7cefa3 commit d216a93

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

schema.graphql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,8 @@ type Provision @entity {
930930
"Total query fees collected. Includes the portion given to delegators"
931931
queryFeesCollected: BigInt!
932932
"Query fee amount collected from the protocol. Does not include portion given to delegators"
933-
providerQueryFees: BigInt!
934-
"Query fee amount collected from the protocol for Delegators. Does not include portion taken by the provider"
933+
indexerQueryFees: BigInt!
934+
"Query fee amount collected from the protocol for Delegators. Does not include portion taken by the indexer"
935935
delegatorQueryFees: BigInt!
936936

937937
# Delegation

src/mappings/graphPayments.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export function handleGraphPaymentCollected(event: GraphPaymentCollected): void
1717
graphNetwork.save()
1818

1919
// Replicate for payment source specific data
20+
// Payer here is the PaymentsEscrow in most cases, might need to figure out how to know who funded the escrow in the future
2021
let paymentSource = createOrLoadPaymentSource(event.params.payer)
2122
paymentSource.totalTaxedQueryFees = paymentSource.totalTaxedQueryFees.plus(event.params.tokensProtocol)
2223
paymentSource.save()

src/mappings/subgraphService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function handleRewardsDestinationSet(event: RewardsDestinationSet): void
2525

2626
export function handleDelegationRatioSet(event: DelegationRatioSet): void {
2727
let dataService = createOrLoadDataService(event.address)
28-
dataService.delegationRatio = event.params.ratio
28+
dataService.delegationRatio = event.params.ratio.toI32()
2929
dataService.save()
3030
}
3131

@@ -265,7 +265,7 @@ export function handleQueryFeesCollected(event: QueryFeesCollected): void {
265265
let indexerQueryFees = event.params.tokensCollected.minus(delegationPoolQueryFees)
266266

267267
provision.queryFeesCollected = provision.queryFeesCollected.plus(event.params.tokensCollected)
268-
provision.providerQueryFees = provision.providerQueryFees.plus(indexerQueryFees)
268+
provision.indexerQueryFees = provision.indexerQueryFees.plus(indexerQueryFees)
269269
provision.delegatorQueryFees = provision.delegatorQueryFees.plus(delegationPoolQueryFees)
270270
provision.save()
271271

0 commit comments

Comments
 (0)