vocdoni / dvote-js

Javascript/Typescript library to interact with the Vocdoni Open Stack
GNU General Public License v3.0
13 stars 7 forks source link

bug: DVoteGateway returns chainID undefined when chainID is actually "" #103

Closed randomshinichi closed 2 years ago

randomshinichi commented 2 years ago

As the node approaches this line https://github.com/vocdoni/vocdoni-node/blob/74742a36aa987c0f7af15b2b3225f01866e61381/rpcapi/healthinfo.go#L21 It replies with chainID = "", but by the time you get it with dvoteGw.getVocdoniChainId(), it says undefined.

To see this problem for yourself run voconed with VSCode debugger, the config is as follows:

{
            "name": "runvocone",
            "type": "go",
            "request": "launch",
            "mode": "exec",
            // "preLaunchTask": "rmrfvoconed",
            "program": "${workspaceFolder}/voconed",
            "args": [
                "--treasurer=0xfe10DAB06D636647f4E40dFd56599da9eF66Db1c", "--oracle=...", "--txCosts=20", "--logLevel=debug"
            ]
        },
randomshinichi commented 2 years ago

Actually a bug in the node.