From 5e65c83167d589dfd97add1c4b9b9f6fbd8e714d Mon Sep 17 00:00:00 2001 From: Miles Zhang Date: Mon, 12 Aug 2024 10:32:35 +0800 Subject: [PATCH] refactor: use fast_page to query contract's tx (#2128) --- app/controllers/api/v2/scripts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v2/scripts_controller.rb b/app/controllers/api/v2/scripts_controller.rb index eb7b4244d..4b83752eb 100644 --- a/app/controllers/api/v2/scripts_controller.rb +++ b/app/controllers/api/v2/scripts_controller.rb @@ -21,7 +21,7 @@ def ckb_transactions if @contract.ckb_transactions_count.zero? CkbTransaction.none else - @contract.ckb_transactions.order(block_number: :desc).page(@page).per(@page_size) + @contract.ckb_transactions.order(block_number: :desc).page(@page).per(@page_size).fast_page end end