-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 GitHub Actions / TestmessageRequestMachine › should sign message
Check failure on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestmessageRequestMachine › should reject sign message
Check warning on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestRETRY 1: exportAccountMachine › edit › should wait for password
Check warning on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestRETRY 3: exportAccountMachine › edit › should wait for password
Check warning on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestRETRY 5: exportAccountMachine › edit › should wait for password
Check failure on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestexportAccountMachine › edit › should wait for password
Check failure on line 7 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestexportAccountMachine › edit › should be able to export account private key
|
||
const rows = rowsMap[this.tableName] || []; | ||
|
||
let foundIndex = -1; | ||
|
@@ -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 GitHub Actions / TestRETRY 1: Connections › should do the entire connection management flow
Check warning on line 28 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestRETRY 2: Connections › should do the entire connection management flow
Check warning on line 28 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestRETRY 4: Connections › should do the entire connection management flow
Check failure on line 28 in packages/app/src/systems/Core/services/chromeStorage.ts GitHub Actions / TestConnections › should do the entire connection management flow
|
||
const rows = rowsMap[this.tableName] || []; | ||
return rows.map((row: any) => row.data); | ||
} | ||
|
@@ -54,7 +54,7 @@ export class ChromeStorageTable { | |
}); | ||
} | ||
|
||
await chrome.storage.local.set({ | ||
await chrome?.storage?.local?.set({ | ||
[this.tableName]: rows, | ||
}); | ||
} | ||
|
@@ -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]: [], | ||
}); | ||
} | ||
|