From b8a03b0fbd46b0fdfe7bcb9c41346b10983c1e3e Mon Sep 17 00:00:00 2001 From: Miles Zhang Date: Fri, 15 Mar 2024 18:15:24 +0800 Subject: [PATCH] feat: add hash_type to contract_resource_distributed api (#1680) Signed-off-by: Miles Zhang --- app/controllers/api/v2/statistics_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v2/statistics_controller.rb b/app/controllers/api/v2/statistics_controller.rb index adc8dcdbb..de2fbbe2d 100644 --- a/app/controllers/api/v2/statistics_controller.rb +++ b/app/controllers/api/v2/statistics_controller.rb @@ -18,8 +18,9 @@ def contract_resource_distributed { name: contract.name, code_hash: contract.code_hash, + hash_type: contract.hash_type, tx_count: contract.ckb_transactions_count, - capacity_amount: contract.total_referring_cells_capacity, + capacity_amount: (contract.total_referring_cells_capacity / 10**8).truncate(8), address_count: contract.addresses_count, } end