From 2454c608a7c247054c39db7804507be23ab9155e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20J=C3=A4ckel?= Date: Fri, 1 Sep 2023 15:10:56 +0200 Subject: [PATCH] Missing incoming transfers (#2006) * submittedAt is null for incoming transfers. * Do not treat incoming transfers as pending. Or unknown --- .../safe/ui/transactions/TransactionListViewModel.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/gnosis/safe/ui/transactions/TransactionListViewModel.kt b/app/src/main/java/io/gnosis/safe/ui/transactions/TransactionListViewModel.kt index a43a4addb..e7a929d5f 100644 --- a/app/src/main/java/io/gnosis/safe/ui/transactions/TransactionListViewModel.kt +++ b/app/src/main/java/io/gnosis/safe/ui/transactions/TransactionListViewModel.kt @@ -121,9 +121,8 @@ class TransactionListViewModel // that was submitted for execution if (txLocal?.safeTxNonce == txListEntry.transaction.executionInfo?.nonce) { // use submittedAt timestamp to distinguish between conflicting transactions - if (txLocal?.submittedAt == txListEntry.transaction.timestamp.time && txListEntry.transaction.txStatus == TransactionStatus.AWAITING_EXECUTION) { + if ((txLocal?.submittedAt == null || txLocal?.submittedAt == txListEntry.transaction.timestamp.time) && txListEntry.transaction.txStatus == TransactionStatus.AWAITING_EXECUTION) { val tx = txListEntry.transaction.copy(txStatus = TransactionStatus.PENDING) - txListEntry.transaction getTransactionView( chain = safe.chain, transaction = tx, @@ -133,7 +132,14 @@ class TransactionListViewModel localOwners = owners ) } else { - TransactionView.Unknown + getTransactionView( + chain = safe.chain, + transaction = txListEntry.transaction, + safes = safes, + needsYourConfirmation = false, + isConflict = false, + localOwners = owners + ) } } else { val isConflict = txListEntry.conflictType != ConflictType.None