From bfd9b0dd5c2d80a5439078dce7377081e7206a23 Mon Sep 17 00:00:00 2001 From: Keith Date: Tue, 30 Jul 2019 17:32:29 +0800 Subject: [PATCH] feat(neuron-wallet): add default parameters in getAllByKeywords method set the default page no to 1, and the default page size to 15 --- packages/neuron-wallet/src/controllers/transactions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/neuron-wallet/src/controllers/transactions.ts b/packages/neuron-wallet/src/controllers/transactions.ts index d4242b4d92..9589fc6074 100644 --- a/packages/neuron-wallet/src/controllers/transactions.ts +++ b/packages/neuron-wallet/src/controllers/transactions.ts @@ -35,7 +35,7 @@ export default class TransactionsController { public static async getAllByKeywords( params: Controller.Params.TransactionsByKeywords ): Promise & Controller.Params.TransactionsByKeywords>> { - const { pageNo, pageSize, keywords = '', walletID = '' } = params + const { pageNo = 1, pageSize = 15, keywords = '', walletID = '' } = params const addresses = (await AddressesService.allAddressesByWalletId(walletID)).map(addr => addr.address)