Skip to content

Commit

Permalink
Merge pull request #11 from hadronlabs-org/fix/burn-schema
Browse files Browse the repository at this point in the history
fix: burn must not be enum
  • Loading branch information
ratik authored Dec 11, 2023
2 parents 9a823fc + d361eaf commit cb5e350
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions contracts/token/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct InstantiateMsg {
#[cosmwasm_schema::cw_serde]
pub enum ExecuteMsg {
Mint { amount: Uint128, receiver: String },
Burn,
Burn {},
}

#[cosmwasm_schema::cw_serde]
Expand Down Expand Up @@ -122,7 +122,7 @@ pub fn execute(

match msg {
ExecuteMsg::Mint { amount, receiver } => mint(deps, amount, receiver),
ExecuteMsg::Burn => burn(deps, info),
ExecuteMsg::Burn {} => burn(deps, info),
}
}

Expand Down
10 changes: 5 additions & 5 deletions contracts/token/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fn burn_zero() {
deps.as_mut(),
mock_env(),
mock_info("core", &[]),
crate::ExecuteMsg::Burn,
crate::ExecuteMsg::Burn {},
)
.unwrap_err();
assert_eq!(
Expand All @@ -257,7 +257,7 @@ fn burn_multiple_coins() {
deps.as_mut(),
mock_env(),
mock_info("core", &[coin(20, "coin1"), coin(10, "denom")]),
crate::ExecuteMsg::Burn,
crate::ExecuteMsg::Burn {},
)
.unwrap_err();
assert_eq!(
Expand All @@ -280,7 +280,7 @@ fn burn_invalid_coin() {
deps.as_mut(),
mock_env(),
mock_info("core", &[coin(20, "coin1")]),
crate::ExecuteMsg::Burn,
crate::ExecuteMsg::Burn {},
)
.unwrap_err();
assert_eq!(
Expand All @@ -305,7 +305,7 @@ fn burn() {
deps.as_mut(),
mock_env(),
mock_info("core", &[coin(140, "denom")]),
crate::ExecuteMsg::Burn,
crate::ExecuteMsg::Burn {},
)
.unwrap();

Expand Down Expand Up @@ -339,7 +339,7 @@ fn burn_stranger() {
deps.as_mut(),
mock_env(),
mock_info("stranger", &[coin(160, "denom")]),
crate::ExecuteMsg::Burn,
crate::ExecuteMsg::Burn {},
)
.unwrap_err();

Expand Down

0 comments on commit cb5e350

Please sign in to comment.