File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ export function handleContribution(event: Contribution): void {
234
234
let disputeEntity = DisputeEntity . load ( disputeID . toString ( ) ) ;
235
235
if ( ! disputeEntity ) return ;
236
236
let article = getArticleEntityInstance ( BigInt . fromString ( disputeEntity . article . split ( "-" ) [ 0 ] ) ) ;
237
- const rawMessage = `${ event . params . ruling } -${ event . params . amount } -${ event . params . contributor } ` ;
237
+ const rawMessage = `${ event . params . ruling } -${ event . params . amount } -${ event . params . contributor . toHexString ( ) } ` ;
238
238
getPopulatedEventEntity ( event , "Contribution" , article . id , rawMessage ) . save ( ) ;
239
239
240
240
const contributorsArray = disputeEntity . contributors ;
@@ -337,12 +337,10 @@ export function handleRuling(event: Ruling): void {
337
337
continue ;
338
338
}
339
339
contributorsSet . add ( contributors [ i ] ) ;
340
-
341
340
const user = User . load ( contributors [ i ] ) ;
341
+
342
342
if ( user ) {
343
- user . totalWithdrawableAmount = user . totalWithdrawableAmount . plus (
344
- contract . getTotalWithdrawableAmount ( disputeID , Address . fromString ( contributors [ i ] ) ) . getSum ( )
345
- ) ;
343
+ user . totalWithdrawableAmount = user . totalWithdrawableAmount . plus ( contract . getTotalWithdrawableAmount ( disputeID , Address . fromString ( user . id ) ) . getSum ( ) ) ;
346
344
user . save ( ) ;
347
345
}
348
346
}
You can’t perform that action at this time.
0 commit comments