Skip to content

Commit

Permalink
Move data field outside of the confirm view
Browse files Browse the repository at this point in the history
  • Loading branch information
vikmeup committed Apr 17, 2018
1 parent 6bde174 commit 03ccd54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,18 @@ class ConfigureTransactionViewController: FormViewController {
+++ Section()

<<< AppFormAppearance.textFieldFloat(tag: Values.data) {
$0.title = NSLocalizedString("configureTransaction.data.label.title", value: "Transaction Data (Optional)", comment: "")
let dataText = String(format:
NSLocalizedString(
"configureTransaction.dataField.label.title",
value: "Data (Optional). %@",
comment: ""
), self.configuration.data.description)
$0.title = dataText
$0.value = self.configuration.data.hexEncoded
}

+++ Section()

<<< AppFormAppearance.textFieldFloat(tag: Values.nonce) {
$0.title = NSLocalizedString("configureTransaction.nonce.label.title", value: "Nonce", comment: "")
$0.value = "\(self.configuration.nonce)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,6 @@ class ConfirmPaymentViewController: UIViewController {
))
}

items.append(TransactionAppearance.item(
title: detailsViewModel.dataTitle,
subTitle: detailsViewModel.dataText
) { [unowned self] _, _, _ in
self.edit()
})

for item in items {
stackViewController.addItem(item)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@ struct ConfirmPaymentDetailsViewModel {
return totalViewModel.feeText
}

var dataTitle: String {
return NSLocalizedString("confirmPayment.data.label.title", value: "Data", comment: "")
}

var dataText: String {
return transaction.data.description
}

var amountAttributedString: NSAttributedString {
switch transaction.transferType {
case .token(let token):
Expand Down

0 comments on commit 03ccd54

Please sign in to comment.