Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development to main #1399

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading