diff --git a/src/apps/popup/constants.ts b/src/apps/popup/constants.ts index b8c95a476..431b4d240 100644 --- a/src/apps/popup/constants.ts +++ b/src/apps/popup/constants.ts @@ -8,12 +8,12 @@ export enum TimeoutDurationSetting { } export const MapTimeoutDurationSettingToValue = { - [TimeoutDurationSetting['1 min']]: 1, - [TimeoutDurationSetting['5 min']]: 5, - [TimeoutDurationSetting['15 min']]: 15, - [TimeoutDurationSetting['30 min']]: 30, - [TimeoutDurationSetting['1 hour']]: 60, - [TimeoutDurationSetting['24 hours']]: 60 * 24 + [TimeoutDurationSetting['1 min']]: 1000 * 60 * 1, + [TimeoutDurationSetting['5 min']]: 1000 * 60 * 5, + [TimeoutDurationSetting['15 min']]: 1000 * 60 * 15, + [TimeoutDurationSetting['30 min']]: 1000 * 60 * 30, + [TimeoutDurationSetting['1 hour']]: 1000 * 60 * 60, + [TimeoutDurationSetting['24 hours']]: 1000 * 60 * 60 * 24 }; export const LOCK_VAULT_TIMEOUT = 1000 * 60 * 5; diff --git a/src/background/index.ts b/src/background/index.ts index b0d1019aa..794ed2a7c 100644 --- a/src/background/index.ts +++ b/src/background/index.ts @@ -3,7 +3,6 @@ import { RootAction, getType } from 'typesafe-actions'; import { Tabs, action, - alarms, browserAction, management, runtime, @@ -14,6 +13,7 @@ import { import { getUrlOrigin, hasHttpPrefix, + isChromeBuild, isEqualCaseInsensitive } from '@src/utils'; @@ -28,6 +28,7 @@ import { bringWeb3Events } from '@background/bring-web3-events'; import { WindowApp } from '@background/create-open-window'; +import { initKeepAlive } from '@background/keep-alive'; import { disableOnboardingFlow, enableOnboardingFlow, @@ -275,16 +276,6 @@ tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => { } }); -// Dispatch the lockVault action when the 'vaultLock' alarm is triggered -alarms.onAlarm.addListener(async function (alarm) { - const store = await getExistingMainStoreSingletonOrInit(); - - if (alarm.name === 'vaultLock') { - // Dispatch the lockVault action to the main store - store.dispatch(lockVault()); - } -}); - // NOTE: if two events are send at the same time (same function) it must reuse the same store instance runtime.onMessage.addListener( async ( @@ -731,6 +722,13 @@ runtime.onMessage.addListener( ); } } else { + if (action === 'keepAlive') { + // Send an asynchronous response + sendResponse({ status: 'alive' }); + + // returning true to indicate an asynchronous response + return true; + } // this is added for not spamming with errors from bringweb3 if ('from' in action) { // @ts-ignore @@ -744,7 +742,13 @@ runtime.onMessage.addListener( } ); -bringInitBackground({ - identifier: process.env.PLATFORM_IDENTIFIER || '', // The identifier key you obtained from Bringweb3 - apiEndpoint: process.env.NODE_ENV === 'production' ? 'prod' : 'sandbox' +initKeepAlive().catch(error => { + console.error('Initialization of keep alive error:', error); }); + +if (isChromeBuild) { + bringInitBackground({ + identifier: process.env.PLATFORM_IDENTIFIER || '', // The identifier key you obtained from Bringweb3 + apiEndpoint: process.env.NODE_ENV === 'production' ? 'prod' : 'sandbox' + }); +} diff --git a/src/background/keep-alive.ts b/src/background/keep-alive.ts new file mode 100644 index 000000000..827bd179e --- /dev/null +++ b/src/background/keep-alive.ts @@ -0,0 +1,64 @@ +import { runtime } from 'webextension-polyfill'; + +import { isChromeBuild } from '@src/utils'; + +import { getExistingMainStoreSingletonOrInit } from '@background/redux/get-main-store'; +import { selectKeysDoesExist } from '@background/redux/keys/selectors'; +import { selectVaultIsLocked } from '@background/redux/session/selectors'; +import { selectVaultCipherDoesExist } from '@background/redux/vault-cipher/selectors'; + +let keepAliveInterval: ReturnType | null = null; + +// Function to start the keep-alive interval +export function startKeepAlive() { + if (!keepAliveInterval) { + keepAliveInterval = setInterval(keepAlive, 15000); // 15 seconds + console.log('KeepAlive interval started.'); + } +} + +// Function to stop the keep-alive interval +export function stopKeepAlive() { + if (keepAliveInterval) { + clearInterval(keepAliveInterval); + keepAliveInterval = null; + console.log('KeepAlive interval stopped.'); + } +} + +// Function to check and manage the keep-alive mechanism based on vault state +async function manageKeepAlive() { + const store = await getExistingMainStoreSingletonOrInit(); + const state = store.getState(); + + const vaultIsLocked = selectVaultIsLocked(state); + const keysDoesExist = selectKeysDoesExist(state); + const vaultCipherDoesExist = selectVaultCipherDoesExist(state); + + if (vaultIsLocked && keysDoesExist && vaultCipherDoesExist) { + stopKeepAlive(); + } else { + startKeepAlive(); + } +} + +// ping mechanism to keep background script from destroing wallet session when it's unlocked +function keepAlive() { + runtime.sendMessage('keepAlive').catch(error => { + console.error('KeepAlive error:', error); + }); +} + +export async function initKeepAlive() { + if (isChromeBuild) { + const store = await getExistingMainStoreSingletonOrInit(); + + // Initial call to manageKeepAlive to set the initial state + await manageKeepAlive(); + + // Subscribe to store updates + store.subscribe(async () => { + await manageKeepAlive(); + }); + } +} diff --git a/src/background/redux/last-activity-time/selectors.ts b/src/background/redux/last-activity-time/selectors.ts new file mode 100644 index 000000000..7e49a5314 --- /dev/null +++ b/src/background/redux/last-activity-time/selectors.ts @@ -0,0 +1,4 @@ +import { RootState } from 'typesafe-actions'; + +export const selectVaultLastActivityTime = (state: RootState): number | null => + state.lastActivityTime; diff --git a/src/background/redux/root-selector.ts b/src/background/redux/root-selector.ts index 1629cfe22..ddcd68aa4 100644 --- a/src/background/redux/root-selector.ts +++ b/src/background/redux/root-selector.ts @@ -1,5 +1,6 @@ export * from './active-origin/selectors'; export * from './keys/selectors'; +export * from './last-activity-time/selectors'; export * from './login-retry-count/selectors'; export * from './login-retry-lockout-time/selectors'; export * from './session/selectors'; diff --git a/src/background/redux/sagas/vault-sagas.ts b/src/background/redux/sagas/vault-sagas.ts index 160d17d1a..ba955a87f 100644 --- a/src/background/redux/sagas/vault-sagas.ts +++ b/src/background/redux/sagas/vault-sagas.ts @@ -1,6 +1,5 @@ import { put, select, takeLatest } from 'redux-saga/effects'; import { getType } from 'typesafe-actions'; -import { alarms } from 'webextension-polyfill'; import { getUrlOrigin } from '@src/utils'; @@ -25,6 +24,7 @@ import { Account } from '@libs/types/account'; import { accountInfoReset } from '../account-info/actions'; import { keysUpdated } from '../keys/actions'; import { lastActivityTimeRefreshed } from '../last-activity-time/actions'; +import { selectVaultLastActivityTime } from '../last-activity-time/selectors'; import { loginRetryCountReseted } from '../login-retry-count/actions'; import { encryptionKeyHashCreated, @@ -234,35 +234,47 @@ function* unlockVaultSaga(action: ReturnType) { } /** - * This saga function is responsible for managing the vault timeout and locking mechanism. - * It checks if the vault exists and is not locked, retrieves the vault timeout duration setting, - * calculates the timeout duration value based on the setting, and creates an alarm to lock the vault. - * If an error occurs during the execution, it logs the error. + * Saga to handle the timeout and locking mechanism of a vault based on its last activity time and a specified timeout duration setting. + * + * The generator function calculates the time elapsed since the last activity of the vault. + * If the vault exists, it is not locked, and the last + * activity time is available, it checks if the elapsed time surpasses the timeout duration. + * If true, it triggers a vault lock action + * immediately. + * If false, it sets up a delay for the remaining time until the timeout duration is met before locking the vault. + * */ function* timeoutCounterSaga() { + const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); + try { - // Check if the vault exists and is not locked const vaultDoesExist = yield* sagaSelect(selectVaultCipherDoesExist); const vaultIsLocked = yield* sagaSelect(selectVaultIsLocked); - - // Get the vault timeout duration setting + const vaultLastActivityTime = yield* sagaSelect( + selectVaultLastActivityTime + ); const vaultTimeoutDurationSetting = yield* sagaSelect( selectTimeoutDurationSetting ); - - // Calculate the timeout duration value based on the setting const timeoutDurationValue = MapTimeoutDurationSettingToValue[vaultTimeoutDurationSetting]; - // If the vault exists and is not locked, create an alarm to lock the vault - if (vaultDoesExist && !vaultIsLocked) { - alarms.create('vaultLock', { - delayInMinutes: timeoutDurationValue - }); + if (vaultDoesExist && !vaultIsLocked && vaultLastActivityTime) { + const currentTime = Date.now(); + const timeoutExpired = + currentTime - vaultLastActivityTime >= timeoutDurationValue; + + if (timeoutExpired) { + yield put(lockVault()); + } else { + yield* sagaCall(delay, timeoutDurationValue); + yield put(lockVault()); + } } } catch (err) { - // Log any errors that occur during the execution of the saga - console.error(err, 'err'); + console.error(err); + } finally { + // } } diff --git a/src/content/bring.ts b/src/content/bring.ts new file mode 100644 index 000000000..0f52179bd --- /dev/null +++ b/src/content/bring.ts @@ -0,0 +1,243 @@ +import { bringInitContentScript } from '@bringweb3/chrome-extension-kit'; +import { runtime } from 'webextension-polyfill'; + +import { isChromeBuild } from '@src/utils'; + +const getActivePublicKye = async (): Promise => { + try { + const response = await runtime.sendMessage({ + type: 'GET_ACTIVE_PUBLIC_KEY' + }); + + return response?.payload?.publicKey; + } catch (e) { + console.log(e, 'getActivePublicKye error'); + + return undefined; + } +}; + +const getTheme = async (): Promise => { + try { + const response = await runtime.sendMessage({ + type: 'GET_THEME' + }); + + return response?.payload?.theme; + } catch (e) { + console.log(e, 'getTheme error'); + + return 'dark'; + } +}; + +const theme = await getTheme(); + +export const initBringScript = () => { + if (isChromeBuild) { + bringInitContentScript({ + getWalletAddress: getActivePublicKye, // Async function that returns the current user's wallet address + promptLogin: () => + runtime.sendMessage({ + type: 'PROMPT_LOGIN_REQUEST' + }), // Function that prompts a UI element asking the user to login + walletAddressListeners: [ + 'casper-wallet:activeKeyChanged', + 'casper-wallet:unlocked', + 'casper-wallet:locked' + ], // A list of custom events that dispatched when the user's wallet address had changed + theme: theme, + text: 'lower', + darkTheme: { + fontFamily: '"Inter", sans-serif', + popupBg: '#18181F', + // Primary button + primaryBtnBg: '#C2000E', + primaryBtnFC: '#FFFFFF', + primaryBtnFW: '500', + primaryBtnFS: '14px', + primaryBtnBorderC: 'transparent', + primaryBtnBorderW: '0', + primaryBtnRadius: '4px', + // Secondary button + secondaryBtnBg: '#34363D', + secondaryBtnFS: '14px', + secondaryBtnFW: '500', + secondaryBtnFC: '#7490FF', + secondaryBtnBorderC: 'transparent', + secondaryBtnBorderW: '0', + secondaryBtnRadius: '4px', + // Markdown + markdownBg: '#262730', + markdownFS: '13px', + markdownFC: '#84868C', + markdownBorderW: '0', + markdownRadius: '4px', + markdownBorderC: 'transparent', + markdownScrollbarC: '#84868C', + // Wallet address + walletBg: '#262730', + walletFS: '13px', + walletFW: '400', + walletFC: '#A9AAAD', + walletBorderC: 'transparent', + walletBorderW: '0', + walletRadius: '4px', + markdownTitleFS: '14px', + markdownTitleFW: '700', + markdownTitleFC: '#FFFFFF', + // Details of offering + detailsBg: '#262730', + detailsTitleFS: '18px', + detailsTitleFW: '700', + detailsTitleFC: '#FFFFFF', + detailsSubtitleFS: '14px', + detailsSubtitleFW: '600', + detailsSubtitleFC: '#A9AAAD', + detailsRadius: '4px', + detailsBorderW: '0', + detailsBorderC: 'transparent', + detailsAmountFC: '#7490FF', + detailsAmountFW: '600', + // Overlay + overlayBg: '#18181FF2', + overlayFS: '18px', + overlayFW: '700', + overlayFC: '#FFFFFF', + loaderBg: '#C2000E', + overlayWaitingBg: '#18181F', + // Optout \ Turn off + optoutBg: '#262730', + optoutFS: '14px', + optoutFW: '500', + optoutFC: '#DADCE5', + optoutRadius: '0', + // X Button and close buttons + closeFS: '14px', + closeFW: '500', + closeFC: '#7490FF', + xBtnFC: '#A9AAAD', + // Token name + tokenBg: '#262730', + tokenFS: '14px', + tokenFW: '600', + tokenFC: '#FFFFFF', + tokenBorderW: '1px', + tokenBorderC: '#FFFFFF', + tokenRadius: '4px', + // Notification popup + notificationFS: '14px', + notificationFW: '600', + notificationFC: '#FFFFFF', + notificationBtnBg: '#34363D', + notificationBtnFS: '13px', + notificationBtnFW: '500', + notificationBtnFC: '#7490FF', + notificationBtnBorderW: '0', + notificationBtnBorderC: 'transparent', + notificationBtnRadius: '4px', + activateTitleFS: '14px', + activateTitleFW: '600', + activateTitleFC: '#A9AAAD', + activateTitleBoldFS: '14px', + activateTitleBoldFW: '600', + activateTitleBoldFC: '#FFFFFF' + }, + lightTheme: { + fontFamily: '"Inter", sans-serif', + popupBg: '#F5F6F7', + // Primary button + primaryBtnBg: '#CC000F', + primaryBtnFC: '#FFFFFF', + primaryBtnFW: '500', + primaryBtnFS: '14px', + primaryBtnBorderC: 'transparent', + primaryBtnBorderW: '0', + primaryBtnRadius: '4px', + // Secondary button + secondaryBtnBg: '#E6E8EA', + secondaryBtnFS: '14px', + secondaryBtnFW: '500', + secondaryBtnFC: '#0A2EBF', + secondaryBtnBorderC: 'transparent', + secondaryBtnBorderW: '0', + secondaryBtnRadius: '4px', + // Markdown + markdownBg: '#FFFFFF', + markdownFS: '13px', + markdownFC: '#84868C', + markdownBorderW: '0', + markdownRadius: '4px', + markdownBorderC: 'transparent', + markdownScrollbarC: '#84868C', + markdownTitleFS: '14px', + markdownTitleFW: '700', + markdownTitleFC: '#1A1919', + // Wallet address + walletBg: '#FFFFFF', + walletFS: '13px', + walletFW: '400', + walletFC: '#84868C', + walletBorderC: 'transparent', + walletBorderW: '0', + walletRadius: '4px', + // Details of offering + detailsBg: '#FFFFFF', + detailsTitleFS: '18px', + detailsTitleFW: '700', + detailsTitleFC: '#1A1919', + detailsSubtitleFS: '14px', + detailsSubtitleFW: '600', + detailsSubtitleFC: '#84868C', + detailsRadius: '4px', + detailsBorderW: '0', + detailsBorderC: 'transparent', + detailsAmountFC: '#0A2EBF', + detailsAmountFW: '600', + // Overlay + overlayBg: '#494B51F2', + overlayFS: '18px', + overlayFW: '700', + overlayFC: '#1A1919', + loaderBg: '#C2000E', + overlayWaitingBg: '#F5F6F7', + // Optout \ Turn off + optoutBg: '#F5F6F7', + optoutFS: '14px', + optoutFW: '500', + optoutFC: '#1A1919', + optoutRadius: '0', + // X Button and close buttons + closeFS: '14px', + closeFW: '500', + closeFC: '#0A2EBF', + xBtnFC: '#84868C', + // Token name + tokenBg: '#FFFFFF', + tokenFS: '14px', + tokenFW: '600', + tokenFC: '#1A1919', + tokenBorderW: '1px', + tokenBorderC: '#1A1919', + tokenRadius: '4px', + // Notification popup + notificationFS: '14px', + notificationFW: '600', + notificationFC: '#1A1919', + notificationBtnBg: '#E6E8EA', + notificationBtnFS: '13px', + notificationBtnFW: '500', + notificationBtnFC: '#0A2EBF', + notificationBtnBorderW: '0', + notificationBtnBorderC: 'transparent', + notificationBtnRadius: '4px', + activateTitleFS: '14px', + activateTitleFW: '600', + activateTitleFC: '#84868C', + activateTitleBoldFS: '14px', + activateTitleBoldFW: '600', + activateTitleBoldFC: '#1A1919' + } + }); + } +}; diff --git a/src/content/index.ts b/src/content/index.ts index 5ce5133de..2d89227cb 100644 --- a/src/content/index.ts +++ b/src/content/index.ts @@ -1,7 +1,8 @@ -import { bringInitContentScript } from '@bringweb3/chrome-extension-kit'; import { getType } from 'typesafe-actions'; import { runtime } from 'webextension-polyfill'; +import { initBringScript } from '@content/bring'; + import { SdkEvent, sdkEvent } from './sdk-event'; import { CasperWalletEventType } from './sdk-event-type'; import { @@ -147,237 +148,4 @@ window.addEventListener(cleanupEventType, cleanup); init(); -const getActivePublicKye = async (): Promise => { - try { - const response = await runtime.sendMessage({ - type: 'GET_ACTIVE_PUBLIC_KEY' - }); - - return response?.payload?.publicKey; - } catch (e) { - console.log(e, 'getActivePublicKye error'); - - return undefined; - } -}; - -const getTheme = async (): Promise => { - try { - const response = await runtime.sendMessage({ - type: 'GET_THEME' - }); - - return response?.payload?.theme; - } catch (e) { - console.log(e, 'getTheme error'); - - return 'dark'; - } -}; - -const theme = await getTheme(); - -bringInitContentScript({ - getWalletAddress: getActivePublicKye, // Async function that returns the current user's wallet address - promptLogin: () => - runtime.sendMessage({ - type: 'PROMPT_LOGIN_REQUEST' - }), // Function that prompts a UI element asking the user to login - walletAddressListeners: [ - 'casper-wallet:activeKeyChanged', - 'casper-wallet:unlocked', - 'casper-wallet:locked' - ], // A list of custom events that dispatched when the user's wallet address had changed - theme: theme, - text: 'lower', - darkTheme: { - fontFamily: '"Inter", sans-serif', - popupBg: '#18181F', - // Primary button - primaryBtnBg: '#C2000E', - primaryBtnFC: '#FFFFFF', - primaryBtnFW: '500', - primaryBtnFS: '14px', - primaryBtnBorderC: 'transparent', - primaryBtnBorderW: '0', - primaryBtnRadius: '4px', - // Secondary button - secondaryBtnBg: '#34363D', - secondaryBtnFS: '14px', - secondaryBtnFW: '500', - secondaryBtnFC: '#7490FF', - secondaryBtnBorderC: 'transparent', - secondaryBtnBorderW: '0', - secondaryBtnRadius: '4px', - // Markdown - markdownBg: '#262730', - markdownFS: '13px', - markdownFC: '#84868C', - markdownBorderW: '0', - markdownRadius: '4px', - markdownBorderC: 'transparent', - markdownScrollbarC: '#84868C', - // Wallet address - walletBg: '#262730', - walletFS: '13px', - walletFW: '400', - walletFC: '#A9AAAD', - walletBorderC: 'transparent', - walletBorderW: '0', - walletRadius: '4px', - markdownTitleFS: '14px', - markdownTitleFW: '700', - markdownTitleFC: '#FFFFFF', - // Details of offering - detailsBg: '#262730', - detailsTitleFS: '18px', - detailsTitleFW: '700', - detailsTitleFC: '#FFFFFF', - detailsSubtitleFS: '14px', - detailsSubtitleFW: '600', - detailsSubtitleFC: '#A9AAAD', - detailsRadius: '4px', - detailsBorderW: '0', - detailsBorderC: 'transparent', - detailsAmountFC: '#7490FF', - detailsAmountFW: '600', - // Overlay - overlayBg: '#18181FF2', - overlayFS: '18px', - overlayFW: '700', - overlayFC: '#FFFFFF', - loaderBg: '#C2000E', - overlayWaitingBg: '#18181F', - // Optout \ Turn off - optoutBg: '#262730', - optoutFS: '14px', - optoutFW: '500', - optoutFC: '#DADCE5', - optoutRadius: '0', - // X Button and close buttons - closeFS: '14px', - closeFW: '500', - closeFC: '#7490FF', - xBtnFC: '#A9AAAD', - // Token name - tokenBg: '#262730', - tokenFS: '14px', - tokenFW: '600', - tokenFC: '#FFFFFF', - tokenBorderW: '1px', - tokenBorderC: '#FFFFFF', - tokenRadius: '4px', - // Notification popup - notificationFS: '14px', - notificationFW: '600', - notificationFC: '#FFFFFF', - notificationBtnBg: '#34363D', - notificationBtnFS: '13px', - notificationBtnFW: '500', - notificationBtnFC: '#7490FF', - notificationBtnBorderW: '0', - notificationBtnBorderC: 'transparent', - notificationBtnRadius: '4px', - activateTitleFS: '14px', - activateTitleFW: '600', - activateTitleFC: '#A9AAAD', - activateTitleBoldFS: '14px', - activateTitleBoldFW: '600', - activateTitleBoldFC: '#FFFFFF' - }, - lightTheme: { - fontFamily: '"Inter", sans-serif', - popupBg: '#F5F6F7', - // Primary button - primaryBtnBg: '#CC000F', - primaryBtnFC: '#FFFFFF', - primaryBtnFW: '500', - primaryBtnFS: '14px', - primaryBtnBorderC: 'transparent', - primaryBtnBorderW: '0', - primaryBtnRadius: '4px', - // Secondary button - secondaryBtnBg: '#E6E8EA', - secondaryBtnFS: '14px', - secondaryBtnFW: '500', - secondaryBtnFC: '#0A2EBF', - secondaryBtnBorderC: 'transparent', - secondaryBtnBorderW: '0', - secondaryBtnRadius: '4px', - // Markdown - markdownBg: '#FFFFFF', - markdownFS: '13px', - markdownFC: '#84868C', - markdownBorderW: '0', - markdownRadius: '4px', - markdownBorderC: 'transparent', - markdownScrollbarC: '#84868C', - markdownTitleFS: '14px', - markdownTitleFW: '700', - markdownTitleFC: '#1A1919', - // Wallet address - walletBg: '#FFFFFF', - walletFS: '13px', - walletFW: '400', - walletFC: '#84868C', - walletBorderC: 'transparent', - walletBorderW: '0', - walletRadius: '4px', - // Details of offering - detailsBg: '#FFFFFF', - detailsTitleFS: '18px', - detailsTitleFW: '700', - detailsTitleFC: '#1A1919', - detailsSubtitleFS: '14px', - detailsSubtitleFW: '600', - detailsSubtitleFC: '#84868C', - detailsRadius: '4px', - detailsBorderW: '0', - detailsBorderC: 'transparent', - detailsAmountFC: '#0A2EBF', - detailsAmountFW: '600', - // Overlay - overlayBg: '#494B51F2', - overlayFS: '18px', - overlayFW: '700', - overlayFC: '#1A1919', - loaderBg: '#C2000E', - overlayWaitingBg: '#F5F6F7', - // Optout \ Turn off - optoutBg: '#F5F6F7', - optoutFS: '14px', - optoutFW: '500', - optoutFC: '#1A1919', - optoutRadius: '0', - // X Button and close buttons - closeFS: '14px', - closeFW: '500', - closeFC: '#0A2EBF', - xBtnFC: '#84868C', - // Token name - tokenBg: '#FFFFFF', - tokenFS: '14px', - tokenFW: '600', - tokenFC: '#1A1919', - tokenBorderW: '1px', - tokenBorderC: '#1A1919', - tokenRadius: '4px', - // Notification popup - notificationFS: '14px', - notificationFW: '600', - notificationFC: '#1A1919', - notificationBtnBg: '#E6E8EA', - notificationBtnFS: '13px', - notificationBtnFW: '500', - notificationBtnFC: '#0A2EBF', - notificationBtnBorderW: '0', - notificationBtnBorderC: 'transparent', - notificationBtnRadius: '4px', - activateTitleFS: '14px', - activateTitleFW: '600', - activateTitleFC: '#84868C', - activateTitleBoldFS: '14px', - activateTitleBoldFW: '600', - activateTitleBoldFC: '#1A1919' - } -}); +initBringScript(); diff --git a/src/manifest.v2.json b/src/manifest.v2.json index c50252570..bdd108a6c 100755 --- a/src/manifest.v2.json +++ b/src/manifest.v2.json @@ -11,7 +11,6 @@ "storage", "tabs", "declarativeNetRequest", - "alarms", "https://image-proxy-cdn.make.services/*", "https://casper-assets.s3.amazonaws.com/*", "https://node.cspr.cloud/*", diff --git a/src/manifest.v2.safari.json b/src/manifest.v2.safari.json index 8cd0492af..5923358dd 100644 --- a/src/manifest.v2.safari.json +++ b/src/manifest.v2.safari.json @@ -12,7 +12,6 @@ "storage", "tabs", "declarativeNetRequest", - "alarms", "https://image-proxy-cdn.make.services/*", "https://api.testnet.casperwallet.io/*", "https://api.mainnet.casperwallet.io/*",