Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
|
94e3b4eee0 | ||
|
28697c9968 |
3 changed files with 22 additions and 11 deletions
17
dist/bundle.js
vendored
17
dist/bundle.js
vendored
|
@ -802,14 +802,14 @@ Lbryio.authenticate = function () {
|
|||
}
|
||||
|
||||
// check that token works
|
||||
return Lbryio.getCurrentUser().then(function () {
|
||||
return true;
|
||||
return Lbryio.getCurrentUser().then(function (user) {
|
||||
return user;
|
||||
}).catch(function () {
|
||||
return false;
|
||||
});
|
||||
}).then(function (isTokenValid) {
|
||||
if (isTokenValid) {
|
||||
return reject;
|
||||
}).then(function (user) {
|
||||
if (user) {
|
||||
return user;
|
||||
}
|
||||
|
||||
return _lbryRedux.Lbry.status().then(function (status) {
|
||||
|
@ -827,7 +827,12 @@ Lbryio.authenticate = function () {
|
|||
|
||||
return reject();
|
||||
});
|
||||
}).then(Lbryio.getCurrentUser).then(resolve, reject);
|
||||
}).then(function (user) {
|
||||
if (!user) {
|
||||
return Lbryio.getCurrentUser();
|
||||
}
|
||||
return user;
|
||||
}).then(resolve, reject);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -115,12 +115,12 @@ Lbryio.authenticate = () => {
|
|||
|
||||
// check that token works
|
||||
return Lbryio.getCurrentUser()
|
||||
.then(() => true)
|
||||
.then(user => user)
|
||||
.catch(() => false);
|
||||
})
|
||||
.then(isTokenValid => {
|
||||
if (isTokenValid) {
|
||||
return reject;
|
||||
.then(user => {
|
||||
if (user) {
|
||||
return user;
|
||||
}
|
||||
|
||||
return Lbry.status().then(status => {
|
||||
|
@ -137,7 +137,12 @@ Lbryio.authenticate = () => {
|
|||
return reject();
|
||||
});
|
||||
})
|
||||
.then(Lbryio.getCurrentUser)
|
||||
.then(user => {
|
||||
if (!user) {
|
||||
return Lbryio.getCurrentUser();
|
||||
}
|
||||
return user;
|
||||
})
|
||||
.then(resolve, reject);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ export function doFetchInviteStatus() {
|
|||
|
||||
Lbryio.call('user', 'invite_status')
|
||||
.then(status => {
|
||||
dispatch(doRewardList());
|
||||
dispatch({
|
||||
type: ACTIONS.USER_INVITE_STATUS_FETCH_SUCCESS,
|
||||
data: {
|
||||
|
|
Loading…
Add table
Reference in a new issue