diff options
author | jloup <jeanloup.jamet@gmail.com> | 2018-02-25 18:43:48 +0100 |
---|---|---|
committer | jloup <jeanloup.jamet@gmail.com> | 2018-02-25 18:43:48 +0100 |
commit | adf936f66a5c59e6cc2e7a1c644148e0f119e5c8 (patch) | |
tree | 003eb3e00b7e07cedbeedeea988fd362e7327ce7 /cmd/web/js/poloniex.jsx | |
parent | 989fb5c7dbba174f54f3ae69df788d6685fff46b (diff) | |
download | Front-adf936f66a5c59e6cc2e7a1c644148e0f119e5c8.tar.gz Front-adf936f66a5c59e6cc2e7a1c644148e0f119e5c8.tar.zst Front-adf936f66a5c59e6cc2e7a1c644148e0f119e5c8.zip |
/not_confirmed page.
Diffstat (limited to 'cmd/web/js/poloniex.jsx')
-rw-r--r-- | cmd/web/js/poloniex.jsx | 6 |
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'; | |||
5 | class PoloniexController extends React.Component { | 5 | class 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} |