更改:贡献占比区块链相关需要全局开启

This commit is contained in:
yystopf 2023-03-30 14:34:17 +08:00
parent 96c32c072a
commit 4288649528
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ module Watchable
(count_user * 1.0 / (count_all + 0.000000001)).round(5)
end
if (@project['use_blockchain'] == true or @project['use_blockchain'] == 1) && @user.id.present?
if Site.has_blockchain? && (@project['use_blockchain'] == true or @project['use_blockchain'] == 1) && @user.id.present?
balance_user = Blockchain::BalanceQueryOneProject.call({"user_id": @user.id, "project_id": @project.id})
balance_all = Blockchain::RepoBasicInfo.call({"project_id": @project.id})["cur_supply"]
score = cal_perc(balance_user, balance_all)