Skip to content

Commit

Permalink
Merge branch 'feature/stability_improvements' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed Jun 19, 2024
2 parents 9a8c280 + 64c53cb commit 7a2d4d6
Show file tree
Hide file tree
Showing 3 changed files with 13 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" : "8ad6dac35574b37170d2aaa05d536e8787c72c0e"
"revision" : "7342af3601139f45da065c67ca71aa060ecccb8f"
}
},
{
Expand Down
11 changes: 9 additions & 2 deletions Kukai Mobile/Modules/Activity/Cells/ActivityItemCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,19 @@ class ActivityItemCell: UITableViewCell, UITableViewCellContainerView, UITableVi
iconView.backgroundColor = .white
iconView.customCornerRadius = 20

let token = data.primaryToken
let balanceDsiplay = DependencyManager.shared.coinGeckoService.formatLargeTokenDisplay(token?.balance.toNormalisedDecimal() ?? 0, decimalPlaces: token?.decimalPlaces ?? 6)

if data.subType == .stake {
titleLabel.text = "Stake: \( (data.primaryToken?.balance ?? .zero()).normalisedRepresentation) XTZ"
titleLabel.text = "Stake: \(balanceDsiplay) XTZ"
toLabel.text = "To: "

} else if data.subType == .unstake {
titleLabel.text = "Unstake: \( (data.primaryToken?.balance ?? .zero()).normalisedRepresentation) XTZ"
titleLabel.text = "Unstake: \(balanceDsiplay) XTZ"
toLabel.text = "From: "

} else if data.subType == .finaliseUnstake {
titleLabel.text = "Finalise Unstake: \(balanceDsiplay) XTZ"
toLabel.text = "From: "
}

Expand Down
3 changes: 3 additions & 0 deletions Kukai Mobile/Services/ActivityService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ public class ActivityService {

} else if parameters?["entrypoint"] == "unstake" && destinationAddress == fromWallet.address {
kind = "unstake"

} else if parameters?["entrypoint"] == "finalize_unstake" && destinationAddress == fromWallet.address {
kind = "finalize"
}

var transaction = TzKTTransaction.placeholder(withStatus: .unconfirmed, id: previousId + 1, opHash: opHash, type: type, counter: counter, fromWallet: fromWallet, destination: destination, xtzAmount: xtzAmount, parameters: parameters, primaryToken: primaryToken, baker: nil, kind: kind)
Expand Down

0 comments on commit 7a2d4d6

Please sign in to comment.