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

Services 2281 update nestjs sdk to support elastic v 8 #1072

Merged
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
132 changes: 71 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
"@golevelup/nestjs-rabbitmq": "4.0.0",
"@multiversx/sdk-core": "12.14.0",
"@multiversx/sdk-native-auth-server": "1.0.7",
"@multiversx/sdk-nestjs-cache": "3.1.4",
"@multiversx/sdk-nestjs-common": "3.1.4",
"@multiversx/sdk-nestjs-elastic": "3.1.4",
"@multiversx/sdk-nestjs-http": "3.1.4",
"@multiversx/sdk-nestjs-monitoring": "3.1.4",
"@multiversx/sdk-nestjs-redis": "3.1.4",
"@multiversx/sdk-nestjs-cache": "3.4.1",
"@multiversx/sdk-nestjs-common": "3.4.1",
"@multiversx/sdk-nestjs-elastic": "3.4.1",
"@multiversx/sdk-nestjs-http": "3.4.1",
"@multiversx/sdk-nestjs-monitoring": "3.4.1",
"@multiversx/sdk-nestjs-redis": "3.4.1",
"@multiversx/sdk-network-providers": "^1.2.1",
"@nestjs/apollo": "12.0.7",
"@nestjs/common": "10.2.4",
Expand Down
8 changes: 7 additions & 1 deletion src/modules/asset-history/assets-history.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { AssetsHistoryNftEventService } from './services/assets-history.nft-even
import { AssetsHistoryElrondNftsSwapEventsService } from './services/assets-history.nfts-swap-auction.service';
import { AssetsHistoryCachingService } from './assets-history-caching.service';
import { AssetsHistoryElasticService } from './assets-history-elastic.service';
import { DateUtils } from 'src/utils/date-utils';

@Injectable()
export class AssetsHistoryService {
Expand All @@ -41,7 +42,12 @@ export class AssetsHistoryService {
beforeTimestamp: number,
historyLog: AssetHistoryLog[] = [],
): Promise<AssetHistoryLog[]> {
const elasticLogs = await this.assetsHistoryElasticService.getHistoryLog(collection, nonce, limit, beforeTimestamp);
const elasticLogs = await this.assetsHistoryElasticService.getHistoryLog(
collection,
nonce,
limit,
beforeTimestamp ?? DateUtils.getCurrentTimestamp(),
);

for (let index = 0; index < elasticLogs.length; index++) {
if (historyLog.length === limit) {
Expand Down
Loading