diff options
Diffstat (limited to 'cmd/web/js/account.jsx')
-rw-r--r-- | cmd/web/js/account.jsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/web/js/account.jsx b/cmd/web/js/account.jsx index d30abe7..03ca117 100644 --- a/cmd/web/js/account.jsx +++ b/cmd/web/js/account.jsx | |||
@@ -28,9 +28,15 @@ class PoloniexConfiguration extends React.Component { | |||
28 | } | 28 | } |
29 | 29 | ||
30 | handleCredentialsSubmit = () => { | 30 | handleCredentialsSubmit = () => { |
31 | this.setState({'status': 'loading'}); | ||
31 | Api.Call('UPDATE_MARKET', {'key': this.state.apiKey, 'secret': this.state.apiSecret, 'name': 'poloniex'}, function(err, status, data) { | 32 | Api.Call('UPDATE_MARKET', {'key': this.state.apiKey, 'secret': this.state.apiSecret, 'name': 'poloniex'}, function(err, status, data) { |
32 | if (err) { | 33 | if (err) { |
33 | console.error(err, data); | 34 | console.error(err, data); |
35 | if (err.code === 'invalid_market_credentials') { | ||
36 | this.setState({'status': 'invalidCredentials'}); | ||
37 | } else if (err.code === 'ip_restricted_api_key') { | ||
38 | this.setState({'status': 'ipRestricted'}); | ||
39 | } | ||
34 | return; | 40 | return; |
35 | } | 41 | } |
36 | 42 | ||