Skip to content

Commit

Permalink
[FIX-9] Redundant query function
Browse files Browse the repository at this point in the history
  • Loading branch information
iboss-ptk committed Sep 20, 2023
1 parent 3891f73 commit 91b0f24
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions contracts/transmuter/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,17 +524,6 @@ impl Transmuter<'_> {
})
}

#[msg(query)]
pub(crate) fn get_alloyed_denom(
&self,
ctx: (Deps, Env),
) -> Result<GetAlloyedDenomResponse, ContractError> {
let (deps, _env) = ctx;
Ok(GetAlloyedDenomResponse {
alloyed_denom: self.alloyed_asset.get_alloyed_denom(deps.storage)?,
})
}

#[msg(query)]
pub(crate) fn get_swap_fee(
&self,
Expand Down Expand Up @@ -857,11 +846,6 @@ pub struct GetShareDenomResponse {
pub share_denom: String,
}

#[cw_serde]
pub struct GetAlloyedDenomResponse {
pub alloyed_denom: String,
}

#[cw_serde]
pub struct GetSwapFeeResponse {
pub swap_fee: Decimal,
Expand Down Expand Up @@ -2007,17 +1991,6 @@ mod tests {

let share_denom: GetShareDenomResponse = from_binary(&res).unwrap();
assert_eq!(share_denom.share_denom, "usomoion");

// Query the alloyed denom
let res = query(
deps.as_ref(),
env,
ContractQueryMsg::Transmuter(QueryMsg::GetAlloyedDenom {}),
)
.unwrap();

let alloyed_denom: GetAlloyedDenomResponse = from_binary(&res).unwrap();
assert_eq!(alloyed_denom.alloyed_denom, "usomoion");
}

#[test]
Expand Down

0 comments on commit 91b0f24

Please sign in to comment.