Initial commit
This commit is contained in:
18
bin/check_member_balance.rb
Normal file
18
bin/check_member_balance.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
email = ENV.fetch('EMAIL', 'admin@barong.io')
|
||||
|
||||
member = Member.find_by(email: email)
|
||||
unless member
|
||||
puts 'STATUS=NO_MEMBER'
|
||||
exit 1
|
||||
end
|
||||
|
||||
puts "STATUS=OK uid=#{member.uid} id=#{member.id}"
|
||||
|
||||
%w[usdt btc cad].each do |currency|
|
||||
account = member.accounts.find_by(currency_id: currency)
|
||||
next unless account
|
||||
|
||||
puts "ACCOUNT #{currency} balance=#{account.balance} locked=#{account.locked}"
|
||||
end
|
||||
Reference in New Issue
Block a user