diff --git a/src/ui/index.jsx b/src/ui/index.jsx index 75eeee1b0..9db259e43 100644 --- a/src/ui/index.jsx +++ b/src/ui/index.jsx @@ -97,27 +97,28 @@ Lbryio.setOverride( 'getAuthToken', () => new Promise(resolve => { + // @if TARGET='app' if (authToken) { resolve(authToken); - } else { - // @if TARGET='app' - ipcRenderer.once('auth-token-response', (event, token) => { - Lbryio.authToken = token; - resolve(token); - }); - - ipcRenderer.send('get-auth-token'); - // @endif - // @if TARGET='web' - const authToken = getAuthToken(); - - if (authToken) { - Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authToken); - } - - resolve(authToken); - // @endif } + + ipcRenderer.once('auth-token-response', (event, token) => { + Lbryio.authToken = token; + resolve(token); + }); + + ipcRenderer.send('get-auth-token'); + // @endif + + // @if TARGET='web' + const authTokenToReturn = authToken || getAuthToken(); + + if (authTokenToReturn !== null) { + Lbry.setApiHeader(X_LBRY_AUTH_TOKEN, authTokenToReturn); + } + + resolve(authTokenToReturn); + // @endif }) ); diff --git a/src/ui/store.js b/src/ui/store.js index 59e8a2a12..2926921fc 100644 --- a/src/ui/store.js +++ b/src/ui/store.js @@ -57,12 +57,10 @@ const tagsFilter = createFilter('tags', ['followedTags']); const subscriptionsFilter = createFilter('subscriptions', ['subscriptions']); const blockedFilter = createFilter('blocked', ['blockedChannels']); const whiteListedReducers = [ - // @if TARGET='app' + 'fileInfo', 'publish', 'wallet', 'tags', - // 'fileInfo', - // @endif 'content', 'app', 'search', @@ -72,12 +70,10 @@ const whiteListedReducers = [ ]; const transforms = [ - // @if TARGET='app' - walletFilter, fileInfoFilter, + walletFilter, blockedFilter, tagsFilter, - // @endif appFilter, searchFilter, tagsFilter,