From 45c26d4f7333fecdf31897537ed25642d743c70e Mon Sep 17 00:00:00 2001 From: Xinyu Li Date: Tue, 21 Jan 2025 14:04:11 -0800 Subject: [PATCH 1/3] chore: set default list txn page size to 1 --- lib/coinbase/constants.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/coinbase/constants.rb b/lib/coinbase/constants.rb index 6d8cc834..3e08ba4a 100644 --- a/lib/coinbase/constants.rb +++ b/lib/coinbase/constants.rb @@ -11,5 +11,5 @@ module Coinbase DEFAULT_PAGE_LIMIT = 100 # The default page limit for transaction paginated API request. - DEFAULT_TRANSACTION_PAGE_LIMIT = 10 + DEFAULT_TRANSACTION_PAGE_LIMIT = 1 end From 68bdf2e1e0b161774cb6586da90f8d628a4a9be5 Mon Sep 17 00:00:00 2001 From: Xinyu Li Date: Tue, 21 Jan 2025 14:14:05 -0800 Subject: [PATCH 2/3] fix test --- spec/support/shared_examples/address_transactions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/shared_examples/address_transactions.rb b/spec/support/shared_examples/address_transactions.rb index 351c5362..1f08e58c 100644 --- a/spec/support/shared_examples/address_transactions.rb +++ b/spec/support/shared_examples/address_transactions.rb @@ -36,7 +36,7 @@ end let(:api) { transaction_history_api } - let(:fetch_params) { ->(page) { [normalized_network_id, address_id, { limit: 10, page: page }] } } + let(:fetch_params) { ->(page) { [normalized_network_id, address_id, { limit: 1, page: page }] } } let(:resource_list_klass) { Coinbase::Client::AddressTransactionList } let(:item_klass) { Coinbase::Transaction } let(:item_initialize_args) { nil } From 24c81eecd5a73b1c536f4f75b88bff61b672bffe Mon Sep 17 00:00:00 2001 From: Xinyu Li Date: Tue, 21 Jan 2025 14:27:54 -0800 Subject: [PATCH 3/3] fix test --- spec/support/shared_examples/address_transactions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/shared_examples/address_transactions.rb b/spec/support/shared_examples/address_transactions.rb index 1f08e58c..5c09eafc 100644 --- a/spec/support/shared_examples/address_transactions.rb +++ b/spec/support/shared_examples/address_transactions.rb @@ -20,7 +20,7 @@ before do allow(transaction_history_api) .to receive(:list_address_transactions) - .with(normalized_network_id, address_id, { limit: 10, page: nil }) + .with(normalized_network_id, address_id, { limit: 1, page: nil }) .and_return(response) end