Skip to content

Commit 69f1fb2

Browse files
committed
fix: allow all events returned by native transaction classification
1 parent c29de0f commit 69f1fb2

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/fasset-indexer-api/src/analytics/explorer.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@ import * as Entities from "fasset-indexer-core/entities"
33
import * as ExplorerType from "./interface"
44
import * as SQL from "./utils/raw-sql"
55
import type { EntityManager, ORM } from "fasset-indexer-core/orm"
6-
import { EVENTS } from "fasset-indexer-core/config"
76
import { unixnow } from "src/shared/utils"
87

9-
const VALID_EVENTS = [
10-
EVENTS.ASSET_MANAGER.COLLATERAL_RESERVED,
11-
EVENTS.ASSET_MANAGER.REDEMPTION_REQUESTED,
12-
EVENTS.ASSET_MANAGER.TRANSFER_TO_CORE_VAULT_STARTED,
13-
EVENTS.ASSET_MANAGER.RETURN_FROM_CORE_VAULT_REQUESTED
14-
]
15-
168
const ALL_TRANSACTION_TYPES = Object.values(ExplorerType.TransactionType)
179
.filter(v => typeof v === "number")
1810

@@ -299,7 +291,7 @@ export class ExplorerAnalytics {
299291
}
300292

301293
protected async nativeTransactionClassification(em: EntityManager, hash: string): Promise<ExplorerType.GenericTransactionClassification> {
302-
const logs = await em.find(Entities.EvmLog, { transaction: { hash }, name: { $in: VALID_EVENTS } })
294+
const logs = await em.find(Entities.EvmLog, { transaction: { hash } })
303295
return logs.map(log => ({ transactionHash: hash, eventName: log.name }))
304296
}
305297

0 commit comments

Comments
 (0)