Skip to content
This repository has been archived by the owner on Jun 2, 2019. It is now read-only.

Add new line with wallet name on Transaction Confirmation #866

Merged
merged 13 commits into from
Aug 3, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jul 30, 2018

Referencing #862

@OlegGordiichuk
Copy link
Contributor

@BloodyPixy could you pls add image of the new UI?

}

var currentWalletName: String {
return keystore.recentlyUsedWallet?.info.name
Copy link
Contributor

Choose a reason for hiding this comment

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

We could use keystore.mainWallet instead of the keystore.recentlyUsedWallet it will increase readability of the code. Also could we avoid of "??" it will dramatically increase complication time.

Copy link
Author

Choose a reason for hiding this comment

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

keystore.mainWallet is also optional, so we won't avoid '??', but I agree regarding clarity and will use it instead.

@ghost
Copy link
Author

ghost commented Jul 30, 2018

@OlegGordiichuk
img_0589

@vikmeup
Copy link
Contributor

vikmeup commented Jul 30, 2018

@BloodyPixy Ideally it should be: Wallet #3 (0x123...123)

Use your judgment

@vikmeup
Copy link
Contributor

vikmeup commented Jul 30, 2018

@vikmeup Wallet Title => Wallet

@ghost
Copy link
Author

ghost commented Jul 30, 2018

@vikmeup , I did it this way, because the sender address (current wallet) is included in 'Sender' field. I suggest merging sender and wallet name then. It will look more clear.

@vikmeup
Copy link
Contributor

vikmeup commented Jul 30, 2018

@BloodyPixy For sure! It should be just one field

@ghost
Copy link
Author

ghost commented Jul 30, 2018

@vikmeup let do it like this:

From Wallet
Wallet Name (address)

@vikmeup
Copy link
Contributor

vikmeup commented Jul 30, 2018

@BloodyPixy 👍 nice!

@ghost
Copy link
Author

ghost commented Jul 30, 2018

@OlegGordiichuk keystore.mainWallet is not changed, when changing the wallet in settings. As I understand, there is only one mainWallet, at least until it is removed and substituted for another. We need different behavior, so I will use keystore.recentlyUsedWallet. At least, that what is done in other places.

@ghost
Copy link
Author

ghost commented Jul 30, 2018

Updated appearance
img_0592

Copy link
Contributor

@vikmeup vikmeup left a comment

Choose a reason for hiding this comment

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

let's just use From as before and avoid introducing new words

var currentWalletDescriptionString: String {
return currentWalletName + " " + ("(\(currentWalletAddress))")
}

var paymentFromTitle: String {
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use paymentFromTitle property

}

private var currentWallet: WalletInfo? {
return keystore.recentlyUsedWallet ?? keystore.wallets.first
Copy link
Contributor

Choose a reason for hiding this comment

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

pass current wallet and then use it here.

…tion

* master:
  Add option to skip import main wallet
  Disable AuthenticateUserCoordinatorTests
  Version bump
  Use valueToSend()
  Add RPCServer as new parameter of the NonFungibleTokenObject. So now we could open nftokens. (#872)
  Fix an issue with adding extra ether to each transaction
  Enable deletion of the main wallet
  Average USD field update on QR code scanning. (#861)
@@ -212,7 +212,7 @@
"configureTransaction.dataField.label.title" = "Data (Optional). %@";
"Nonce" = "Nonce";
"transaction.recipient.label.title" = "Recipient";
"transaction.sender.label.title" = "Sender";
"transaction.sender.label.title" = "From";
Copy link
Contributor

Choose a reason for hiding this comment

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

do not change this.

}

var currentWalletDescriptionString: String {
return currentWalletName + " " + ("(\(currentWalletAddress))")
}

var paymentFromTitle: String {
return NSLocalizedString("transaction.sender.label.title", value: "Sender", comment: "")
return NSLocalizedString("transaction.sender.label.title", value: "From", comment: "")
Copy link
Contributor

Choose a reason for hiding this comment

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

same here. Use R.string.localized

@@ -216,6 +216,7 @@
"Are you sure you would like to delete?" = "Sind Sie sicher, dass Sie löschen möchten?";
"confirmPayment.amount.label.title" = "Betrag";
"confirmPayment.dapp.label.title" = "DApp";
"confirmPayment.walletTitle.label.title" = "Aus Brieftasche";
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove this? do not pull strings unless

"Are you sure you would like to delete?" = "Are you sure you would like to delete?";
"confirmPayment.amount.label.title" = "Amount";
"confirmPayment.dapp.label.title" = "DApp";
"confirmPayment.walletTitle.label.title" = "From Wallet";
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

return session.account.address.description
}

var currentWalletDescriptionString: String {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you combine all in one string? no need to create separate variables.

maybe one test case?

func testActionButtonTitleOnSignAndSend() {
let bigInt = BigInt("11274902618710000000000")!

let transaction = PreviewTransaction(
Copy link
Contributor

Choose a reason for hiding this comment

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

make factory for PreviewTransaction, so you don't need to specify so much

@vikmeup vikmeup merged commit 411554e into master Aug 3, 2018
@vikmeup vikmeup deleted the feature/862-wallet-name-on-confirm-transaction branch August 3, 2018 04:07
ghost pushed a commit that referenced this pull request Aug 3, 2018
…ansactions

* master:
  Add new line with wallet name on Transaction Confirmation (#866)
  Mark wallet as main when imported
  Add link to help center (#876)

# Conflicts:
#	Trust.xcodeproj/project.pbxproj
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants