Skip to content

Commit

Permalink
filter by relayer address
Browse files Browse the repository at this point in the history
  • Loading branch information
cfaur09 committed Aug 7, 2024
1 parent 9d73384 commit e3a50a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/endpoints/transfers/transfer.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ParseBlockHashPipe, ParseEnumPipe, ParseIntPipe, ParseArrayPipe, ParseAddressArrayPipe, ParseBoolPipe, ApplyComplexity } from "@multiversx/sdk-nestjs-common";
import { ParseBlockHashPipe, ParseEnumPipe, ParseIntPipe, ParseArrayPipe, ParseAddressArrayPipe, ParseBoolPipe, ApplyComplexity, ParseAddressPipe } from "@multiversx/sdk-nestjs-common";
import { Controller, DefaultValuePipe, Get, Query } from "@nestjs/common";
import { ApiExcludeEndpoint, ApiOkResponse, ApiOperation, ApiQuery, ApiTags } from "@nestjs/swagger";
import { QueryPagination } from "src/common/entities/query.pagination";
Expand Down Expand Up @@ -37,6 +37,7 @@ export class TransferController {
@ApiQuery({ name: 'before', description: 'Before timestamp', required: false })
@ApiQuery({ name: 'after', description: 'After timestamp', required: false })
@ApiQuery({ name: 'function', description: 'Filter transfers by function name', required: false })
@ApiQuery({ name: 'relayer', description: 'Filter by relayer address', required: false })
@ApiQuery({ name: 'withScamInfo', description: 'Returns scam information', required: false, type: Boolean })
@ApiQuery({ name: 'withUsername', description: 'Integrates username in assets for all addresses present in the transactions', required: false, type: Boolean })
@ApiQuery({ name: 'withBlockInfo', description: 'Returns sender / receiver block details', required: false, type: Boolean })
Expand All @@ -59,6 +60,7 @@ export class TransferController {
@Query('after', ParseIntPipe) after?: number,
@Query('order', new ParseEnumPipe(SortOrder)) order?: SortOrder,
@Query('fields', ParseArrayPipe) fields?: string[],
@Query('relayer', ParseAddressPipe) relayer?: string,
@Query('withScamInfo', new ParseBoolPipe) withScamInfo?: boolean,
@Query('withUsername', new ParseBoolPipe) withUsername?: boolean,
@Query('withBlockInfo', new ParseBoolPipe) withBlockInfo?: boolean,
Expand All @@ -83,6 +85,7 @@ export class TransferController {
before,
after,
order,
relayer,
}),
new QueryPagination({ from, size }),
options,
Expand Down

0 comments on commit e3a50a7

Please sign in to comment.