Skip to content

Commit

Permalink
fix(provider): fix indexing of provider attribute unsign txs
Browse files Browse the repository at this point in the history
  • Loading branch information
Redm4x committed Nov 29, 2024
1 parent 2da4828 commit f37dcd7
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions apps/indexer/src/indexers/akashStatsIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -939,14 +939,24 @@ export class AkashStatsIndexer extends Indexer {
height: number,
blockGroupTransaction: DbTransaction
) {
await ProviderAttributeSignature.destroy({
where: {
provider: decodedMessage.owner,
auditor: decodedMessage.auditor,
key: { [Op.in]: decodedMessage.keys }
},
transaction: blockGroupTransaction
});
if (decodedMessage.keys.length > 0) {
await ProviderAttributeSignature.destroy({
where: {
provider: decodedMessage.owner,
auditor: decodedMessage.auditor,
key: { [Op.in]: decodedMessage.keys }
},
transaction: blockGroupTransaction
});
} else {
await ProviderAttributeSignature.destroy({
where: {
provider: decodedMessage.owner,
auditor: decodedMessage.auditor
},
transaction: blockGroupTransaction
});
}
}

seed(): Promise<void> {
Expand Down

0 comments on commit f37dcd7

Please sign in to comment.