Skip to content Skip to sidebar Skip to footer

Getpastevents Undefined(re)

I had asked this question before. I looked carefully at the exchange section, which I advised, and I think there is no problem with the exchange section. At least in my opinion the

Solution 1:

Check exchange to make sure not undefined

export const loadAllOrders = async (exchange, dispatch) => {
     const cancelStream = exchange ? 
        await exchange.getPastEvents('Cancel', { fromBlock: 0, toBlock: 'latest' }) 
        : null // Check if exchange defined then call getPastEvents
     console.log(cancelStream)
}

Post a Comment for "Getpastevents Undefined(re)"