@@ -141,10 +141,10 @@ func (mdl *Pool) OnLog(txLog types.Log) {
141141 case core .Topic ("WithdrawETH(address,address)" ):
142142 pool := common .BytesToAddress (txLog .Topics [1 ][:]).Hex ()
143143 user := common .BytesToAddress (txLog .Topics [2 ][:]).Hex ()
144- ind := txLog .TxIndex - 2
144+ ind := txLog .Index - 2
145145 blockNum := int64 (txLog .BlockNumber )
146146 // for weth pool, WithdrawETH is emitted on weth gateway, so we track withdraETH on gateway for getting user
147- mdl .gatewayHandler .checkWithdrawETH (blockNum , int64 (ind ), pool , user )
147+ mdl .gatewayHandler .checkWithdrawETH (txLog . TxHash . Hex (), blockNum , int64 (ind ), pool , user )
148148 case core .Topic ("Transfer(address,address,uint256)" ):
149149 from := common .BytesToAddress (txLog .Topics [1 ][:])
150150 to := common .BytesToAddress (txLog .Topics [2 ][:]).Hex ()
@@ -153,9 +153,9 @@ func (mdl *Pool) OnLog(txLog types.Log) {
153153 if ! (from == mdl .gatewayHandler .Gateway && to != mdl .gatewayHandler .UserCantBe .Hex ()) {
154154 return
155155 }
156- ind := txLog .TxIndex - 3
156+ ind := txLog .Index - 3
157157 blockNum := int64 (txLog .BlockNumber )
158- mdl .gatewayHandler .checkWithdrawETH (blockNum , int64 (ind ), mdl .Address , to )
158+ mdl .gatewayHandler .checkWithdrawETH (txLog . TxHash . Hex (), blockNum , int64 (ind ), mdl .Address , to )
159159 }
160160}
161161
0 commit comments