diff --git a/packages/plugins/packages/payloadset/packages/image-thumbnail/packages/diviner/src/Diviner/Diviner.ts b/packages/plugins/packages/payloadset/packages/image-thumbnail/packages/diviner/src/Diviner/Diviner.ts index 4a7c4ab23bd..6745527446f 100644 --- a/packages/plugins/packages/payloadset/packages/image-thumbnail/packages/diviner/src/Diviner/Diviner.ts +++ b/packages/plugins/packages/payloadset/packages/image-thumbnail/packages/diviner/src/Diviner/Diviner.ts @@ -73,12 +73,14 @@ export class ImageThumbnailDiviner({ schema: BoundWitnessDivinerQuerySchema }).fields({ - limit: this.payloadDivinerLimit, - offset, - order: 'asc', - payload_schemas: [ImageThumbnailSchema, TimestampSchema], - }) + const query = new PayloadBuilder({ schema: BoundWitnessDivinerQuerySchema }) + .fields({ + limit: this.payloadDivinerLimit, + offset, + order: 'asc', + payload_schemas: [ImageThumbnailSchema, TimestampSchema], + }) + .build() const batch = await boundWitnessDiviner.divine([query]) if (batch.length === 0) return // Find all the indexable hashes in this batch @@ -216,13 +218,15 @@ export class ImageThumbnailDiviner { let hash: string = '' const diviner = await this.getBoundWitnessDivinerForStore('stateStore') - const query = new PayloadBuilder({ schema: BoundWitnessDivinerQuerySchema }).fields({ - address: this.account.address, - limit: 1, - offset: 0, - order: 'desc', - payload_schemas: [ModuleStateSchema], - }) + const query = new PayloadBuilder({ schema: BoundWitnessDivinerQuerySchema }) + .fields({ + address: this.account.address, + limit: 1, + offset: 0, + order: 'desc', + payload_schemas: [ModuleStateSchema], + }) + .build() const boundWitnesses = await diviner.divine([query]) if (boundWitnesses.length > 0) { const boundWitness = boundWitnesses[0]