Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
only warn for overwriting if keys already exist
Browse files Browse the repository at this point in the history
  • Loading branch information
askmike committed Jul 23, 2017
1 parent aa4d11f commit 9279d0d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions web/vue/src/components/config/apiConfigBuilder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export default {
exchangePicker
},
computed: {
apiKeySets: function() {
return this.$store.state.apiKeys;
},
exchanges: function() {
return this.$store.state.exchanges;
},
Expand Down Expand Up @@ -73,10 +76,10 @@ export default {
if(
this.exchanges &&
this.exchanges[exchange] &&
!confirm(`You already have API keys for ${exchange} defined, want to overwrite them?`)
this.apiKeySets.includes(exchange) &&
!confirm(`You already have API keys for ${exchange} defined, do you want to overwrite them?`)
)
return;
return;
post('addApiKey', this.config, (error, response) => {
if(error)
Expand Down

0 comments on commit 9279d0d

Please sign in to comment.