Skip to content

Commit

Permalink
Update sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
perekopskiy committed Oct 6, 2021
1 parent 28fa1fd commit 1022422
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions sdk/zksync.js/src/rest-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,21 @@ export class RestProvider extends SyncProvider {

async accountTxsDetailed(
idOrAddress: number | types.Address,
paginationQuery: types.PaginationQuery<string>
paginationQuery: types.PaginationQuery<string>,
token?: types.TokenLike
): Promise<Response<types.Paginated<types.ApiTransaction, string>>> {
return await this.get(
`${this.address}/accounts/${idOrAddress}/transactions?from=${paginationQuery.from}` +
`&limit=${paginationQuery.limit}&direction=${paginationQuery.direction}`
);
let url = `${this.address}/accounts/${idOrAddress}/transactions?from=${paginationQuery.from}` +
`&limit=${paginationQuery.limit}&direction=${paginationQuery.direction}`;
if(token) url += `&token=${token}`;
return await this.get(url);
}

async accountTxs(
idOrAddress: number | types.Address,
paginationQuery: types.PaginationQuery<string>
paginationQuery: types.PaginationQuery<string>,
token?: types.TokenLike
): Promise<types.Paginated<types.ApiTransaction, string>> {
return this.parseResponse(await this.accountTxsDetailed(idOrAddress, paginationQuery));
return this.parseResponse(await this.accountTxsDetailed(idOrAddress, paginationQuery, token));
}

async accountPendingTxsDetailed(
Expand Down

0 comments on commit 1022422

Please sign in to comment.