Closed DrSensor closed 5 years ago
conf.js is not meant to be edited, it's basically a default conf.
When you answer to this question then actual configuration file is saved to AppData folder and is named as conf.json.
So, proper suggestion would be that it should ask this question only if there is no deviceName in conf.json or no conf.json at all.
Maybe, to clear things up, conf.js should be renamed to default-conf.js
🤔 weird
This example use conf.js to define the device name (though it still prompt ask the device name). In this case (if I want to disable the prompt), should I use require('byteballcore/wallet')
instead of headless-wallet?
If prompting the question is part of the headless-wallet requirement, I think suggestedDeviceName
should be the deviceName that reside in conf.js 😅
It should prompt only once and then it should write it to conf.json, which is in user AppData or .config folder.
Passphrase is another thing that needs user input, otherwise anybody who has access to the environment variables, will be able to decrypt your private key.
On platforms where this is not possible (like Heroku), you could also set the passphrase to empty and launch it like this https://github.com/byteball/headless-byteball/issues/10#issuecomment-400290889
I have BB Odds web interface running on Heroku and I deploy conf.json
and keys.json
in .config/[package-name]/ that I put into project folder.
Hey, what's the difference between this: https://github.com/byteball/headless-byteball/blob/a281a1593dfa545d56a17bbf1d47373d6643f8ad/start.js#L53 and
conf.deviceName
? Why not merge it withexports.deviceName
inconf.js
of appRootDir?