made xpub key optional

This commit is contained in:
jash
2018-12-08 21:12:49 +01:00
committed by kexkey
parent 4546cb1d54
commit 50235c0d64
2 changed files with 17 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ const prefix = function() {
};
module.exports = {
name: function() {
name: function() {
return name;
},
prompts: function( utils ) {
@@ -43,7 +43,7 @@ module.exports = {
message: prefix()+'Run as different user?'+utils._getHelp('run_as_different_user')
},
{
when: function( props ) {
when: function( props ) {
return props.run_as_different_user;
},
type: 'input',
@@ -54,14 +54,26 @@ module.exports = {
validate: utils._usernameValidator
},
{
type: 'confirm',
name: 'use_xpub',
default: utils._getDefault( 'want_xpub' )||false,
message: prefix()+'Use an xpub key to watch or generate adresses?'+utils._getHelp('use_xpub'),
},
{
when: function( props ) {
return props.use_xpub;
},
type: 'input',
name: 'xpub',
default: utils._getDefault( 'xpub' ),
message: prefix()+'What is your xpub to watch?'+utils._getHelp('xpub'),
message: prefix()+'What is your xpub key?'+utils._getHelp('xpub'),
filter: utils._trimFilter,
validate: utils._xkeyValidator
},
{
when: function( props ) {
return props.use_xpub;
},
type: 'input',
name: 'derivation_path',
default: utils._getDefault( 'derivation_path' ),

View File

@@ -36,8 +36,10 @@ services:
- "DB_PATH=/proxy/db"
- "DB_FILE=/proxy/db/proxydb"
- "PYCOIN_CONTAINER=pycoin:7777"
<% if ( use_xpub && xpub ) { %>
- "DERIVATION_PUB32=<%= xpub %>"
- "DERIVATION_PATH=<%= derivation_path %>"
<% } %>
- "WATCHER_BTC_NODE_PRUNED=<%= bitcoin_prune?'true':'false' %>"
- "OTSCLIENT_CONTAINER=otsclient:6666"
- "OTS_FILES=/proxy/otsfiles"