yuichiroaoki / poly-flashloan-bot

Flashloan Bot on Polygon
https://yuichiroaoki.medium.com/flashloan-bot-on-polygon-part-2-3eae0ac33986?sk=80821da4ca1d0462c7c9ae617df56bdd
MIT License
302 stars 192 forks source link

Crash when fetching prices for 1inch #46

Closed adedade closed 2 years ago

adedade commented 2 years ago
/Users/adedade/poly-flashloan-bot/dist/inchPrice.js:30
        amount.toString() +
               ^

TypeError: Cannot read properties of undefined (reading 'toString')
    at get1inchQuoteCallUrl (/Users/adedade/poly-flashloan-bot/dist/inchPrice.js:30:16)
    at /Users/adedade/poly-flashloan-bot/dist/inchPrice.js:53:31
    at Generator.next (<anonymous>)
    at fulfilled (/Users/adedade/poly-flashloan-bot/dist/inchPrice.js:5:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
adedade commented 2 years ago

I am on the latest master

adedade commented 2 years ago

Should we also enable better stacktraces since they reference compiled js instead of ts sources? e.g. https://www.npmjs.com/package/source-map-support

adedade commented 2 years ago

My bad, I did forget to run yarn build once pulled the latest changes from master :) will keep an eye out if I encounter any other issue