Skip to content

Commit 3a110f6

Browse files
committed
Merge branch 'main' into feature/c2d_docker
2 parents cbc06b5 + 9f2870d commit 3a110f6

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @alexcos20 @bogdanfazakas @jamiehewitt15 @mariacarmina @paulo-ocean
1+
* @alexcos20 @bogdanfazakas @jamiehewitt15 @mariacarmina @paulo-ocean @giurgiur99

src/components/database/ElasticSearchDatabase.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,8 @@ export class ElasticsearchDdoDatabase extends AbstractDdoDatabase {
587587
throw new Error(`Schema for version ${ddo.version} not found`)
588588
}
589589
try {
590+
// avoid issue with nft fields, due to schema
591+
if (ddo?.indexedMetadata?.nft) delete ddo.nft
590592
const validation = await this.validateDDO(ddo)
591593
if (validation === true) {
592594
const response = await this.client.index({
@@ -655,6 +657,8 @@ export class ElasticsearchDdoDatabase extends AbstractDdoDatabase {
655657
throw new Error(`Schema for version ${ddo.version} not found`)
656658
}
657659
try {
660+
// avoid issue with nft fields, due to schema
661+
if (ddo?.indexedMetadata?.nft) delete ddo.nft
658662
const validation = await this.validateDDO(ddo)
659663
if (validation === true) {
660664
const response: any = await this.client.update({

src/components/database/TypenseDatabase.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,8 @@ export class TypesenseDdoDatabase extends AbstractDdoDatabase {
471471
throw new Error(`Schema for version ${ddo.version} not found`)
472472
}
473473
try {
474+
// avoid failure because of schema
475+
if (ddo?.indexedMetadata?.nft) delete ddo.nft
474476
const validation = await this.validateDDO(ddo)
475477
if (validation === true) {
476478
return await this.provider
@@ -532,6 +534,8 @@ export class TypesenseDdoDatabase extends AbstractDdoDatabase {
532534
throw new Error(`Schema for version ${ddo.version} not found`)
533535
}
534536
try {
537+
// avoid issue with nft fields, due to schema
538+
if (ddo?.indexedMetadata?.nft) delete ddo.nft
535539
const validation = await this.validateDDO(ddo)
536540
if (validation === true) {
537541
return await this.provider

src/test/integration/indexer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ describe('Indexer stores a new metadata events and orders.', () => {
348348
const retrievedDDO: any = ddo
349349
if (retrievedDDO) {
350350
expect(retrievedDDO.indexedMetadata.nft).to.not.equal(undefined)
351-
expect(retrievedDDO).to.have.nested.property('nft.state')
351+
expect(retrievedDDO).to.have.nested.property('indexedMetadata.nft.state')
352352
// Expect the result from contract
353353
expect(retrievedDDO.indexedMetadata.nft.state).to.equal(
354354
parseInt(result[2].toString())

0 commit comments

Comments
 (0)