Skip to content

Commit

Permalink
removed excessive logging
Browse files Browse the repository at this point in the history
  • Loading branch information
insomnious committed Sep 20, 2023
1 parent 70678de commit 063c8c1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
integrity sha512-h9u4u/jiIRKbq25PM+zymTyW6bhTzELvOoUd+AvYriWOAKpLGnIamaET3pnHYoI5iYphAHBI4ayx0MehR+VVPQ==

"@nexusmods/nexus-api@Nexus-Mods/node-nexus-api#oauth":
version "1.4.23"
resolved "https://codeload.github.com/Nexus-Mods/node-nexus-api/tar.gz/338e4e13708b03d6bcf7f781987c180dfab1ed73"
version "1.4.24"
resolved "https://codeload.github.com/Nexus-Mods/node-nexus-api/tar.gz/6ee4b495eeeda3057df0ffa53e96abde67d341f0"
dependencies:
form-data "^4.0.0"
jsonwebtoken "^9.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/nexus_integration/eventHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ export function onAPIKeyChanged(api: IExtensionApi, nexus: Nexus): StateChangeCa
// fired when state variable changes 'confidential.account.nexus.OAuthCredentials'
export function onOAuthTokenChanged(api: IExtensionApi, nexus: Nexus): StateChangeCallback {
return (oldValue: ITokenReply, newValue: ITokenReply) => {
log('info', 'onOAuthTokenChanged event handler. confidential.account.nexus.OAuthCredentials has changed', newValue)
log('info', 'onOAuthTokenChanged event handler.')

// remove user info
api.store.dispatch(setUserInfo(undefined));
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/nexus_integration/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ function once(api: IExtensionApi, callbacks: Array<(nexus: NexusT) => void>) {

// register when window is focussed to do a userinfo check?
getApplication().window.on('focus', (event, win) => {
console.log('browser-window-focus');
//console.log('browser-window-focus');
//userInfoDebouncer.schedule();
})
}
Expand Down
14 changes: 7 additions & 7 deletions src/extensions/nexus_integration/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ export function transformUserInfoFromApi(input: IUserInfo) {
status: getAccountStatus(input)
};

log('info', 'transformUserInfoFromApi()', stateUserInfo);
//log('info', 'transformUserInfoFromApi()', stateUserInfo);

return stateUserInfo;
}
Expand Down Expand Up @@ -1323,14 +1323,14 @@ function getUserInfo(api: IExtensionApi,
.then(apiUserInfo => {
// update state with new info from endpoint
api.store.dispatch(setUserInfo(transformUserInfoFromApi(apiUserInfo)));
log('info', 'getUserInfo() nexus.getUserInfo response', apiUserInfo);
//log('info', 'getUserInfo() nexus.getUserInfo response', apiUserInfo);
return true;
})
.catch((err) => {
log('error', `getUserInfo() nexus.getUserInfo response ${err.message}`, err);
/*showError(api.store.dispatch, 'An error occurred refreshing user info', err, {
//log('error', `getUserInfo() nexus.getUserInfo response ${err.message}`, err);
showError(api.store.dispatch, 'An error occurred refreshing user info', err, {
allowReport: false,
});*/
});
return false;
});

Expand Down Expand Up @@ -1368,7 +1368,7 @@ function getUserInfo(api: IExtensionApi,

function onJWTTokenRefresh(api: IExtensionApi, credentials: IOAuthCredentials, nexus: Nexus) {

log('info', 'onJWTTokenRefresh', { credentials: credentials});
log('info', 'onJWTTokenRefresh');

// sets state oauth credentials
api.store.dispatch(setOAuthCredentials(
Expand All @@ -1385,7 +1385,7 @@ function onJWTTokenRefresh(api: IExtensionApi, credentials: IOAuthCredentials, n
export function updateToken(api: IExtensionApi, nexus: Nexus, credentials: any): Promise<boolean> {
setOauthToken(credentials); // used for reporting, unimportant right now

log('info', 'updateToken()', credentials);
log('info', 'updateToken()');

// update the nexus-node object with our credentials.
// could be from nexus_integration once() or from when the credentials are updated in state
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1698,8 +1698,8 @@
integrity sha512-h9u4u/jiIRKbq25PM+zymTyW6bhTzELvOoUd+AvYriWOAKpLGnIamaET3pnHYoI5iYphAHBI4ayx0MehR+VVPQ==

"@nexusmods/nexus-api@Nexus-Mods/node-nexus-api#oauth":
version "1.4.23"
resolved "https://codeload.github.com/Nexus-Mods/node-nexus-api/tar.gz/338e4e13708b03d6bcf7f781987c180dfab1ed73"
version "1.4.24"
resolved "https://codeload.github.com/Nexus-Mods/node-nexus-api/tar.gz/6ee4b495eeeda3057df0ffa53e96abde67d341f0"
dependencies:
form-data "^4.0.0"
jsonwebtoken "^9.0.0"
Expand Down

0 comments on commit 063c8c1

Please sign in to comment.