celo-org / celo-monorepo

Official repository for core projects comprising the Celo platform
https://celo.org
Apache License 2.0
684 stars 360 forks source link

celocli crashes when trying to get voter rewards #2470

Closed JonasPf closed 4 years ago

JonasPf commented 4 years ago

This command crashes: celocli rewards:show --voter 0xf327386ef9d6be057d1c720fef633938743660f3 --epochs 5

Expected Behavior

I'd expect it to show the rewards.

Current Behavior

Running Checks:
   ✔  0xf327386ef9d6be057d1c720fef633938743660f3 is a registered Account
TypeError: Cannot read property 'dividedBy' of undefined
    at /usr/local/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/src/wrappers/Election.ts:441:45
    at Array.map (<anonymous>)
    at ElectionWrapper.<anonymous> (/usr/local/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/src/wrappers/Election.ts:437:25)
    at step (/usr/local/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/lib/wrappers/Election.js:46:23)
    at Object.next (/usr/local/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/lib/wrappers/Election.js:27:53)
    at fulfilled (/usr/local/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/lib/wrappers/Election.js:18:58)
nategraf commented 4 years ago

@jfoutts-celo could you give this an initial look? I've confirmed that I get the same error locally.