Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight committed Dec 11, 2024
1 parent 2e24366 commit c1792f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/app/src/systems/Account/utils/storage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { chromeStackLineParser } from '@sentry/react';
import type { StorageAbstract } from 'fuels';
import { chromeStorage } from '~/systems/Core/services/chromeStorage';
import { db } from '~/systems/Core/utils/database';
Expand Down
10 changes: 5 additions & 5 deletions packages/app/src/systems/Core/services/chromeStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export class ChromeStorageTable {
}

async get({ key }: { key: string }) {
const rowsMap = (await chrome.storage.local.get(this.tableName)) || {};
const rowsMap = (await chrome?.storage?.local?.get(this.tableName)) || {};

Check failure on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

messageRequestMachine › should sign message

ReferenceError: chrome is not defined at ChromeStorageTable.get (src/systems/Core/services/chromeStorage.ts:7:22) at IndexedDBStorage.getItem (src/systems/Account/utils/storage.tsx:7:46) at _WalletManager.loadState (../../node_modules/.pnpm/@[email protected]/node_modules/@fuel-ts/account/src/wallet-manager/wallet-manager.ts:249:37) at async _WalletManager.unlock (../../node_modules/.pnpm/@[email protected]/node_modules/@fuel-ts/account/src/wallet-manager/wallet-manager.ts:213:7) at async VaultServer.unlock (src/systems/Vault/services/VaultServer.ts:129:5) at async VaultClient.clientVault.unlock (src/systems/Vault/__mocks__/mockUnlock.ts:15:5) at async Function.create (src/systems/SignUp/services/signup.ts:32:5) at async mockVault (src/systems/Core/__tests__/utils/mockVault.ts:14:19) at async Object.<anonymous> (src/systems/DApp/machines/messageRequestMachine.test.ts:14:17)

Check failure on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

messageRequestMachine › should reject sign message

ReferenceError: chrome is not defined at ChromeStorageTable.get (src/systems/Core/services/chromeStorage.ts:7:22) at IndexedDBStorage.getItem (src/systems/Account/utils/storage.tsx:7:46) at _WalletManager.loadState (../../node_modules/.pnpm/@[email protected]/node_modules/@fuel-ts/account/src/wallet-manager/wallet-manager.ts:249:37) at async _WalletManager.unlock (../../node_modules/.pnpm/@[email protected]/node_modules/@fuel-ts/account/src/wallet-manager/wallet-manager.ts:213:7) at async VaultServer.unlock (src/systems/Vault/services/VaultServer.ts:129:5) at async VaultClient.clientVault.unlock (src/systems/Vault/__mocks__/mockUnlock.ts:15:5) at async Function.create (src/systems/SignUp/services/signup.ts:32:5) at async mockVault (src/systems/Core/__tests__/utils/mockVault.ts:14:19) at async Object.<anonymous> (src/systems/DApp/machines/messageRequestMachine.test.ts:14:17)

Check warning on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

RETRY 1: exportAccountMachine › edit › should wait for password

ReferenceError: chrome is not defined at ChromeStorageTable.get (src/systems/Core/services/chromeStorage.ts:7:22) at IndexedDBStorage.getItem (src/systems/Account/utils/storage.tsx:7:46) at _WalletManager.loadState (../../node_modules/.pnpm/@[email protected]/node_modules/@fuel-ts/account/src/wallet-manager/wallet-manager.ts:249:37) at async _WalletManager.unlock (../../node_modules/.pnpm/@[email protected]/node_modules/@fuel-ts/account/src/wallet-manager/wallet-manager.ts:213:7) at async VaultServer.unlock (src/systems/Vault/services/VaultServer.ts:129:5) at async VaultClient.clientVault.unlock (src/systems/Vault/__mocks__/mockUnlock.ts:15:5) at async Function.create (src/systems/SignUp/services/signup.ts:32:5) at async mockVault (src/systems/Core/__tests__/utils/mockVault.ts:14:19) at async Object.<anonymous> (src/systems/Account/machines/exportAccountMachine.test.tsx:14:41)

Check warning on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

RETRY 3: exportAccountMachine › edit › should wait for password

ReferenceError: chrome is not defined at ChromeStorageTable.get (src/systems/Core/services/chromeStorage.ts:7:22) at ChromeStorageTable.set (src/systems/Core/services/chromeStorage.ts:35:40) at src/systems/Core/utils/database.ts:76:42

Check warning on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

RETRY 5: exportAccountMachine › edit › should wait for password

ReferenceError: chrome is not defined at ChromeStorageTable.get (src/systems/Core/services/chromeStorage.ts:7:22) at ChromeStorageTable.set (src/systems/Core/services/chromeStorage.ts:35:40) at src/systems/Core/utils/database.ts:76:42

Check failure on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

exportAccountMachine › edit › should wait for password

ReferenceError: chrome is not defined at ChromeStorageTable.get (src/systems/Core/services/chromeStorage.ts:7:22) at ChromeStorageTable.set (src/systems/Core/services/chromeStorage.ts:35:40) at src/systems/Core/utils/database.ts:76:42

Check failure on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

exportAccountMachine › edit › should be able to export account private key

ReferenceError: chrome is not defined at ChromeStorageTable.get (src/systems/Core/services/chromeStorage.ts:7:22) at ChromeStorageTable.set (src/systems/Core/services/chromeStorage.ts:35:40) at src/systems/Core/utils/database.ts:76:42
const rows = rowsMap[this.tableName] || [];

let foundIndex = -1;
Expand All @@ -25,7 +25,7 @@ export class ChromeStorageTable {
}

async getAll() {
const rowsMap = (await chrome.storage.local.get(this.tableName)) || {};
const rowsMap = (await chrome?.storage?.local?.get(this.tableName)) || {};

Check warning on line 28 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

RETRY 1: Connections › should do the entire connection management flow

Expected test not to call console.error(). If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs. ReferenceError: chrome is not defined at ChromeStorageTable.getAll (src/systems/Core/services/chromeStorage.ts:28:22) at Function.recoverWallet (src/systems/Account/services/account.ts:212:57) at fetch (src/systems/Account/machines/accountsMachine.tsx:223:32) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:269:63) at Interpreter.exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1026:10) at Interpreter.execute (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:387:14) at Interpreter.update (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:415:12) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:675:13 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.initialize (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:32:12) at Interpreter.start (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:674:20) at Interpreter.spawnMachine (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1113:8) at Interpreter.spawn (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1067:19) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:289:21) at handleAction (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:596:11) at processBlock (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:627:24) at Array.map (<anonymous>) at Object.resolveActions (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:652:52) at StateNode.resolveTransition (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/StateNode.js:917:36) at StateNode.transition (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/StateNode.js:840:17) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:956:28 at Object.provide (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/serviceScope.js:12:16) at Interpreter._nextState (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:955:34) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:108:31 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.schedule (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:48:10) at Interpreter.send (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:104:23) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1110:13 at Interpreter.update (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:498:11) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:110:15 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.schedule (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:48:10) at Interpreter.send (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:104:23) at _a.id (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1139:15) at logError (src/systems/Core/machines/fetchMachine.ts:117:21) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:171:18) at handleAction (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:596:11) at processBlock (../../node_modules/.pnpm/[email protected]/node_module

Check warning on line 28 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

RETRY 2: Connections › should do the entire connection management flow

Expected test not to call console.error(). If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs. ReferenceError: chrome is not defined at ChromeStorageTable.getAll (src/systems/Core/services/chromeStorage.ts:28:22) at Function.recoverWallet (src/systems/Account/services/account.ts:212:57) at fetch (src/systems/Account/machines/accountsMachine.tsx:223:32) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:269:63) at Interpreter.exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1026:10) at Interpreter.execute (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:387:14) at Interpreter.update (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:415:12) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:675:13 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.initialize (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:32:12) at Interpreter.start (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:674:20) at Interpreter.spawnMachine (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1113:8) at Interpreter.spawn (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1067:19) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:289:21) at handleAction (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:596:11) at processBlock (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:627:24) at Array.map (<anonymous>) at Object.resolveActions (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:652:52) at StateNode.resolveTransition (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/StateNode.js:917:36) at StateNode.transition (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/StateNode.js:840:17) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:956:28 at Object.provide (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/serviceScope.js:12:16) at Interpreter._nextState (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:955:34) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:108:31 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.schedule (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:48:10) at Interpreter.send (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:104:23) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1110:13 at Interpreter.update (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:498:11) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:110:15 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.schedule (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:48:10) at Interpreter.send (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:104:23) at _a.id (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1139:15) at logError (src/systems/Core/machines/fetchMachine.ts:117:21) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:171:18) at handleAction (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:596:11) at processBlock (../../node_modules/.pnpm/[email protected]/node_module

Check warning on line 28 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

RETRY 4: Connections › should do the entire connection management flow

Expected test not to call console.error(). If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs. ReferenceError: chrome is not defined at ChromeStorageTable.getAll (src/systems/Core/services/chromeStorage.ts:28:22) at Function.recoverWallet (src/systems/Account/services/account.ts:212:57) at fetch (src/systems/Account/machines/accountsMachine.tsx:223:32) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:269:63) at Interpreter.exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1026:10) at Interpreter.execute (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:387:14) at Interpreter.update (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:415:12) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:675:13 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.initialize (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:32:12) at Interpreter.start (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:674:20) at Interpreter.spawnMachine (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1113:8) at Interpreter.spawn (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1067:19) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:289:21) at handleAction (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:596:11) at processBlock (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:627:24) at Array.map (<anonymous>) at Object.resolveActions (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:652:52) at StateNode.resolveTransition (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/StateNode.js:917:36) at StateNode.transition (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/StateNode.js:840:17) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:956:28 at Object.provide (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/serviceScope.js:12:16) at Interpreter._nextState (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:955:34) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:108:31 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.schedule (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:48:10) at Interpreter.send (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:104:23) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1110:13 at Interpreter.update (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:498:11) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:110:15 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.schedule (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:48:10) at Interpreter.send (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:104:23) at _a.id (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1139:15) at logError (src/systems/Core/machines/fetchMachine.ts:117:21) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:171:18) at handleAction (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:596:11) at processBlock (../../node_modules/.pnpm/[email protected]/node_module

Check failure on line 28 in packages/app/src/systems/Core/services/chromeStorage.ts

View workflow job for this annotation

GitHub Actions / Test

Connections › should do the entire connection management flow

Expected test not to call console.error(). If the error is expected, test for it explicitly by mocking it out using jest.spyOn(console, 'error').mockImplementation() and test that the warning occurs. ReferenceError: chrome is not defined at ChromeStorageTable.getAll (src/systems/Core/services/chromeStorage.ts:28:22) at Function.recoverWallet (src/systems/Account/services/account.ts:212:57) at fetch (src/systems/Account/machines/accountsMachine.tsx:223:32) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:269:63) at Interpreter.exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1026:10) at Interpreter.execute (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:387:14) at Interpreter.update (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:415:12) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:675:13 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.initialize (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:32:12) at Interpreter.start (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:674:20) at Interpreter.spawnMachine (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1113:8) at Interpreter.spawn (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1067:19) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:289:21) at handleAction (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:596:11) at processBlock (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:627:24) at Array.map (<anonymous>) at Object.resolveActions (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:652:52) at StateNode.resolveTransition (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/StateNode.js:917:36) at StateNode.transition (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/StateNode.js:840:17) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:956:28 at Object.provide (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/serviceScope.js:12:16) at Interpreter._nextState (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:955:34) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:108:31 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.schedule (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:48:10) at Interpreter.send (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:104:23) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1110:13 at Interpreter.update (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:498:11) at ../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:110:15 at Scheduler.process (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:69:7) at Scheduler.schedule (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/scheduler.js:48:10) at Interpreter.send (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:104:23) at _a.id (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:1139:15) at logError (src/systems/Core/machines/fetchMachine.ts:117:21) at Interpreter._exec (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/interpreter.js:171:18) at handleAction (../../node_modules/.pnpm/[email protected]/node_modules/xstate/lib/actions.js:596:11) at processBlock (../../node_modules/.pnpm/[email protected]/node_module
const rows = rowsMap[this.tableName] || [];
return rows.map((row: any) => row.data);
}
Expand Down Expand Up @@ -54,7 +54,7 @@ export class ChromeStorageTable {
});
}

await chrome.storage.local.set({
await chrome?.storage?.local?.set({
[this.tableName]: rows,
});
}
Expand All @@ -64,14 +64,14 @@ export class ChromeStorageTable {

if (index !== -1) {
rows.splice(index, 1);
await chrome.storage.local.set({
await chrome?.storage?.local?.set({
[this.tableName]: rows,
});
}
}

async clear() {
await chrome.storage.local.set({
await chrome?.storage?.local?.set({
[this.tableName]: [],
});
}
Expand Down

0 comments on commit c1792f6

Please sign in to comment.