Fix app crashing when safeTransactions is undefined

This commit is contained in:
nicosampler 2020-05-27 13:17:11 -03:00
parent de4d564955
commit afa1f92d3d
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,10 @@ export const getAwaitingTransactions = (allTransactions, cancellationTransaction
}
const allAwaitingTransactions = allTransactions.map((safeTransactions) => {
if (!safeTransactions) {
return []
}
const nonCancelledTransactions = safeTransactions.filter((transaction) => {
// If transactions are not executed, but there's a transaction with the same nonce EXECUTED later
// it means that the transaction was cancelled (Replaced) and shouldn't get executed