mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-13 19:44:12 +00:00
Set timeout to Safe-Apps fetch (#1158)
Co-authored-by: Mikhail Mikheev <mmvsha73@gmail.com>
This commit is contained in:
parent
253639d009
commit
0b25094b95
@ -51,7 +51,7 @@ export const getAppInfoFromUrl = async (appUrl?: string): Promise<SafeApp> => {
|
|||||||
const noTrailingSlashUrl = removeLastTrailingSlash(res.url)
|
const noTrailingSlashUrl = removeLastTrailingSlash(res.url)
|
||||||
|
|
||||||
try {
|
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
|
// verify imported app fulfil safe requirements
|
||||||
if (!appInfo || !appInfo.data || !appInfo.data.name || !appInfo.data.description) {
|
if (!appInfo || !appInfo.data || !appInfo.data.name || !appInfo.data.description) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user