diff --git a/Trust/Transactions/ViewModels/TransactionCellViewModel.swift b/Trust/Transactions/ViewModels/TransactionCellViewModel.swift index a4a043118..298173f3b 100644 --- a/Trust/Transactions/ViewModels/TransactionCellViewModel.swift +++ b/Trust/Transactions/ViewModels/TransactionCellViewModel.swift @@ -71,11 +71,12 @@ struct TransactionCellViewModel { } var amount: String { - if let operationValue = operationValue { - return operationValue - } - - let value = EthereumConverter.from(value: BInt(transaction.value), to: .ether, minimumFractionDigits: 3) + let value: String = { + if let operationValue = operationValue { + return operationValue + } + return EthereumConverter.from(value: BInt(transaction.value), to: .ether, minimumFractionDigits: 3) + }() switch transaction.direction { case .incoming: return "+\(value)" case .outgoing: return "-\(value)"