diff --git a/.changelog/unreleased/bug-fixes/1889-respect-force-option.md b/.changelog/unreleased/bug-fixes/1889-respect-force-option.md new file mode 100644 index 0000000000..00a182dfb7 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/1889-respect-force-option.md @@ -0,0 +1,2 @@ +- Respect force option for proposal vote transaction + ([\#1889](https://github.com/anoma/namada/pull/1889)) \ No newline at end of file diff --git a/shared/src/sdk/tx.rs b/shared/src/sdk/tx.rs index 06dc144ad6..d333796922 100644 --- a/shared/src/sdk/tx.rs +++ b/shared/src/sdk/tx.rs @@ -1221,9 +1221,13 @@ pub async fn build_vote_proposal< let is_validator = rpc::is_validator(client, &voter).await?; if !proposal.can_be_voted(epoch, is_validator) { - return Err(Error::from(TxError::InvalidProposalVotingPeriod( - proposal_id, - ))); + if tx.force { + eprintln!("Invalid proposal {} vote period.", proposal_id); + } else { + return Err(Error::from(TxError::InvalidProposalVotingPeriod( + proposal_id, + ))); + } } let delegations = rpc::get_delegators_delegation_at( @@ -1803,7 +1807,7 @@ pub async fn build_transfer< // inner tx will fail, so abort tx creation if fee_unshield_epoch != transfer_unshield_epoch && !args.tx.force { return Err(Error::Other( - "Fee unshilding masp tx and inner tx masp transaction \ + "Fee unshielding masp tx and inner tx masp transaction \ were crafted on an epoch boundary" .to_string(), ));