diff --git a/wasm/wasm_source/src/tx_update_account.rs b/wasm/wasm_source/src/tx_update_account.rs index 86038ab4892..f742ff5257b 100644 --- a/wasm/wasm_source/src/tx_update_account.rs +++ b/wasm/wasm_source/src/tx_update_account.rs @@ -17,27 +17,28 @@ fn apply_tx(ctx: &mut Ctx, tx: Tx) -> TxResult { let owner = &tx_data.addr; debug_log!("update VP for: {:#?}", tx_data.addr); - if let Some(hash) = tx_data.vp_code_hash { - let vp_code_sec = signed - .get_section(&hash) - .ok_or_err_msg("vp code section not found") - .map_err(|err| { - ctx.set_commitment_sentinel(); - err - })? - .extra_data_sec() - .ok_or_err_msg("vp code section must be tagged as extra") - .map_err(|err| { - ctx.set_commitment_sentinel(); - err - })?; - - ctx.update_validity_predicate( - owner, - vp_code_sec.code.hash(), - &vp_code_sec.tag, - )?; - } + // TODO: commented out for now cause we don't want to support vp changes + // if let Some(hash) = tx_data.vp_code_hash { + // let vp_code_sec = signed + // .get_section(&hash) + // .ok_or_err_msg("vp code section not found") + // .map_err(|err| { + // ctx.set_commitment_sentinel(); + // err + // })? + // .extra_data_sec() + // .ok_or_err_msg("vp code section must be tagged as extra") + // .map_err(|err| { + // ctx.set_commitment_sentinel(); + // err + // })?; + + // ctx.update_validity_predicate( + // owner, + // vp_code_sec.code.hash(), + // &vp_code_sec.tag, + // )?; + // } if let Some(threshold) = tx_data.threshold { let threshold_key = account::threshold_key(owner); diff --git a/wasm/wasm_source/src/vp_user.rs b/wasm/wasm_source/src/vp_user.rs index ca91a209972..c63da9642a6 100644 --- a/wasm/wasm_source/src/vp_user.rs +++ b/wasm/wasm_source/src/vp_user.rs @@ -135,9 +135,12 @@ fn validate_tx( KeyType::PgfSteward(address) => address != &addr || *valid_sig, KeyType::GovernanceVote(voter) => voter != &addr || *valid_sig, KeyType::Vp(owner) => { - let has_post: bool = ctx.has_key_post(key)?; if owner == &addr { - has_post && *valid_sig + // TODO: disabled cause we don't want to support vp changes + // for now let has_post: bool = + // ctx.has_key_post(key)?; has_post && + // *valid_sig + false } else { true }