Skip to content

Commit

Permalink
fix after code refactor (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadoySV authored Feb 1, 2022
1 parent 7f385ac commit cc4fa43
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions contracts/builder_unlock/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ fn execute_create_allocations(
let mut state = STATE.may_load(deps.storage)?.unwrap_or_default();

if deps.api.addr_validate(&creator)? != config.owner {
return Err(StdError::generic_err("Only the contract owner can create allocations"));
return Err(StdError::generic_err(
"Only the contract owner can create allocations",
));
}

if deposit_token != config.astro_token {
Expand Down Expand Up @@ -213,7 +215,9 @@ fn execute_transfer_ownership(
let mut config = CONFIG.load(deps.storage)?;

if info.sender != config.owner {
return Err(StdError::generic_err("Only the current owner can transfer ownership"));
return Err(StdError::generic_err(
"Only the current owner can transfer ownership",
));
}

if new_owner.is_some() {
Expand Down
4 changes: 2 additions & 2 deletions contracts/builder_unlock/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ fn test_transfer_ownership() {
.unwrap_err();
assert_eq!(
err.to_string(),
"Generic error: Only owner can transfer ownership"
"Generic error: Only the current owner can transfer ownership"
);

// ###### SUCCESSFULLY TRANSFERS OWNERSHIP :: UPDATES OWNER ######
Expand Down Expand Up @@ -271,7 +271,7 @@ fn test_create_allocations() {
.unwrap_err();
assert_eq!(
err.to_string(),
"Generic error: Only owner can create allocations"
"Generic error: Only the contract owner can create allocations"
);

// ###### ERROR :: Only ASTRO can be can be deposited ######
Expand Down
2 changes: 1 addition & 1 deletion packages/astroport-governance/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub mod assembly;
pub mod asset;
pub mod astro_vesting;
pub mod builder_unlock;
pub mod querier;

#[allow(clippy::all)]
Expand Down
4 changes: 2 additions & 2 deletions scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Astroport builder unlock deployment scripts",
"name": "scripts",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
Expand All @@ -13,4 +13,4 @@
"ts-node": "^10.1.0",
"typescript": "^4.3.5"
}
}
}

0 comments on commit cc4fa43

Please sign in to comment.