diff --git a/app/actions/account.js b/app/actions/account.js index bdc2809..9a532b4 100644 --- a/app/actions/account.js +++ b/app/actions/account.js @@ -1,6 +1,6 @@ import { push } from 'react-router-redux'; import * as types from './accountTypes'; -import { init, getApi } from '../utils/ApiUtil'; +import { init, getApi, clearApiVars } from '../utils/ApiUtil'; import metrics from '../utils/MetricsUtil'; export function setAccountInfo(key, value) { @@ -59,7 +59,7 @@ export function login(account, tfCb = () => {}, captchaCb = () => {}) { } dispatch(push('/players')); } catch (e) { - // this.setState({ twoFactor: false, loading: false, errors: { detail: e.message } }); + clearApiVars(account.email); throw e; } }; diff --git a/app/package.json b/app/package.json index b596661..7cc0398 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "fifa-autobuyer", "productName": "FIFA Autobuyer", - "version": "0.4.7", + "version": "0.4.8", "description": "Autobuyer for FIFA 17 Ultimate Team", "main": "./main.js", "author": { diff --git a/app/utils/ApiUtil.js b/app/utils/ApiUtil.js index 0fe431c..b8cb1b2 100644 --- a/app/utils/ApiUtil.js +++ b/app/utils/ApiUtil.js @@ -47,3 +47,7 @@ export function getApi(email, rpm) { } return login && login.api; } + +export function clearApiVars(email) { + window.localStorage.removeItem(`${email}::apiVars`); +} diff --git a/package.json b/package.json index ae7a9c8..7794cef 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fifa-autobuyer", "productName": "FIFA Autobuyer", - "version": "0.4.7", + "version": "0.4.8", "description": "Autobuyer for FIFA 17 Ultimate Team", "main": "main.js", "scripts": {