File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
subgraph/core/src/entities Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 11import { ClassicContribution } from "../../generated/schema" ;
22import { Contribution as ContributionEvent , Withdrawal } from "../../generated/DisputeKitClassic/DisputeKitClassic" ;
33import { DISPUTEKIT_ID } from "../DisputeKitClassic" ;
4+ import { ensureUser } from "./User" ;
45
56export function ensureClassicContributionFromEvent < T > ( event : T ) : ClassicContribution | null {
67 if ( ! ( event instanceof ContributionEvent ) && ! ( event instanceof Withdrawal ) ) return null ;
78 const coreDisputeID = event . params . _coreDisputeID . toString ( ) ;
89 const coreRoundIndex = event . params . _coreRoundID . toString ( ) ;
910 const roundID = `${ DISPUTEKIT_ID } -${ coreDisputeID } -${ coreRoundIndex } ` ;
11+ ensureUser ( event . params . _contributor . toHexString ( ) ) ;
1012 const contributor = event . params . _contributor . toHexString ( ) ;
1113 const choice = event . params . _choice ;
1214
You can’t perform that action at this time.
0 commit comments