Skip to content

Commit

Permalink
Do not init total_balance with empty
Browse files Browse the repository at this point in the history
Unnecessary state + issues with frontend
  • Loading branch information
ismellike committed May 13, 2024
1 parent 1cb2940 commit 0372066
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contracts/arena-escrow/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use crate::{
execute,
msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg},
query,
state::{self, DUE, HAS_DISTRIBUTED, INITIAL_DUE, IS_LOCKED, TOTAL_BALANCE},
state::{self, DUE, HAS_DISTRIBUTED, INITIAL_DUE, IS_LOCKED},
ContractError,
};
use cosmwasm_std::{
entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult,
};
use cw2::set_contract_version;
use cw_balance::{BalanceVerified, MemberBalanceUnchecked};
use cw_balance::MemberBalanceUnchecked;

// version info for migration info
pub(crate) const CONTRACT_NAME: &str = "crates.io:arena-escrow";
Expand Down Expand Up @@ -57,7 +57,6 @@ pub fn instantiate_contract(
INITIAL_DUE.save(deps.storage, &member_balance.addr, &member_balance.balance)?;
DUE.save(deps.storage, &member_balance.addr, &member_balance.balance)?;
}
TOTAL_BALANCE.save(deps.storage, &BalanceVerified::new())?;

Ok(())
}
Expand Down

0 comments on commit 0372066

Please sign in to comment.