Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn instantiate(
deps: DepsMut<ElysQuery>,
_env: Env,
_info: MessageInfo,
msg: InstantiateMsg,
_msg: InstantiateMsg,
) -> StdResult<Response<ElysMsg>> {
set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
MAX_REPLY_ID.save(deps.storage, &0)?;
Expand Down
2 changes: 1 addition & 1 deletion contracts/trade-shield-contract/src/entry_point/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use semver::Version;
pub fn migrate(
deps: DepsMut<ElysQuery>,
_env: Env,
msg: MigrateMsg,
_msg: MigrateMsg,
) -> StdResult<Response<ElysMsg>> {
let admin = "elys16xffmfa6k45j340cx5zyp66lqvuw62a0neaa7w".to_string();
PARAMS_ADMIN.save(deps.storage, &admin)?;
Expand Down
5 changes: 1 addition & 4 deletions contracts/trade-shield-contract/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ pub fn get_discount(
}

let val = Uint128::from_str(&discount_str)?;
let discount_str = match Decimal::from_atomics(val, 2) {
Ok(resp) => resp,
Err(_) => Decimal::zero(),
};
let discount_str = Decimal::from_atomics(val, 2).unwrap_or_default();
Ok(discount_str)
}

Expand Down
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.79.0" # or "nightly", "beta", or a specific version like "1.56.0"
components = ["rustfmt", "clippy"] # optional, specify additional components
targets = ["wasm32-unknown-unknown"] # optional, specify additional targets