File tree 1 file changed +2
-0
lines changed
subgraph/core/src/entities
1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { ClassicContribution } from "../../generated/schema" ;
2
2
import { Contribution as ContributionEvent , Withdrawal } from "../../generated/DisputeKitClassic/DisputeKitClassic" ;
3
3
import { DISPUTEKIT_ID } from "../DisputeKitClassic" ;
4
+ import { ensureUser } from "./User" ;
4
5
5
6
export function ensureClassicContributionFromEvent < T > ( event : T ) : ClassicContribution | null {
6
7
if ( ! ( event instanceof ContributionEvent ) && ! ( event instanceof Withdrawal ) ) return null ;
7
8
const coreDisputeID = event . params . _coreDisputeID . toString ( ) ;
8
9
const coreRoundIndex = event . params . _coreRoundID . toString ( ) ;
9
10
const roundID = `${ DISPUTEKIT_ID } -${ coreDisputeID } -${ coreRoundIndex } ` ;
11
+ ensureUser ( event . params . _contributor . toHexString ( ) ) ;
10
12
const contributor = event . params . _contributor . toHexString ( ) ;
11
13
const choice = event . params . _choice ;
12
14
You can’t perform that action at this time.
0 commit comments