Skip to content

Commit 0cb6fb9

Browse files
Use proper API for getting file content
1 parent 77ff89d commit 0cb6fb9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/snaps-utils/src/manifest/validators/production-platform-version.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ const determineProductionVersion = useFileSystemCache(
2424
const latestReleaseCommit = latestReleaseJson.target_commitish;
2525

2626
const packageJsonResponse = await fetch(
27-
`https://raw.githubusercontent.com/MetaMask/metamask-extension/${latestReleaseCommit}/package.json`,
27+
`https://api.github.com/repos/metamask/metamask-extension/contents/package.json?ref=${latestReleaseCommit}`,
28+
{ headers: new Headers({ accept: 'application/vnd.github.raw+json' }) },
2829
);
2930

3031
const packageJson = await packageJsonResponse.json();

0 commit comments

Comments
 (0)