shareandcharge / sharecharge-api

HTTP webserver for the Share&Charge e-Mobility Network
0 stars 0 forks source link

filtering by tokenAddress doesn't work #9

Open AndreiD opened 6 years ago

AndreiD commented 6 years ago

image

calling: http://localhost:3000/api/cdr/info?tokenContract=0x1234

I get:

(node:8740) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined at logs.filter.log (C:\Users\me\AppData\Roaming\npm\node_modules\@motionwerk\sharecharge-core-client\node_modules\@motionwerk\s harecharge-lib\dist\models\contract.js:35:65) at Array.filter () at Contract.getLogs (C:\Users\me\AppData\Roaming\npm\node_modules\@motionwerk\sharecharge-core-client\node_modules\@motionwerk\ sharecharge-lib\dist\models\contract.js:35:29) at process._tickCallback (internal/process/next_tick.js:68:7) (node:8740) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an as ync function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (node:8740) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are n ot handled will terminate the Node.js process with a non-zero exit code.

AndreiD commented 6 years ago

I need this so i don't parse the array and filter it. it doesn't impact performance (maybe?) but it impacts code readability....