Skip to content

Commit 4090321

Browse files
committed
fix: bytes conversion from collectionId to allocationId
Signed-off-by: Tomás Migone <[email protected]>
1 parent eb1d959 commit 4090321

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mappings/graphTallyCollector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Address, BigInt } from '@graphprotocol/graph-ts'
1+
import { Address, BigInt, Bytes } from '@graphprotocol/graph-ts'
22
import { PaymentsEscrowTransaction, Signer } from '../types/schema'
33
import {
44
SignerAuthorized,
@@ -57,7 +57,7 @@ export function handlePaymentCollected(event: PaymentCollected): void {
5757
transaction.payer = payer.id
5858
transaction.collector = event.params.dataService
5959
transaction.receiver = receiver.id
60-
transaction.allocationId = Address.fromBytes(event.params.collectionId)
60+
transaction.allocationId = Address.fromBytes(Bytes.fromUint8Array(event.params.collectionId.slice(12)))
6161
transaction.amount = event.params.tokens
6262
transaction.escrowAccount = escrow.id
6363
transaction.transactionGroupId = event.transaction.hash

0 commit comments

Comments
 (0)