@@ -29,7 +29,6 @@ import { AccountRepository } from './AccountRepository';
2929import { Http } from './Http' ;
3030import { QueryParams } from './QueryParams' ;
3131import { CreateTransactionFromDTO } from './transaction/CreateTransactionFromDTO' ;
32- import { TransactionSearchCriteria } from './TransactionSearchCriteria' ;
3332
3433/**
3534 * Account http repository.
@@ -118,13 +117,13 @@ export class AccountHttp extends Http implements AccountRepository {
118117 * @param queryParams - (Optional) Query params
119118 * @returns Observable<Transaction[]>
120119 */
121- public getAccountTransactions ( address : Address , queryParams ?: TransactionSearchCriteria ) : Observable < Transaction [ ] > {
120+ public getAccountTransactions ( address : Address , queryParams ?: QueryParams ) : Observable < Transaction [ ] > {
122121 return observableFrom (
123122 this . accountRoutesApi . getAccountConfirmedTransactions ( address . plain ( ) ,
124- this . transactionSearchCriteria ( queryParams ) . pageSize ,
125- this . transactionSearchCriteria ( queryParams ) . id ,
126- this . transactionSearchCriteria ( queryParams ) . ordering ,
127- this . transactionSearchCriteria ( queryParams ) . type ) ) . pipe (
123+ this . queryParams ( queryParams ) . pageSize ,
124+ this . queryParams ( queryParams ) . id ,
125+ this . queryParams ( queryParams ) . ordering ,
126+ this . queryParams ( queryParams ) . type ) ) . pipe (
128127 map ( ( { body} ) => body . map ( ( transactionDTO ) => {
129128 return CreateTransactionFromDTO ( transactionDTO ) ;
130129 } ) ) ,
@@ -139,13 +138,13 @@ export class AccountHttp extends Http implements AccountRepository {
139138 * @param queryParams - (Optional) Query params
140139 * @returns Observable<Transaction[]>
141140 */
142- public getAccountIncomingTransactions ( address : Address , queryParams ?: TransactionSearchCriteria ) : Observable < Transaction [ ] > {
141+ public getAccountIncomingTransactions ( address : Address , queryParams ?: QueryParams ) : Observable < Transaction [ ] > {
143142 return observableFrom (
144143 this . accountRoutesApi . getAccountIncomingTransactions ( address . plain ( ) ,
145- this . transactionSearchCriteria ( queryParams ) . pageSize ,
146- this . transactionSearchCriteria ( queryParams ) . id ,
147- this . transactionSearchCriteria ( queryParams ) . ordering ) ,
148- this . transactionSearchCriteria ( queryParams ) . type ) . pipe (
144+ this . queryParams ( queryParams ) . pageSize ,
145+ this . queryParams ( queryParams ) . id ,
146+ this . queryParams ( queryParams ) . ordering ) ,
147+ this . queryParams ( queryParams ) . type ) . pipe (
149148 map ( ( { body} ) => body . map ( ( transactionDTO ) => {
150149 return CreateTransactionFromDTO ( transactionDTO ) ;
151150 } ) ) ,
@@ -160,13 +159,13 @@ export class AccountHttp extends Http implements AccountRepository {
160159 * @param queryParams - (Optional) Query params
161160 * @returns Observable<Transaction[]>
162161 */
163- public getAccountOutgoingTransactions ( address : Address , queryParams ?: TransactionSearchCriteria ) : Observable < Transaction [ ] > {
162+ public getAccountOutgoingTransactions ( address : Address , queryParams ?: QueryParams ) : Observable < Transaction [ ] > {
164163 return observableFrom (
165164 this . accountRoutesApi . getAccountOutgoingTransactions ( address . plain ( ) ,
166- this . transactionSearchCriteria ( queryParams ) . pageSize ,
167- this . transactionSearchCriteria ( queryParams ) . id ,
168- this . transactionSearchCriteria ( queryParams ) . ordering ) ,
169- this . transactionSearchCriteria ( queryParams ) . type ) . pipe (
165+ this . queryParams ( queryParams ) . pageSize ,
166+ this . queryParams ( queryParams ) . id ,
167+ this . queryParams ( queryParams ) . ordering ) ,
168+ this . queryParams ( queryParams ) . type ) . pipe (
170169 map ( ( { body} ) => body . map ( ( transactionDTO ) => {
171170 return CreateTransactionFromDTO ( transactionDTO ) ;
172171 } ) ) ,
@@ -182,13 +181,13 @@ export class AccountHttp extends Http implements AccountRepository {
182181 * @param queryParams - (Optional) Query params
183182 * @returns Observable<Transaction[]>
184183 */
185- public getAccountUnconfirmedTransactions ( address : Address , queryParams ?: TransactionSearchCriteria ) : Observable < Transaction [ ] > {
184+ public getAccountUnconfirmedTransactions ( address : Address , queryParams ?: QueryParams ) : Observable < Transaction [ ] > {
186185 return observableFrom (
187186 this . accountRoutesApi . getAccountUnconfirmedTransactions ( address . plain ( ) ,
188- this . transactionSearchCriteria ( queryParams ) . pageSize ,
189- this . transactionSearchCriteria ( queryParams ) . id ,
190- this . transactionSearchCriteria ( queryParams ) . ordering ) ,
191- this . transactionSearchCriteria ( queryParams ) . type ) . pipe (
187+ this . queryParams ( queryParams ) . pageSize ,
188+ this . queryParams ( queryParams ) . id ,
189+ this . queryParams ( queryParams ) . ordering ) ,
190+ this . queryParams ( queryParams ) . type ) . pipe (
192191 map ( ( { body} ) => body . map ( ( transactionDTO ) => {
193192 return CreateTransactionFromDTO ( transactionDTO ) ;
194193 } ) ) ,
@@ -203,13 +202,13 @@ export class AccountHttp extends Http implements AccountRepository {
203202 * @param queryParams - (Optional) Query params
204203 * @returns Observable<AggregateTransaction[]>
205204 */
206- public getAccountPartialTransactions ( address : Address , queryParams ?: TransactionSearchCriteria ) : Observable < AggregateTransaction [ ] > {
205+ public getAccountPartialTransactions ( address : Address , queryParams ?: QueryParams ) : Observable < AggregateTransaction [ ] > {
207206 return observableFrom (
208207 this . accountRoutesApi . getAccountPartialTransactions ( address . plain ( ) ,
209- this . transactionSearchCriteria ( queryParams ) . pageSize ,
210- this . transactionSearchCriteria ( queryParams ) . id ,
211- this . transactionSearchCriteria ( queryParams ) . ordering ) ,
212- this . transactionSearchCriteria ( queryParams ) . type ) . pipe (
208+ this . queryParams ( queryParams ) . pageSize ,
209+ this . queryParams ( queryParams ) . id ,
210+ this . queryParams ( queryParams ) . ordering ) ,
211+ this . queryParams ( queryParams ) . type ) . pipe (
213212 map ( ( { body} ) => body . map ( ( transactionDTO ) => {
214213 return CreateTransactionFromDTO ( transactionDTO ) as AggregateTransaction ;
215214 } ) ) ,
0 commit comments