Skip to content

Commit

Permalink
remove balance check in B node
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacky.li committed Feb 29, 2024
1 parent b5b030f commit 43f11e5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions utils/wasm-actor-utils/src/client/api/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ pub async fn check_auth(tapp_id_hex: &str, address: &str, auth_b64: &str) -> Res
None.ok_or_err("not_login").err_into()
}

pub async fn check_user_balance(address: &str) -> Result<()> {
let tid = tappstore_id().await?;
let (_, balance) = state::fetch_tea_balance(tid, address.parse()?).await?;
let (_, credit) = state::fetch_credit(tid, address.parse()?).await?;
if balance < DOLLARS / 1000 && credit < DOLLARS / 1000 {
return Err(Errors::NotEnoughBalanceForTxn.into());
}
pub async fn check_user_balance(_address: &str) -> Result<()> {
// let tid = tappstore_id().await?;
// let (_, balance) = state::fetch_tea_balance(tid, address.parse()?).await?;
// let (_, credit) = state::fetch_credit(tid, address.parse()?).await?;
// if balance < DOLLARS / 1000 && credit < DOLLARS / 1000 {
// return Err(Errors::NotEnoughBalanceForTxn.into());
// }
Ok(())
}

Expand Down

0 comments on commit 43f11e5

Please sign in to comment.