Skip to content

Commit

Permalink
feat: add cell_index to display input
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Feb 4, 2020
1 parent d340886 commit c700eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/ckb_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def normal_tx_display_inputs(previews)
cell_inputs_for_display = previews ? cell_inputs.order(:id).limit(10) : cell_inputs.order(:id)
cell_inputs_for_display.each_with_index.map do |cell_input, index|
previous_cell_output = cell_input.previous_cell_output
display_input = { id: previous_cell_output.id, from_cellbase: false, capacity: previous_cell_output.capacity, address_hash: previous_cell_output.address_hash, generated_tx_hash: previous_cell_output.generated_by.tx_hash, cell_type: previous_cell_output.cell_type }
display_input = { id: previous_cell_output.id, from_cellbase: false, capacity: previous_cell_output.capacity, address_hash: previous_cell_output.address_hash, generated_tx_hash: previous_cell_output.generated_by.tx_hash, cell_index: previous_cell_output.cell_index, cell_type: previous_cell_output.cell_type }
display_input.merge!(attributes_for_dao_input(previous_cell_output)) if previous_cell_output.nervos_dao_withdrawing?
display_input.merge!(attributes_for_dao_input(cell_outputs[index], false)) if previous_cell_output.nervos_dao_deposit?

Expand Down

0 comments on commit c700eea

Please sign in to comment.