diff --git a/src/ui/component/filePrice/view.jsx b/src/ui/component/filePrice/view.jsx index 91650b2cf..366db5879 100644 --- a/src/ui/component/filePrice/view.jsx +++ b/src/ui/component/filePrice/view.jsx @@ -33,7 +33,7 @@ class FilePrice extends React.PureComponent { const { costInfo, fetchCostInfo, uri, fetching, claim } = props; if (costInfo === undefined && !fetching && claim) { - fetchCostInfo(uri); + // fetchCostInfo(uri); } }; diff --git a/src/ui/index.jsx b/src/ui/index.jsx index f166791d3..ca5d4c062 100644 --- a/src/ui/index.jsx +++ b/src/ui/index.jsx @@ -58,7 +58,7 @@ ipcRenderer.on('navigate-forward', () => { // @endif // @if TARGET='web' -const SDK_API_URL = process.env.SDK_API_URL || 'https://api.lbry.tv/api/proxy'; +const SDK_API_URL = process.env.SDK_API_URL || 'https://api.piratebay.com/api/proxy'; Lbry.setDaemonConnectionString(SDK_API_URL); // @endif @@ -89,7 +89,7 @@ Lbryio.setOverride( const newAuthToken = response.auth_token; authToken = newAuthToken; // @if TARGET='web' - document.cookie = cookie.serialize('authToken', authToken); + document.cookie = cookie.serialize('auth_token', authToken); // @endif // @if TARGET='app' ipcRenderer.send('set-auth-token', authToken); @@ -115,7 +115,7 @@ Lbryio.setOverride( ipcRenderer.send('get-auth-token'); // @endif // @if TARGET='web' - const { authToken } = cookie.parse(document.cookie); + const { auth_token: authToken } = cookie.parse(document.cookie); resolve(authToken); // @endif } diff --git a/src/ui/store.js b/src/ui/store.js index 8b818ce33..bfda6d47d 100644 --- a/src/ui/store.js +++ b/src/ui/store.js @@ -74,21 +74,37 @@ const walletFilter = createFilter('wallet', ['receiveAddress']); const searchFilter = createFilter('search', ['options']); const persistOptions = { - whitelist: ['subscriptions', 'publish', 'wallet', 'content', 'fileInfo', 'app', 'search'], + whitelist: [ + // @if TARGET='app' + 'publish', + 'wallet', + 'fileInfo', + // @endif + 'content', + 'subscriptions', + 'app', + 'search', + ], // Order is important. Needs to be compressed last or other transforms can't // read the data - transforms: [walletFilter, contentFilter, fileInfoFilter, appFilter, searchFilter, compressor], - debounce: 10000, + transforms: [ + // @if TARGET='app' + walletFilter, + contentFilter, + fileInfoFilter, + // @endif + appFilter, + searchFilter, + compressor, + ], + debounce: IS_WEB ? 5000 : 10000, storage: localForage, }; -// Dont' persist anything on web (for now) -// @if TARGET='app' window.cacheStore = persistStore(store, persistOptions, err => { if (err) { console.error('Unable to load saved settings'); } }); -// @endif export { store, history };