Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mauro Lacy <maurolacy@users.noreply.github.com>
  • Loading branch information
JakeHartnell and maurolacy authored May 2, 2023
1 parent e4c52f8 commit 10eebf2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contracts/vault/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl VaultContract<'_> {
) -> Result<Response, ContractError> {
let config = Config {
denom,
// We set this in reply, so proper once the
// We set this in reply, so proper once the reply message completes successfully
local_staking: Addr::unchecked(""),
};
self.config.save(ctx.deps.storage, &config)?;
Expand Down
4 changes: 2 additions & 2 deletions contracts/vault/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ pub struct StakingInitInfo {
pub admin: Option<String>,
/// Code id used to instantiate the local staking contract
pub code_id: u64,
/// msg is the JSON-encoded InstantiateMsg struct (as raw Binary)
/// JSON-encoded local staking `InstantiateMsg` struct (as raw `Binary`)
pub msg: Binary,
/// A human-readable label for the contract (will use a default if not provided)
/// A human-readable label for the local staking contract (will use a default if not provided)
pub label: Option<String>,
}

Expand Down
2 changes: 0 additions & 2 deletions packages/apis/src/local_staking_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ pub struct MaxSlashResponse {
pub max_slash: Decimal,
}

// TODO: question - staking should know which is vault, vault should know what is local staking...
// How to best handle the chicken and egg problem (2 step init with Option?)

/// This is the interface to any local staking contract needed by the vault contract.
/// Users will need to use the custom methods to actually manage funds
Expand Down
3 changes: 0 additions & 3 deletions packages/apis/src/vault_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ use cosmwasm_std::{Response, StdError, Uint128};
use sylvia::types::ExecCtx;
use sylvia::{interface, schemars};

// TODO: question - local staking should know which is vault, vault should know what is local staking...
// How to best handle the chicken and egg problem (2 step init with Option?)

/// This is the interface to the vault contract needed by staking contracts to release funds.
/// Users will need to use the other contract methods to actually manage funds
#[interface]
Expand Down

0 comments on commit 10eebf2

Please sign in to comment.