aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/js/poloniex.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web/js/poloniex.jsx')
-rw-r--r--cmd/web/js/poloniex.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/web/js/poloniex.jsx b/cmd/web/js/poloniex.jsx
index 96384fd..a5fb9a7 100644
--- a/cmd/web/js/poloniex.jsx
+++ b/cmd/web/js/poloniex.jsx
@@ -5,7 +5,7 @@ import React from 'react';
5class PoloniexController extends React.Component { 5class PoloniexController extends React.Component {
6 constructor(props) { 6 constructor(props) {
7 super(props); 7 super(props);
8 this.state = {'apiKey': '', 'apiSecret': '', 'flag': 'loading', 'valueCurrency': null, 'balanceValue': null, 'balance': null}; 8 this.state = {'apiKey': '', 'apiSecret': '', 'apiRequested': false, 'flag': 'loading', 'valueCurrency': null, 'balanceValue': null, 'balance': null};
9 } 9 }
10 10
11 handleCredentialsChange = (key, secret) => { 11 handleCredentialsChange = (key, secret) => {
@@ -43,6 +43,7 @@ class PoloniexController extends React.Component {
43 43
44 componentDidMount = () => { 44 componentDidMount = () => {
45 Api.Call('MARKET', {'name': 'poloniex'}, function(err, status, data) { 45 Api.Call('MARKET', {'name': 'poloniex'}, function(err, status, data) {
46 this.setState({'apiRequested': true});
46 if (err) { 47 if (err) {
47 console.error(err, data); 48 console.error(err, data);
48 return; 49 return;
@@ -74,6 +75,9 @@ class PoloniexController extends React.Component {
74 default: 75 default:
75 displayText = null; 76 displayText = null;
76 } 77 }
78 if (this.state.apiRequested === false) {
79 return <div></div>;
80 }
77 return ( 81 return (
78 <div> 82 <div>
79 <PoloniexBalance balanceCurrency={this.state.valueCurrency} 83 <PoloniexBalance balanceCurrency={this.state.valueCurrency}