Skip to content

Commit

Permalink
chore: filter bitcoin vouts in binding status (#2173)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz committed Sep 4, 2024
1 parent 9150251 commit 4da9cd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/v2/bitcoin_addresses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def udt_accounts

cell_types = %w(udt xudt xudt_compatible)
cell_outputs = CellOutput.live.includes(:bitcoin_vout).where(cell_outputs: { address_id: address_ids, cell_type: cell_types }).
where.not(bitcoin_vouts: { status: "unbound" }).group(:cell_type, :type_hash).sum(:udt_amount)
where.not(bitcoin_vouts: { status: ["unbound", "binding"] }).group(:cell_type, :type_hash).sum(:udt_amount)

udt_accounts = cell_outputs.map do |k, v|
udt = Udt.find_by(type_hash: k[1], published: true)
Expand Down

0 comments on commit 4da9cd3

Please sign in to comment.