Set timeout to Safe-Apps fetch (#1158)

Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
This commit is contained in:
nicolas 2020-07-24 11:36:41 -03:00 committed by GitHub
parent 253639d009
commit 0b25094b95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ export const getAppInfoFromUrl = async (appUrl?: string): Promise<SafeApp> => {
const noTrailingSlashUrl = removeLastTrailingSlash(res.url)
try {
const appInfo = await axios.get(`${noTrailingSlashUrl}/manifest.json`)
const appInfo = await axios.get(`${noTrailingSlashUrl}/manifest.json`, { timeout: 5_000 })
// verify imported app fulfil safe requirements
if (!appInfo || !appInfo.data || !appInfo.data.name || !appInfo.data.description) {