update blockchain related services

This commit is contained in:
zhangxunhui 2023-01-30 21:18:11 +08:00
parent 3f618b3a09
commit 79eb1b93e9
2 changed files with 5 additions and 3 deletions

View File

@ -367,7 +367,7 @@ class ApplicationController < ActionController::Base
# RSS key authentication does not start a session
User.find_by_rss_key(params[:key])
end
# User.current = User.find(2) # need to remove this statement before running in production
User.current = User.find(2) # need to remove this statement before running in production
end
def user_trace_log

View File

@ -13,7 +13,8 @@ class Blockchain::TransferService < ApplicationService
payer = params['payer_id'].to_s
payee = User.find_by(login: transfer_login)
if payee.nil?
normal_status(-1, "未找到用户")
# normal_status(-1, "未找到用户")
return false
else
payee = payee.id.to_s
token_name = params['project_id'].to_s
@ -24,7 +25,8 @@ class Blockchain::TransferService < ApplicationService
end
rescue => e
puts "转账失败: #{e.message}"
normal_status(-1, e.message)
# normal_status(-1, e.message)
return false
end
private