Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #1786: Don't use probi value for USD conversion on one-time tips
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson committed Oct 24, 2019
1 parent 9e1b0f2 commit 79eda0d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,19 @@ extension TipsDetailViewController: UITableViewDataSource, UITableViewDelegate {
let contribution = tip.weight
switch tip.rewardsCategory {
case .oneTimeTip:
let value = BATValue(probi: "\(contribution)")
cell.typeNameLabel.text = Strings.OneTimeText + Date.stringFrom(reconcileStamp: tip.reconcileStamp)
cell.tokenView.batContainer.amountLabel.text = BATValue(probi: "\(contribution)")?.displayString
cell.tokenView.batContainer.amountLabel.text = value?.displayString
cell.tokenView.usdContainer.amountLabel.text = state.ledger.dollarStringForBATAmount(value?.doubleValue ?? 0, includeCurrencyCode: false)
case .recurringTip:
cell.tokenView.batContainer.amountLabel.text = BATValue(contribution).displayString
cell.tokenView.usdContainer.amountLabel.text = state.ledger.dollarStringForBATAmount(contribution, includeCurrencyCode: false)
cell.typeNameLabel.text = Strings.RecurringText
default:
cell.tokenView.batContainer.amountLabel.text = ""
cell.tokenView.usdContainer.amountLabel.text = ""
cell.typeNameLabel.text = ""
}
cell.tokenView.usdContainer.amountLabel.text = state.ledger.dollarStringForBATAmount(contribution, includeCurrencyCode: false)
return cell
}
}
Expand Down

0 comments on commit 79eda0d

Please sign in to comment.