This repository was archived by the owner on Dec 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -541,8 +541,12 @@ export function AirdropAdmin() {
541541 const now = Math . floor ( Date . now ( ) / 1000 ) ;
542542 const isExpired = proposal ?. config ?. expiryTime ?
543543 Number ( proposal . config . expiryTime ) < now : false ;
544- const canExecute = proposal ?. config ?. executionTime && proposal ?. config ?. status !== undefined ?
545- Number ( proposal . config . executionTime ) <= now && proposal . config . status !== 1 : false ;
544+ const canExecute = proposal ?. config ?. executionTime &&
545+ proposal ?. config ?. status !== undefined &&
546+ proposal ?. config ?. approvals !== undefined ?
547+ Number ( proposal . config . executionTime ) <= now &&
548+ proposal . config . status === 0 &&
549+ Number ( proposal . config . approvals ) >= 2 : false ;
546550
547551 if ( ! proposal || ! proposal . config ) {
548552 console . error ( 'Invalid proposal data:' , proposal ) ;
Original file line number Diff line number Diff line change @@ -541,8 +541,12 @@ export function TestnetMiningAdmin() {
541541 const now = Math . floor ( Date . now ( ) / 1000 ) ;
542542 const isExpired = proposal ?. config ?. expiryTime ?
543543 Number ( proposal . config . expiryTime ) < now : false ;
544- const canExecute = proposal ?. config ?. executionTime && proposal ?. config ?. status !== undefined ?
545- Number ( proposal . config . executionTime ) <= now && proposal . config . status !== 1 : false ;
544+ const canExecute = proposal ?. config ?. executionTime &&
545+ proposal ?. config ?. status !== undefined &&
546+ proposal ?. config ?. approvals !== undefined ?
547+ Number ( proposal . config . executionTime ) <= now &&
548+ proposal . config . status === 0 &&
549+ Number ( proposal . config . approvals ) >= 2 : false ;
546550
547551 if ( ! proposal || ! proposal . config ) {
548552 console . error ( 'Invalid proposal data:' , proposal ) ;
Original file line number Diff line number Diff line change @@ -541,8 +541,12 @@ export function VestingAdmin() {
541541 const now = Math . floor ( Date . now ( ) / 1000 ) ;
542542 const isExpired = proposal ?. config ?. expiryTime ?
543543 Number ( proposal . config . expiryTime ) < now : false ;
544- const canExecute = proposal ?. config ?. executionTime && proposal ?. config ?. status !== undefined ?
545- Number ( proposal . config . executionTime ) <= now && proposal . config . status !== 1 : false ;
544+ const canExecute = proposal ?. config ?. executionTime &&
545+ proposal ?. config ?. status !== undefined &&
546+ proposal ?. config ?. approvals !== undefined ?
547+ Number ( proposal . config . executionTime ) <= now &&
548+ proposal . config . status === 0 &&
549+ Number ( proposal . config . approvals ) >= 2 : false ;
546550
547551 if ( ! proposal || ! proposal . config ) {
548552 console . error ( 'Invalid proposal data:' , proposal ) ;
You can’t perform that action at this time.
0 commit comments