replaced with ==.

This commit is contained in:
Maria Carmina 2023-04-10 19:45:55 +03:00
parent 8826654764
commit 6a3ebcebd2
1 changed files with 8 additions and 11 deletions

View File

@ -1,6 +1,5 @@
import { Order, OrderReuse } from '../../@types/schema'
import { log } from '@graphprotocol/graph-ts'
import { toChecksumAddress } from 'ethereumjs-util'
export function getOrderId(
tx: string,
@ -53,21 +52,19 @@ export function searchOrderForEvent(
)
log.info('orderId as trial: {}', [orderId])
const order = Order.load(orderId)
if (
order !== null &&
toChecksumAddress(order.datatoken) === toChecksumAddress(address)
) {
if (order !== null && order.datatoken == address) {
log.info('order datatoken: {}', [order.datatoken])
log.info('event address: {}', [address])
log.info('typeof order datatoken: {}', [typeof order.datatoken])
log.info('typeof hex event address: {}', [typeof address])
// add break
return getOrder(
transactionHash,
address,
transactionFrom,
firstEventIndex
)
// return getOrder(
// transactionHash,
// address,
// transactionFrom,
// firstEventIndex
// )
return order
}
firstEventIndex--
}