Fix isSafe util function

We were calling `return query?.safe !== null ? true : false` but since
`query` can become `undefined` through the optional chaining operator,
    we were returning `true` if the query wasn't able to retrieve
    anything.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2022-09-23 18:13:40 +02:00
parent 21ae1210cc
commit a47bffdddf
+1 -1
View File
@@ -592,7 +592,7 @@ export async function isSafe(
addr: address.toLowerCase(),
});
return query?.safe !== null ? true : false;
return Boolean(query?.safe);
}
// Get a Gnosis Safe at an address.