Skip to content

Commit

Permalink
Merge pull request #1745 from nervosnetwork/testnet
Browse files Browse the repository at this point in the history
Deploy to mainnet
  • Loading branch information
rabbitz authored Apr 3, 2024
2 parents a0e4ae8 + 23c9ebc commit e50a32d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/models/concerns/ckb_transactions/display_cells.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def normal_tx_display_inputs(cell_inputs_for_display)
if previous_cell_output.udt?
display_input.merge!(attributes_for_udt_cell(previous_cell_output))
end
if previous_cell_output.xudt?
display_input.merge!(attributes_for_xudt_cell(previous_cell_output))
end
if previous_cell_output.cell_type.in?(%w(m_nft_issuer m_nft_class m_nft_token))
display_input.merge!(attributes_for_m_nft_cell(previous_cell_output))
end
Expand Down Expand Up @@ -134,6 +137,7 @@ def normal_tx_display_outputs(cell_outputs_for_display)
}

display_output.merge!(attributes_for_udt_cell(output)) if output.udt?
display_output.merge!(attributes_for_xudt_cell(output)) if output.xudt?
display_output.merge!(attributes_for_cota_registry_cell(output)) if output.cota_registry?
display_output.merge!(attributes_for_cota_regular_cell(output)) if output.cota_regular?
if output.cell_type.in?(%w(m_nft_issuer m_nft_class m_nft_token))
Expand Down Expand Up @@ -215,6 +219,11 @@ def attributes_for_rgb_cell(rgb_cell)
{ rgb_info: rgb_cell.rgb_info }
end

def attributes_for_xudt_cell(xudt_cell)
info = CkbUtils.hash_value_to_s(xudt_cell.udt_info)
{ xudt_info: info, extra_info: info }
end

def hex_since(int_since_value)
"0x#{int_since_value.to_s(16).rjust(16, '0')}"
end
Expand Down

0 comments on commit e50a32d

Please sign in to comment.