Skip to content

Commit

Permalink
GH-3435 move string to a property
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryBespalov committed Jul 2, 2024
1 parent 79e38df commit 15b424a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ extension SCGModels {
struct TwapOrder: Codable {
var kind: String
var status: String
var displayName: String { "Twap order" }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ class TransactionDetailCellBuilder {
case .swapTransfer(let orderInfo):
text(orderInfo.swapTransferDisplayName, title: "Contract Interaction", expandableTitle: nil, copyText: nil)
externalURL(text: "Order details", url: orderInfo.explorerUrl)
case .twapOrder(_):
text("Twap order", title: "Contract Interaction", expandableTitle: nil, copyText: nil)
case .twapOrder(let order):
text(order.displayName, title: "Contract Interaction", expandableTitle: nil, copyText: nil)
case .creation(_):
// ignore
fallthrough
Expand Down Expand Up @@ -672,8 +672,8 @@ class TransactionDetailCellBuilder {
case .swapTransfer(let order):
type = order.swapTransferDisplayName
icon = UIImage(named: "ico-custom-tx")
case .twapOrder(_):
type = "Twap order"
case .twapOrder(let order):
type = order.displayName
icon = UIImage(named: "ico-custom-tx")
case .unknown:
type = "Unknown operation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ class TransactionListViewController: LoadableViewController, UITableViewDelegate
case .swapTransfer(let order):
image = UIImage(named: "ico-custom-tx")
title = order.swapTransferDisplayName
case .twapOrder(_):
case .twapOrder(let order):
image = UIImage(named: "ico-custom-tx")
title = "Twap order"
title = order.displayName
case .unknown:
image = UIImage(named: "ico-custom-tx")
title = "Unknown operation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ class WCIncomingTransactionRequestViewController: ReviewSafeTransactionViewContr
case .swapTransfer(let order):
imageName = "ico-custom-tx"
name = order.swapTransferDisplayName
case .twapOrder(_):
case .twapOrder(let order):
imageName = "ico-custom-tx"
name = "Twap transfer"
name = order.displayName
case .unknown:
imageName = "ico-custom-tx"
name = "Unknown operation"
Expand Down

0 comments on commit 15b424a

Please sign in to comment.