aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/js/account.jsx
diff options
context:
space:
mode:
authorjloup <jeanloup.jamet@gmail.com>2018-05-10 16:22:29 +0200
committerjloup <jeanloup.jamet@gmail.com>2018-05-10 16:22:29 +0200
commit299b6b6d9fb879c06e675ef240f361348629ff6c (patch)
tree27909cd54e53d58e612da93e15f1005af86870ec /cmd/web/js/account.jsx
parent3b8833854f83f75e3d16c1fdb869937f690e48ea (diff)
downloadFront-299b6b6d9fb879c06e675ef240f361348629ff6c.tar.gz
Front-299b6b6d9fb879c06e675ef240f361348629ff6c.tar.zst
Front-299b6b6d9fb879c06e675ef240f361348629ff6c.zip
Add column 'status' to market_configs.v0.0.9
Diffstat (limited to 'cmd/web/js/account.jsx')
-rw-r--r--cmd/web/js/account.jsx6
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