Skip to content

Commit

Permalink
bug: LQT: calculate effect hash *correctly* for votes
Browse files Browse the repository at this point in the history
Previously we were calculating the effect hash over the auth data too (woops!)
  • Loading branch information
cronokirby committed Feb 7, 2025
1 parent 7ab4df9 commit b413ca6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ impl From<LiquidityTournamentVoteBody> for pb::LiquidityTournamentVoteBody {
}
}

impl EffectingData for LiquidityTournamentVoteBody {
fn effect_hash(&self) -> EffectHash {
EffectHash::from_proto_effecting_data(&self.to_proto())
}
}

/// The action used to vote in the liquidity tournament.
///
/// This vote is towards a particular asset whose liquidity should be incentivized,
Expand Down Expand Up @@ -148,7 +154,7 @@ impl From<ActionLiquidityTournamentVote> for pb::ActionLiquidityTournamentVote {

impl EffectingData for ActionLiquidityTournamentVote {
fn effect_hash(&self) -> EffectHash {
EffectHash::from_proto_effecting_data(&self.to_proto())
self.body.effect_hash()
}
}

Expand Down

0 comments on commit b413ca6

Please sign in to comment.