]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git/blobdiff - cmd/web/js/account.jsx
Refactor Portfolio balance.
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git] / cmd / web / js / account.jsx
index 43e7083efdef93d45f14ee0cf4cb0584143b1dd4..d30abe7e229a157a627aab99a8c55f55c33cd329 100644 (file)
@@ -8,7 +8,7 @@ class PoloniexConfiguration extends React.Component {
   }
 
   checkCredentials = () => {
-    Api.Call('MARKET_BALANCE', {'name': 'poloniex', 'currency': 'BTC'}, function(err, status, data) {
+    Api.Call('MARKET_TEST_CREDENTIALS', {'name': 'poloniex'}, function(err, status, data) {
       if (err) {
         console.error(err, data);
         if (err.code === 'invalid_market_credentials') {
@@ -28,13 +28,6 @@ class PoloniexConfiguration extends React.Component {
   }
 
   handleCredentialsSubmit = () => {
-
-    /*
-     *If (!this.state.apiKey || !this.state.apiSecret) {
-     *  return;
-     *}
-     */
-
     Api.Call('UPDATE_MARKET', {'key': this.state.apiKey, 'secret': this.state.apiSecret, 'name': 'poloniex'}, function(err, status, data) {
       if (err) {
         console.error(err, data);