Skip to content

Commit

Permalink
Allow vp updates in vp_user
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Feb 13, 2024
1 parent 2108c6d commit 6a4d5d1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion wasm/wasm_source/src/vp_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,14 @@ fn validate_tx(
KeyType::PoS => validate_pos_changes(ctx, &addr, key, &valid_sig)?,
KeyType::PgfSteward(address) => address != &addr || *valid_sig,
KeyType::GovernanceVote(voter) => voter != &addr || *valid_sig,
KeyType::Vp(owner) => owner != &addr,
KeyType::Vp(owner) => {
let has_post: bool = ctx.has_key_post(key)?;
if owner == &addr {
has_post && *valid_sig
} else {
true
}
}
KeyType::Masp | KeyType::Ibc => true,
KeyType::Unknown => {
// Unknown changes require a valid signature
Expand Down

0 comments on commit 6a4d5d1

Please sign in to comment.