From 1ee0fb0ad84a4e7e1922d522ab4d6e6489e314f1 Mon Sep 17 00:00:00 2001 From: Aydar Farrakhov Date: Thu, 8 Feb 2024 15:02:48 +0300 Subject: [PATCH] indexer fixes --- .../src/processing/storage/local.storage.ts | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/indexer/src/processing/storage/local.storage.ts b/indexer/src/processing/storage/local.storage.ts index 5f74643..7afd696 100644 --- a/indexer/src/processing/storage/local.storage.ts +++ b/indexer/src/processing/storage/local.storage.ts @@ -203,15 +203,19 @@ export class LocalStorage implements IStorage { } private async loadMarketplace() { - this.marketplace = await this.store.findOne(Marketplace, { where: {} }); - if (!this.marketplace!.address) { - this.marketplace!.address = config.marketplaceProgram; - } - if (!this.marketplace!.metadata) { - this.marketplace!.metadata = marketplaceMeta; - } - if (!this.marketplace!.nftMetadata) { - this.marketplace!.nftMetadata = nftMeta; + try { + this.marketplace = await this.store.findOne(Marketplace, { where: {} }); + if (!this.marketplace!.address) { + this.marketplace!.address = config.marketplaceProgram; + } + if (!this.marketplace!.metadata) { + this.marketplace!.metadata = marketplaceMeta; + } + if (!this.marketplace!.nftMetadata) { + this.marketplace!.nftMetadata = nftMeta; + } + } catch (e) { + console.error(e); } }