Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianElvis committed Jan 7, 2025
1 parent a0f0c64 commit b2fe604
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 32 deletions.
8 changes: 0 additions & 8 deletions contracts/babylon/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ mod tests {
btc_confirmation_depth: 10,
checkpoint_finalization_timeout: 100,
notify_cosmos_zone: false,
btc_staking_code_id: None,
btc_staking_msg: None,
btc_finality_code_id: Some(2),
btc_finality_msg: None,
admin: None,
consumer_name: None,
consumer_description: None,
Expand Down Expand Up @@ -326,10 +322,6 @@ mod tests {
btc_confirmation_depth: 10,
checkpoint_finalization_timeout: 100,
notify_cosmos_zone: false,
btc_staking_code_id: None,
btc_staking_msg: None,
btc_finality_code_id: Some(2),
btc_finality_msg: Some(Binary::from(params.as_bytes())),
admin: None,
consumer_name: None,
consumer_description: None,
Expand Down
19 changes: 0 additions & 19 deletions contracts/babylon/src/msg/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,6 @@ impl ContractMsg for InstantiateMsg {
}
let _ = self.babylon_tag_to_bytes()?;

if self.btc_staking_code_id.is_some() {
if let (Some(consumer_name), Some(consumer_description)) =
(&self.consumer_name, &self.consumer_description)
{
if consumer_name.trim().is_empty() {
return Err(StdError::generic_err("Consumer name cannot be empty"));
}
if consumer_description.trim().is_empty() {
return Err(StdError::generic_err(
"Consumer description cannot be empty",
));
}
} else {
return Err(StdError::generic_err(
"Consumer name and description are required when btc_staking_code_id is set",
));
}
}

if let Some(transfer_info) = &self.transfer_info {
transfer_info.validate()?;
}
Expand Down
4 changes: 0 additions & 4 deletions contracts/babylon/src/multitest/suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ impl SuiteBuilder {
btc_confirmation_depth: 1,
checkpoint_finalization_timeout: 10,
notify_cosmos_zone: false,
btc_staking_code_id: Some(btc_staking_code_id),
btc_staking_msg: staking_msg,
btc_finality_code_id: Some(btc_finality_code_id),
btc_finality_msg: finality_msg,
admin: Some(owner.to_string()),
consumer_name: Some("TestConsumer".to_string()),
consumer_description: Some("Test Consumer Description".to_string()),
Expand Down
2 changes: 1 addition & 1 deletion contracts/btc-finality/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ fn send_rewards_msg(
Ok(wasm_msg)
}

pub fn get_activated_height(staking_addr: &Addr, querier: &QuerierWrapper) -> StdResult<u64> {
pub fn get_activated_height(querier: &QuerierWrapper) -> StdResult<u64> {
// TODO: Use a raw query
let query = encode_smart_query(
&params.btc_staking_contract_address,
Expand Down

0 comments on commit b2fe604

Please sign in to comment.