cryptozombie-lessons icon indicating copy to clipboard operation
cryptozombie-lessons copied to clipboard

Change error handling in fallback

Open shankars99 opened this issue 2 years ago • 1 comments

Chapter 15 (How to Build an Oracle - Part 2) contains the following code in the default workspace

the code within:

oracleContract.events.SetLatestEthPriceEvent(async (err, event) => {

has:

if (err) { 
      console.error('Error on event', err) 
      return 
    }
    // Do something
  })

however it expects:

if (err) console.error('Error on event', err)

changing the evaluator to accept either the first or change the default workspace to include the newer one would help solve the issue

shankars99 avatar Apr 08 '22 03:04 shankars99

This is a problem in a lot of Lesson 15 chapters and rather frustrating.

tholu avatar Apr 11 '22 21:04 tholu