1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

fix: fetch for snap registry (#19866)

This commit is contained in:
Monte Lai 2023-07-05 20:54:46 +08:00 committed by GitHub
parent 95d1b3bb3b
commit daf373251b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -526,7 +526,8 @@ export default class PreferencesController {
async updateSnapRegistry() {
let snapRegistry;
try {
snapRegistry = await fetch(KEYRING_SNAPS_REGISTRY_URL);
const response = await fetch(KEYRING_SNAPS_REGISTRY_URL);
snapRegistry = await response.json();
} catch (error) {
console.error(`Failed to fetch registry: `, error);
snapRegistry = {};