Skip to content

Commit

Permalink
- update library
Browse files Browse the repository at this point in the history
- fix typo
- tweak to baker voting logic
  • Loading branch information
simonmcl committed Jan 17, 2025
1 parent da4e324 commit 9546584
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"location" : "https://github.com/kukai-wallet/kukai-core-swift",
"state" : {
"branch" : "develop",
"revision" : "e703138a3837b310396f6d8a951531e66dd6e496"
"revision" : "691e4ddd77cee90226f7a2131bb7d89fb226a195"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Kukai Mobile/Localization/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"error-wc2-invalid-request"="Kukai received an invalid request. Please refresh the application you are trying to use with and try again";

"error-unknown"="Unknwon error occured";
"error-unknown-later"="Unknwon error occured fetching information. PLease try again later";
"error-unknown-later"="Unknwon error occured fetching information. Please try again later";
"error-stake-wizard-unknown"="The server failed to respond multiple times to indicate the status of the transaction. Please try again later";

"warning-fee-very-high"="Warning: Transaction fee is very high";
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,20 @@ class TokenDetailsBakerCell: UITableViewCell {

let filterTrueVotes = data.votingParticipation.filter { $0 }
if filterTrueVotes.count == 5 {
// Voted in last 5 available periods = green tick
regularlyVotesIcon.image = UIImage.init(named: "Check")
regularlyVotesIcon.tintColor = .colorNamed("BGGood4")

} else if filterTrueVotes.count >= 3 {
} else if filterTrueVotes.count >= 1 && data.votingParticipation.last == false {
// Hasn't voted in most recent period = yellow warning
regularlyVotesIcon.image = UIImage.init(named: "AlertKnockout")
regularlyVotesIcon.tintColor = .colorNamed("TxtB-alt4")

} else if filterTrueVotes.count >= 2 || data.votingParticipation.last == true {
// Voted in at least 2 periods, or voted in most recent = yellow tick
regularlyVotesIcon.image = UIImage.init(named: "Check")
regularlyVotesIcon.tintColor = .colorNamed("TxtB-alt4")

} else {
regularlyVotesIcon.image = UIImage.init(named: "Close")
regularlyVotesIcon.tintColor = .colorNamed("TxtAlert4")
Expand Down

0 comments on commit 9546584

Please sign in to comment.