Fix race condition with pins

This commit is contained in:
yflory 2019-06-14 10:03:52 +02:00
parent 2337fbdc6b
commit 3e4ee75137

View file

@ -327,15 +327,6 @@ define([
account.note = obj.note;
cb(obj);
});
arePinsSynced(function (err, yes) {
if (!yes) {
resetPins(function (err) {
if (err) { return console.error(err); }
console.log('RESET DONE');
});
}
});
});
});
};
@ -1666,6 +1657,15 @@ define([
loadUniversal(Profile, 'profile', waitFor);
cleanFriendRequests();
}).nThen(function () {
arePinsSynced(function (err, yes) {
if (!yes) {
resetPins(function (err) {
if (err) { return console.error(err); }
console.log('RESET DONE');
});
}
});
var requestLogin = function () {
broadcast([], "REQUEST_LOGIN");
};