This commit is contained in:
yystopf 2023-03-10 15:48:41 +08:00
parent 3858d9c482
commit 01b80619e4
1 changed files with 1 additions and 1 deletions

View File

@ -48,6 +48,6 @@ module Api::V1::Issues::Concerns::Checkable
def check_blockchain_token_num(user_id, project_id, blockchain_token_num, now_blockchain_token_num=0)
left_blockchain_token_num = Blockchain::BalanceQueryOneProject.call({"user_id": user_id, "project_id": project_id}) rescue 0
raise ApplicationService::Error, "项目Token不足。" if blockchain_token_num.to_i > (left_blockchain_token_num+now_blockchain_token_num).to_i
raise ApplicationService::Error, "用户Token不足。" if blockchain_token_num.to_i > (left_blockchain_token_num+now_blockchain_token_num).to_i
end
end