Skip to content

Commit c6baf29

Browse files
committed
fix: deug and prepare for coston2 deploy
1 parent 0d4cecf commit c6baf29

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

packages/fasset-indexer-core/src/config/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,5 @@ export const BYTES32_LENGTH = 66
123123
export const BLOCK_EXPLORERS = {
124124
coston: 'https://coston-explorer.flare.network',
125125
songbird: 'https://songbird-explorer.flare.network',
126+
coston2: 'https://coston2-explorer.flare.network'
126127
}

packages/fasset-indexer-core/src/indexer/eventlib/event-parser.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,23 @@ export class EventParser {
5959
return this.context.interfaces.erc20Interface.parseLog(log)
6060
}
6161
///////////// delete from /////////////
62-
let parsed = null
63-
try {
64-
parsed = this.context.interfaces.erc20Interface.parseLog(log)
65-
} catch (e) {
66-
return null
67-
}
68-
const from = parsed?.args[0]
69-
const to = parsed?.args[1]
70-
if ((from != null && to != null) && (
71-
await this.isCollateralPool(em, from)
72-
|| await this.isAgentVault(em, from)
73-
|| await this.isCollateralPool(em, to)
74-
|| await this.isAgentVault(em, to)
75-
)) {
76-
return parsed
62+
if (this.context.config.indexPrices) {
63+
let parsed = null
64+
try {
65+
parsed = this.context.interfaces.erc20Interface.parseLog(log)
66+
} catch (e) {
67+
return null
68+
}
69+
const from = parsed?.args[0]
70+
const to = parsed?.args[1]
71+
if ((from != null && to != null) && (
72+
await this.isCollateralPool(em, from)
73+
|| await this.isAgentVault(em, from)
74+
|| await this.isCollateralPool(em, to)
75+
|| await this.isAgentVault(em, to)
76+
)) {
77+
return parsed
78+
}
7779
}
7880
///////////// delete to /////////////
7981
} else if (iface === 'COLLATERAL_POOL') {

0 commit comments

Comments
 (0)