更改:贡献占比区块链相关需要全局开启
This commit is contained in:
parent
96c32c072a
commit
4288649528
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue