New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add different notification messages for vote transactions #766
Conversation
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.
move strings to other languages
I don't get what you mean? |
var amount: String { | ||
switch tx!.type { | ||
case DcrlibwalletTxTypeVote: | ||
return String(format: LocalizedStrings.voteReward, tx!.voteReward) |
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.
tx!.voteReward
is in int64, convert it to a decimal number.
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.
it's not necessary
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.
What's not necessary? Display the vote reward in the notification or converting the vote reward to a decimal number?
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.
@JustinBeBoy what's not necessary?
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.
sorry I mean "tx!.voteReward is in int64, convert it to a decimal number."
not necessary
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.
Why is it not necessary to display the amount in float64 instead of int64? @JustinBeBoy
case DcrlibwalletTxTypeRevocation: | ||
return "" | ||
default: | ||
return "\(LocalizedStrings.youReceived) \(tx!.dcrAmount.round(8).description) DCR" |
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.
Put this entire sentence in localizable strings.
"youReceived" = "You received %@ DCR";
var amount: String { | ||
switch tx!.type { | ||
case DcrlibwalletTxTypeVote: | ||
return String(format: LocalizedStrings.voteReward, tx!.voteReward) |
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.
it's not necessary
localize entire receive notification text
781e903
to
952e0f1
Compare
var amount: String { | ||
switch tx!.type { | ||
case DcrlibwalletTxTypeVote: | ||
return String(format: LocalizedStrings.voteReward, tx!.voteReward.toDecimal) |
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.
This doesn't convert the value from atoms to dcr.
return String(format: LocalizedStrings.voteReward, tx!.voteReward.toDecimal) | |
return String(format: LocalizedStrings.voteReward, tx!.dcrVoteReward.round(8).description) |
@@ -9,6 +9,12 @@ | |||
import UIKit | |||
import Dcrlibwallet | |||
|
|||
extension Int64 { |
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.
This is not needed.
it's not necessary.
Resolves #731
This PR adds notification messages for the various Vote Transactions