@@ -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