Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Wallet asking a device name even it's defined in conf.js #34

Closed
DrSensor opened this issue Dec 14, 2018 · 3 comments
Closed

[Bug] Wallet asking a device name even it's defined in conf.js #34

DrSensor opened this issue Dec 14, 2018 · 3 comments

Comments

@DrSensor
Copy link
Contributor

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 with exports.deviceName in conf.js of appRootDir?

@tarmo888
Copy link
Member

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

@DrSensor
Copy link
Contributor Author

DrSensor commented Dec 15, 2018

🤔 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 😅

@tarmo888
Copy link
Member

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 #10 (comment)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants