-
Notifications
You must be signed in to change notification settings - Fork 719
Add new line with wallet name on Transaction Confirmation #866
Add new line with wallet name on Transaction Confirmation #866
Conversation
@BloodyPixy could you pls add image of the new UI? |
} | ||
|
||
var currentWalletName: String { | ||
return keystore.recentlyUsedWallet?.info.name |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@BloodyPixy Ideally it should be: Wallet #3 (0x123...123) Use your judgment |
@vikmeup Wallet Title => Wallet |
@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. |
@BloodyPixy For sure! It should be just one field |
@vikmeup let do it like this: From Wallet |
@BloodyPixy 👍 nice! |
@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. |
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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: "") |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
Referencing #862