Skip to content

Commit

Permalink
feat(assembly): refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
maksk7 committed Feb 1, 2022
1 parent bdb9f40 commit 7e4f736
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions contracts/assembly/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,6 @@ pub fn query_proposal_votes(deps: Deps, proposal_id: u64) -> StdResult<ProposalV
pub fn calc_voting_power(deps: &DepsMut, sender: String, block: u64) -> StdResult<Uint128> {
let config = CONFIG.load(deps.storage)?;

let mut total = Uint128::zero();

let xastro_amount: BalanceResponse = deps.querier.query_wasm_smart(
config.xastro_token_addr,
&XAstroTokenQueryMsg::BalanceAt {
Expand All @@ -691,7 +689,7 @@ pub fn calc_voting_power(deps: &DepsMut, sender: String, block: u64) -> StdResul
},
)?;

total = total.checked_add(xastro_amount.balance)?;
let mut total = xastro_amount.balance;

let locked_amount: AllocationResponse = deps.querier.query_wasm_smart(
config.builder_unlock_addr,
Expand Down

0 comments on commit 7e4f736

Please sign in to comment.