File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -287,7 +287,12 @@ export function handleNativeTokenTransfer(event: Transfer): void {
287
287
288
288
export function handleExecuteProposal ( event : ExecuteProposal ) : void {
289
289
if ( isProposalValid ( event . params . _proposalId . toHex ( ) ) ) {
290
- updateProposalExecution ( event . params . _proposalId , event . params . _totalReputation , event . block . timestamp ) ;
290
+ updateProposalExecution (
291
+ event . params . _proposalId ,
292
+ event . params . _totalReputation ,
293
+ event . block . timestamp ,
294
+ event . params . _decision ,
295
+ ) ;
291
296
}
292
297
}
293
298
Original file line number Diff line number Diff line change @@ -429,12 +429,14 @@ export function updateProposalExecution(
429
429
proposalId : Bytes ,
430
430
totalReputation : BigInt ,
431
431
timestamp : BigInt ,
432
+ decision : BigInt ,
432
433
) : void {
433
434
let proposal = getProposal ( proposalId . toHex ( ) ) ;
434
435
proposal . executedAt = timestamp ;
436
+ proposal . winningOutcome = parseOutcome ( decision ) ;
435
437
// Setting the closingAt field to a far away point in the future so it will be easy to
436
438
// sort all proposal(open and executed) in ascending order by the closingAt field
437
- if ( proposal . genericSchemeMultiCall !== null && equalStrings ( proposal . winningOutcome , 'Pass' ) ) {
439
+ if ( proposal . genericSchemeMultiCall !== null && decision . equals ( BigInt . fromI32 ( 1 ) ) ) {
438
440
proposal . closingAt = timestamp . minus ( BigInt . fromI32 ( CLOSING_AT_TIME_DECREASE_GSMC ) ) ;
439
441
} else {
440
442
proposal . closingAt = ( BigInt . fromI32 ( CLOSING_AT_TIME_INCREASE ) . minus ( timestamp ) ) . times ( BigInt . fromI32 ( 100 ) ) ;
You can’t perform that action at this time.
0 commit comments