Skip to content

Commit

Permalink
Merge pull request #688 from stakwork/fix/tribe_jwt
Browse files Browse the repository at this point in the history
returned r.json for saveProfile and refreshToken
  • Loading branch information
elraphty authored Sep 14, 2023
2 parents 56d66a6 + 2f34ab4 commit 1a3c265
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions frontend/app/src/store/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,8 @@ export class MainStore {
this.lnToken = j.jwt;
return j;
}
return j.response;

return j;
} catch (e) {
console.log('Error refreshJwt: ', e);
// could not refresh jwt, logout!
Expand Down Expand Up @@ -1221,18 +1222,16 @@ export class MainStore {
// first time profile makers will need this on first login
if (!body.id) {
const j = await r.json();
if (j.response.id) {
body.id = j.response.id;
if (j.id) {
body.id = j.id;
}
}

uiStore.setToasts([
{
id: '1',
title: 'Saved.'
}
]);

await this.getSelf(body);
} catch (e) {
console.log('Error saveProfile: ', e);
Expand Down

0 comments on commit 1a3c265

Please sign in to comment.