Skip to content

Commit

Permalink
fix: clean up temporary code pointed with todo comments
Browse files Browse the repository at this point in the history
  • Loading branch information
smalluban committed Oct 18, 2024
1 parent c357a91 commit 17f60a1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
14 changes: 0 additions & 14 deletions src/utils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,6 @@ export async function session() {

let accessToken = await getCookie('access_token');

// Fix for Safari wrong implementation of getCookie/setCookie
// (See above fix starting in line 29. In short we were setting a cookie with
// a far future expiration date, so the access_token expired, but it was still
// in user's browser).
// TODO: The below code can be removed after a reasonable amount of time
// where most of the users have updated to the fixed version
if (
__PLATFORM__ === 'safari' &&
accessToken &&
new Date(accessToken.expirationDate).getFullYear() > 2050
) {
accessToken = undefined;
}

try {
if (!accessToken) {
const refreshToken = await getCookie('refresh_token');
Expand Down
6 changes: 0 additions & 6 deletions src/utils/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ export default class AutoSyncingMap {
// and log it. A potential improvement could be to treat the
// in-memory map as the source of truth in that scenario.)
this._pending = new Promise((resolve, reject) => {
// Migration to session storage
// TODO: Remove this code after a few releases
if (chrome.storage.session) {
chrome.storage.local.remove(this.storageKey);
}

storage.get([this.storageKey], (result) => {
if (chrome.runtime.lastError) {
reject(chrome.runtime.lastError);
Expand Down

0 comments on commit 17f60a1

Please sign in to comment.