2dccc1365acffe1cda376835ab987be165232782ac8cbd444421bbf18f869075.json raw
1 {"ast":null,"code":"import _asyncToGenerator from \"/home/mleku/src/orly.dev/next/signer/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { BrowserSyncHandler } from '@common';\nimport browser from 'webextension-polyfill';\n/**\n * Handles the browser sync operations when the browser sync is enabled.\n * If it's not enabled, it behaves like the local extension storage (which is fine).\n */\nexport class FirefoxSyncNoHandler extends BrowserSyncHandler {\n loadUnmigratedData() {\n var _this = this;\n return _asyncToGenerator(function* () {\n const data = yield browser.storage.local.get(null);\n // Remove any available \"ignore properties\".\n _this.ignoreProperties.forEach(property => {\n delete data[property];\n });\n return data;\n })();\n }\n saveAndSetFullData(data) {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n yield browser.storage.local.set(data);\n _this2.setFullData(data);\n })();\n }\n saveAndSetPartialData_Permissions(data) {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n yield browser.storage.local.set(data);\n _this3.setPartialData_Permissions(data);\n })();\n }\n saveAndSetPartialData_Identities(data) {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n yield browser.storage.local.set(data);\n _this4.setPartialData_Identities(data);\n })();\n }\n saveAndSetPartialData_SelectedIdentityId(data) {\n var _this5 = this;\n return _asyncToGenerator(function* () {\n yield browser.storage.local.set(data);\n _this5.setPartialData_SelectedIdentityId(data);\n })();\n }\n saveAndSetPartialData_Relays(data) {\n var _this6 = this;\n return _asyncToGenerator(function* () {\n yield browser.storage.local.set(data);\n _this6.setPartialData_Relays(data);\n })();\n }\n saveAndSetPartialData_NwcConnections(data) {\n var _this7 = this;\n return _asyncToGenerator(function* () {\n yield browser.storage.local.set(data);\n _this7.setPartialData_NwcConnections(data);\n })();\n }\n saveAndSetPartialData_CashuMints(data) {\n var _this8 = this;\n return _asyncToGenerator(function* () {\n yield browser.storage.local.set(data);\n _this8.setPartialData_CashuMints(data);\n })();\n }\n clearData() {\n var _this9 = this;\n return _asyncToGenerator(function* () {\n const props = Object.keys(yield _this9.loadUnmigratedData());\n yield browser.storage.local.remove(props);\n })();\n }\n}","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}