Skip to content

Commit

Permalink
fix: move msg validation to after ADOContract init (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
joemonem authored Nov 19, 2024
1 parent b43021d commit 31a3dce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/finance/andromeda-vesting/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-vesting"
version = "3.0.3-beta"
version = "3.0.4-beta"
edition = "2021"
rust-version = "1.75.0"

Expand Down
11 changes: 6 additions & 5 deletions contracts/finance/andromeda-vesting/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ pub fn instantiate(
info: MessageInfo,
msg: InstantiateMsg,
) -> Result<Response, ContractError> {
msg.validate(&deps)?;
let config = Config {
recipient: msg.recipient,
denom: msg.denom,
recipient: msg.recipient.clone(),
denom: msg.denom.clone(),
};

CONFIG.save(deps.storage, &config)?;
Expand All @@ -52,11 +51,13 @@ pub fn instantiate(
BaseInstantiateMsg {
ado_type: CONTRACT_NAME.to_string(),
ado_version: CONTRACT_VERSION.to_string(),
kernel_address: msg.kernel_address,
owner: msg.owner,
kernel_address: msg.kernel_address.clone(),
owner: msg.owner.clone(),
},
)?;

msg.validate(&deps)?;

Ok(inst_resp)
}

Expand Down

0 comments on commit 31a3dce

Please sign in to comment.