Merge pull request #598 from esteemapp/bugfix/547

server changed handle and connected new server
This commit is contained in:
uğur erdal 2019-02-19 21:25:59 +03:00 committed by GitHub
commit c4d03c9c46
2 changed files with 5 additions and 4 deletions

View File

@ -18,7 +18,7 @@ import AUTH_TYPE from '../../constants/authType';
const DEFAULT_SERVER = 'https://api.steemit.com';
let client = new Client(DEFAULT_SERVER);
const _getClient = async () => {
export const checkClient = async () => {
let selectedServer = DEFAULT_SERVER;
await getServer().then((response) => {
@ -30,7 +30,7 @@ const _getClient = async () => {
client = new Client(selectedServer);
};
_getClient();
checkClient();
export const getDigitPinCode = pin => decryptKey(pin, Config.PIN_KEY);

View File

@ -26,7 +26,7 @@ import {
} from '../../../redux/actions/applicationActions';
import { toastNotification } from '../../../redux/actions/uiAction';
import { setPushToken, getNodes } from '../../../providers/esteem/esteem';
import { checkClient } from '../../../providers/steem/dsteem';
// Middleware
// Constants
@ -120,7 +120,8 @@ class SettingsContainer extends Component {
if (isError) {
dispatch(setApi(selectedApi));
} else {
setServer(server);
await setServer(server);
checkClient();
}
};