}
cookies.setItem('jwt', token, cookieExpire);
+ page('/not_confirmed');
};
App.getUserJWT = function() {
case 'need_otp_validation':
page('/otp/validate');
return false;
+ case 'user_not_confirmed':
+ page('/not_confirmed');
+ return false;
default:
return true;
}
</div>);
});
+App.page('/not_confirmed', true, function(context) {
+ App.mount(<div>
+ <Logo />
+ <div className="row">
+ <div className="box offset-3 col-6 text-center">
+ <p>Please be patient, you account is being confirmed...</p>
+ <p><a href="/me"><u>Refresh</u></a></p>
+ </div>
+ </div>
+ </div>);
+});
+
App.page('/otp/setup', true, function(context) {
Api.Call('OTP_ENROLL', {}, function(err, status, data) {
if (err) {
class PoloniexController extends React.Component {
constructor(props) {
super(props);
- this.state = {'apiKey': '', 'apiSecret': '', 'flag': 'loading', 'valueCurrency': null, 'balanceValue': null, 'balance': null};
+ this.state = {'apiKey': '', 'apiSecret': '', 'apiRequested': false, 'flag': 'loading', 'valueCurrency': null, 'balanceValue': null, 'balance': null};
}
handleCredentialsChange = (key, secret) => {
componentDidMount = () => {
Api.Call('MARKET', {'name': 'poloniex'}, function(err, status, data) {
+ this.setState({'apiRequested': true});
if (err) {
console.error(err, data);
return;
default:
displayText = null;
}
+ if (this.state.apiRequested === false) {
+ return <div></div>;
+ }
return (
<div>
<PoloniexBalance balanceCurrency={this.state.valueCurrency}