Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS-8202 Send: Recent list isn't displayed for tokens. #4043

Merged
merged 6 commits into from
Oct 16, 2024
11 changes: 9 additions & 2 deletions Tangem/App/Utilities/TransactionHistoryMapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,19 @@ struct TransactionHistoryMapper {
func mapSuggestedRecord(_ record: TransactionRecord) -> SendSuggestedDestinationTransactionRecord? {
guard
record.isOutgoing,
transactionType(from: record) == .transfer,
case .user(let address) = interactionAddress(from: record)
transactionType(from: record) == .transfer
else {
return nil
}

let address: String
switch interactionAddress(from: record) {
case .user(let value), .contract(let value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А остальные типы не должны тут обрабатываться?
Как минимум .multiple кажется весьма распостранен в UTXO сетках

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Договорились после дейлика что не надо

https://tangem.slack.com/archives/GMXC6PP71/p1729071867870609?thread_ts=1728984100.220299&cid=GMXC6PP71

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Рассуждения такие что у нас сейчас нет токенов в UTXO сетях, которые поддерживают историю транзакций, так что даже потестить не получится.

А просто для сетей UTXO (не в токенах) сейчас все ок

address = value
default:
return nil
}

let amountFormatted = transferAmount(from: record)
let date = record.date ?? Date()
let dateFormatted = dateTimeFormatter.string(from: date)
Expand Down
Loading