mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-21 04:11:50 +03:00
Merge pull request #598 from esteemapp/bugfix/547
server changed handle and connected new server
This commit is contained in:
commit
c4d03c9c46
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user