fix(wallet) prioritize type SendAT for pending entries in activity

In case both to/from addresses are present in the list we were using
the same logic as for transfers. However, this doesn't make sense given
that we can have only one entry in pending activity.

The following cases are still covered

- When the receiver is in addresses we get received
- When both receiver and sender are in the list will get sent
- When the sender is on the list we will get sent

Updates status-desktop #12120
This commit is contained in:
Stefan 2024-01-31 12:50:49 -05:00 committed by Stefan Dunca
parent 9879b1ea77
commit 31a2d403ef
1 changed files with 1 additions and 5 deletions

View File

@ -359,11 +359,7 @@ SELECT
CASE CASE
WHEN from_join.address IS NOT NULL AND to_join.address IS NULL THEN fromTrType WHEN from_join.address IS NOT NULL AND to_join.address IS NULL THEN fromTrType
WHEN to_join.address IS NOT NULL AND from_join.address IS NULL THEN toTrType WHEN to_join.address IS NOT NULL AND from_join.address IS NULL THEN toTrType
WHEN from_join.address IS NOT NULL AND to_join.address IS NOT NULL THEN WHEN from_join.address IS NOT NULL AND to_join.address IS NOT NULL THEN fromTrType
CASE
WHEN from_join.address < to_join.address THEN fromTrType
ELSE toTrType
END
ELSE NULL ELSE NULL
END as tr_type, END as tr_type,
pending_transactions.from_address AS from_address, pending_transactions.from_address AS from_address,