Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing #99

Merged
merged 14 commits into from
Jul 22, 2024
297 changes: 122 additions & 175 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ members = [
[workspace.package]
edition = "2021"
license = "BSL"
version = "0.1.5"
version = "0.1.6"
repository = "https://github.com/timewave-computer/valence-services"

rust-version = "1.66"
Expand Down
2 changes: 1 addition & 1 deletion contracts/auction/auctions_manager/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ mod admin {
};
Ok(start_admin_change(deps, &info, &addr, expiration)?.add_event(event.into()))
}
AdminMsgs::CancelAdminChange => {
AdminMsgs::CancelAdminChange {} => {
let event = ValenceEvent::AuctionManagerCancelAdminChange {};
Ok(cancel_admin_change(deps, &info)?.add_event(event.into()))
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/auction/auctions_manager/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ pub enum AdminMsgs {
addr: String,
expiration: Expiration,
},
CancelAdminChange,
CancelAdminChange {},
}
4 changes: 2 additions & 2 deletions contracts/services/rebalancer/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub fn execute(
) -> Result<Response, ContractError> {
match msg {
RebalancerExecuteMsg::Admin(admin_msg) => admin::handle_msg(deps, env, info, admin_msg),
RebalancerExecuteMsg::ApproveAdminChange => {
RebalancerExecuteMsg::ApproveAdminChange {} => {
let event = ValenceEvent::RebalancerApproveAdminChange {};
Ok(approve_admin_change(deps, &env, &info)?.add_event(event.into()))
}
Expand Down Expand Up @@ -632,7 +632,7 @@ mod admin {
};
Ok(start_admin_change(deps, &info, &addr, expiration)?.add_event(event.into()))
}
RebalancerAdminMsg::CancelAdminChange => {
RebalancerAdminMsg::CancelAdminChange {} => {
let event = ValenceEvent::RebalancerCancelAdminChange {};
Ok(cancel_admin_change(deps, &info)?.add_event(event.into()))
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/services_manager/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ mod admin {
};
Ok(start_admin_change(deps, &info, &addr, expiration)?.add_event(event.into()))
}
ServicesManagerAdminMsg::CancelAdminChange => {
ServicesManagerAdminMsg::CancelAdminChange {} => {
let event = ValenceEvent::ServicesManagerCancelAdminChange {};
Ok(cancel_admin_change(deps, &info)?.add_event(event.into()))
}
Expand Down
2 changes: 1 addition & 1 deletion packages/valence-package/src/msgs/core_execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub enum ServicesManagerAdminMsg {
addr: String,
expiration: Expiration,
},
CancelAdminChange,
CancelAdminChange {},
Withdraw {
denom: String,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/valence-package/src/services/rebalancer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{error::ValenceError, helpers::OptionalField};
pub enum RebalancerExecuteMsg<A = RebalancerData, B = RebalancerUpdateData> {
Admin(RebalancerAdminMsg),
SystemRebalance { limit: Option<u64> },
ApproveAdminChange,
ApproveAdminChange {},
}

#[cw_serde]
Expand Down Expand Up @@ -50,7 +50,7 @@ pub enum RebalancerAdminMsg {
addr: String,
expiration: Expiration,
},
CancelAdminChange,
CancelAdminChange {},
}

#[cw_serde]
Expand Down
2 changes: 1 addition & 1 deletion tests/rust-tests/src/test_service_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ fn test_update_admin_cancel() {
suite.admin.clone(),
suite.manager_addr.clone(),
&valence_package::msgs::core_execute::ServicesManagerExecuteMsg::Admin(
valence_package::msgs::core_execute::ServicesManagerAdminMsg::CancelAdminChange,
valence_package::msgs::core_execute::ServicesManagerAdminMsg::CancelAdminChange {},
),
&[],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ fn test_update_admin_cancel() {
suite.admin.clone(),
suite.auctions_manager_addr.clone(),
&auctions_manager::msg::ExecuteMsg::Admin(Box::new(
auctions_manager::msg::AdminMsgs::CancelAdminChange,
auctions_manager::msg::AdminMsgs::CancelAdminChange {},
)),
&[],
)
Expand Down
12 changes: 6 additions & 6 deletions tests/rust-tests/src/tests_rebalancer/test_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ fn test_update_admin_start() {
&valence_package::services::rebalancer::RebalancerExecuteMsg::ApproveAdminChange::<
Empty,
Empty,
>,
> {},
&[],
)
.unwrap_err();
Expand Down Expand Up @@ -464,7 +464,7 @@ fn test_update_admin_start() {
&valence_package::services::rebalancer::RebalancerExecuteMsg::ApproveAdminChange::<
Empty,
Empty,
>,
> {},
&[],
)
.unwrap();
Expand Down Expand Up @@ -499,7 +499,7 @@ fn test_update_admin_cancel() {
suite.admin.clone(),
suite.rebalancer_addr.clone(),
&valence_package::services::rebalancer::RebalancerExecuteMsg::Admin::<Empty, Empty>(
valence_package::services::rebalancer::RebalancerAdminMsg::CancelAdminChange,
valence_package::services::rebalancer::RebalancerAdminMsg::CancelAdminChange {},
),
&[],
)
Expand All @@ -514,7 +514,7 @@ fn test_update_admin_cancel() {
&valence_package::services::rebalancer::RebalancerExecuteMsg::ApproveAdminChange::<
Empty,
Empty,
>,
> {},
&[],
)
.unwrap_err();
Expand Down Expand Up @@ -550,7 +550,7 @@ fn test_update_admin_fails() {
&valence_package::services::rebalancer::RebalancerExecuteMsg::ApproveAdminChange::<
Empty,
Empty,
>,
> {},
&[],
)
.unwrap_err();
Expand All @@ -566,7 +566,7 @@ fn test_update_admin_fails() {
&valence_package::services::rebalancer::RebalancerExecuteMsg::ApproveAdminChange::<
Empty,
Empty,
>,
> {},
&[],
)
.unwrap_err();
Expand Down
Loading