Skip to content

Commit

Permalink
Merge pull request multiversx#1399 from multiversx/development
Browse files Browse the repository at this point in the history
Development to main
  • Loading branch information
dragos-rebegea authored Nov 28, 2024
2 parents 83876fb + f8ec9c1 commit dbec8bd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/endpoints/accounts/account.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class AccountController {
@UseInterceptors(DeepHistoryInterceptor)
@ApiOperation({ summary: 'Account details', description: 'Returns account details for a given address' })
@ApiQuery({ name: 'withGuardianInfo', description: 'Returns guardian data for a given address', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: false })
@ApiQuery({ name: 'timestamp', description: 'Retrieve entry from timestamp', required: false, type: Number })
@ApiOkResponse({ type: AccountDetailed })
async getAccountDetails(
Expand Down Expand Up @@ -615,7 +615,7 @@ export class AccountController {
@ApiQuery({ name: 'withScamInfo', description: 'Include scam info in the response', required: false, type: Boolean })
@ApiQuery({ name: 'computeScamInfo', description: 'Compute scam info in the response', required: false, type: Boolean })
@ApiQuery({ name: 'excludeMetaESDT', description: 'Exclude NFTs of type "MetaESDT" in the response', required: false, type: Boolean })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: false })
@ApiQuery({ name: 'isScam', description: 'Filter by scam status', required: false, type: Boolean })
@ApiQuery({ name: 'scamType', description: 'Filter by type (scam/potentialScam)', required: false })
@ApiQuery({ name: 'timestamp', description: 'Retrieve entry from timestamp', required: false, type: Number })
Expand Down Expand Up @@ -749,7 +749,7 @@ export class AccountController {
@Get("/accounts/:address/nfts/:nft")
@UseInterceptors(DeepHistoryInterceptor)
@ApiOperation({ summary: 'Account NFT/SFT token details', description: 'Returns details about a specific fungible token for a given address' })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: false })
@ApiQuery({ name: 'extract', description: 'Extract a specific field', required: false })
@ApiQuery({ name: 'timestamp', description: 'Retrieve entry from timestamp', required: false, type: Number })
@ApiOkResponse({ type: NftAccount })
Expand Down Expand Up @@ -851,7 +851,7 @@ export class AccountController {
@ApiQuery({ name: 'status', description: 'Status of the transaction (success / pending / invalid / fail)', required: false, enum: TransactionStatus })
@ApiQuery({ name: 'function', description: 'Filter transactions by function name', required: false })
@ApiQuery({ name: 'order', description: 'Sort order (asc/desc)', required: false, enum: SortOrder })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: false })
@ApiQuery({ name: 'before', description: 'Before timestamp', required: false })
@ApiQuery({ name: 'after', description: 'After timestamp', required: false })
@ApiQuery({ name: 'round', description: 'Round number', required: false })
Expand Down Expand Up @@ -986,7 +986,7 @@ export class AccountController {
@ApiQuery({ name: 'before', description: 'Before timestamp', required: false })
@ApiQuery({ name: 'after', description: 'After timestamp', required: false })
@ApiQuery({ name: 'round', description: 'Round number', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: false })
@ApiQuery({ name: 'relayer', description: 'Address of the relayer', 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 })
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/tokens/token.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export class TokenController {
@ApiQuery({ name: 'before', description: 'Before timestamp', required: false })
@ApiQuery({ name: 'after', description: 'After timestamp', required: false })
@ApiQuery({ name: 'round', description: 'Filter by round number', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: 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 Down
4 changes: 4 additions & 0 deletions src/endpoints/tokens/token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ export class TokenService {
...esdt,
};

if (esdt.type === '') { // empty type can come from gateway
tokenWithBalance.type = token.type;
}

tokensWithBalance.push(tokenWithBalance);
}

Expand Down
4 changes: 2 additions & 2 deletions src/endpoints/transactions/transaction.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class TransactionController {
@ApiQuery({ name: 'after', description: 'After timestamp', required: false })
@ApiQuery({ name: 'round', description: 'Round number', required: false })
@ApiQuery({ name: 'order', description: 'Sort order (asc/desc)', required: false, enum: SortOrder })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: false })
@ApiQuery({ name: 'from', description: 'Number of items to skip for the result set', required: false })
@ApiQuery({ name: 'size', description: 'Number of items to retrieve', required: false })
@ApiQuery({ name: 'condition', description: 'Condition for elastic search queries', required: false, deprecated: true })
Expand Down Expand Up @@ -193,7 +193,7 @@ export class TransactionController {
@ApiOperation({ summary: 'Transaction details', description: 'Return transaction details for a given transaction hash' })
@ApiOkResponse({ type: TransactionDetailed })
@ApiNotFoundResponse({ description: 'Transaction not found' })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: false })
@ApiQuery({ name: 'withActionTransferValue', description: 'Returns value in USD and EGLD for transferred tokens within the action attribute', required: false })
async getTransaction(
@Param('txHash', ParseTransactionHashPipe) txHash: string,
Expand Down
2 changes: 1 addition & 1 deletion src/endpoints/transfers/transfer.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class TransferController {
@ApiQuery({ name: 'hashes', description: 'Filter by a comma-separated list of transfer hashes', required: false })
@ApiQuery({ name: 'status', description: 'Status of the transaction (success / pending / invalid / fail)', required: false, enum: TransactionStatus })
@ApiQuery({ name: 'order', description: 'Sort order (asc/desc)', required: false, enum: SortOrder })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false })
@ApiQuery({ name: 'fields', description: 'List of fields to filter by', required: false, isArray: true, style: 'form', explode: false })
@ApiQuery({ name: 'before', description: 'Before timestamp', required: false })
@ApiQuery({ name: 'after', description: 'After timestamp', required: false })
@ApiQuery({ name: 'round', description: 'Round number', required: false })
Expand Down

0 comments on commit dbec8bd

Please sign in to comment.