diff --git a/src/endpoints/tokens/token.controller.ts b/src/endpoints/tokens/token.controller.ts index 6569b5222..0626d5718 100644 --- a/src/endpoints/tokens/token.controller.ts +++ b/src/endpoints/tokens/token.controller.ts @@ -367,7 +367,7 @@ export class TokenController { @Param('identifier', ParseTokenPipe) identifier: string, @Query('from', new DefaultValuePipe(0), ParseIntPipe) from: number, @Query('size', new DefaultValuePipe(25), ParseIntPipe) size: number, - @Query('sender', ParseAddressPipe) sender?: string, + @Query('sender', ParseAddressArrayPipe) sender?: string[], @Query('receiver', ParseAddressArrayPipe) receiver?: string[], @Query('senderShard', ParseIntPipe) senderShard?: number, @Query('receiverShard', ParseIntPipe) receiverShard?: number, @@ -393,9 +393,8 @@ export class TokenController { } const options = TransactionQueryOptions.applyDefaultOptions(size, { withScamInfo, withUsername, withBlockInfo }); - return await this.transferService.getTransfers(new TransactionFilter({ - sender, + senders: sender, receivers: receiver, token: identifier, functions, @@ -429,7 +428,7 @@ export class TokenController { @ApiQuery({ name: 'after', description: 'After timestamp', required: false }) async getTokenTransfersCount( @Param('identifier', ParseTokenPipe) identifier: string, - @Query('sender', ParseAddressPipe) sender?: string, + @Query('sender', ParseAddressArrayPipe) sender?: string[], @Query('receiver', ParseAddressArrayPipe) receiver?: string[], @Query('senderShard', ParseIntPipe) senderShard?: number, @Query('receiverShard', ParseIntPipe) receiverShard?: number, @@ -450,7 +449,7 @@ export class TokenController { } return await this.transferService.getTransfersCount(new TransactionFilter({ - sender, + senders: sender, receivers: receiver, token: identifier, functions, @@ -468,7 +467,7 @@ export class TokenController { @ApiExcludeEndpoint() async getAccountTransfersCountAlternative( @Param('identifier', ParseTokenPipe) identifier: string, - @Query('sender', ParseAddressPipe) sender?: string, + @Query('sender', ParseAddressArrayPipe) sender?: string[], @Query('receiver', ParseAddressArrayPipe) receiver?: string[], @Query('senderShard', ParseIntPipe) senderShard?: number, @Query('receiverShard', ParseIntPipe) receiverShard?: number, @@ -489,7 +488,7 @@ export class TokenController { } return await this.transferService.getTransfersCount(new TransactionFilter({ - sender, + senders: sender, receivers: receiver, token: identifier, functions,