Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Whirlpool
whirlpool-client-cli
Commits
40b01049
Commit
40b01049
authored
Jun 09, 2020
by
zeroleak
Browse files
(--init) preserve apiKey when already defined
parent
7b8281e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/main/java/com/samourai/whirlpool/cli/services/CliConfigService.java
...com/samourai/whirlpool/cli/services/CliConfigService.java
+6
-2
No files found.
src/main/java/com/samourai/whirlpool/cli/services/CliConfigService.java
View file @
40b01049
...
...
@@ -149,8 +149,12 @@ public class CliConfigService {
throw
new
NotifiableException
(
"Invalid mnemonic"
);
}
// generate apiKey
String
apiKey
=
CliUtils
.
generateUniqueString
();
// preserve apiKey when already defined
String
apiKey
=
cliConfig
.
getApiKey
();
if
(
StringUtils
.
isEmpty
(
apiKey
))
{
// generate apiKey when missing
apiKey
=
CliUtils
.
generateUniqueString
();
}
// save configuration file
Properties
props
=
new
Properties
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment