Skip to content

Commit

Permalink
fix: submit snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
djm07073 committed Aug 8, 2024
1 parent 7bd932a commit e2451ca
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions precompile/modules/initia_stdlib/sources/vip/weight_vote.move
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,14 @@ module publisher::vip_weight_vote {
);
// get the last voted proposal
// execute proposal not executed
let proposal = table::borrow_mut(
&mut module_store.proposals,
table_key::encode_u64(module_store.current_cycle),
);
if(!proposal.executed&& proposal.voting_end_time < timestamp){
execute_proposal_internal(proposal,module_store.current_cycle);
if (module_store.current_cycle != 0 ){
let proposal = table::borrow_mut(
&mut module_store.proposals,
table_key::encode_u64(module_store.current_cycle),
);
if(!proposal.executed&& proposal.voting_end_time < timestamp){
execute_proposal_internal(proposal,module_store.current_cycle);
};
};
let voting_end_time = calculate_voting_end_time(timestamp, module_store);
submit_snapshot_internal(
Expand Down

0 comments on commit e2451ca

Please sign in to comment.