Skip to content

Commit

Permalink
MOB-1856 - Fixed token logos inconsistency and added tokens sorting o…
Browse files Browse the repository at this point in the history
…n public profile (#439)
  • Loading branch information
Oleg-Pecheneg authored Mar 13, 2024
1 parent a82ffbc commit c9714a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ struct BalanceTokenUIDescription: Hashable, Identifiable {
if let cachedImage = appContext.imageLoadingService.cachedImage(for: .currencyTicker(ticker,
size: size,
style: style),
downsampleDescription: .icon) {
downsampleDescription: .icon),
logoURL == nil {
iconUpdated(cachedImage)
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ extension PublicProfileView {
Task {
await performAsyncErrorCatchingBlock {
let balances = try await appContext.walletsDataService.loadBalanceFor(walletAddress: domain.walletAddress)
tokens = balances.map { BalanceTokenUIDescription.extractFrom(walletBalance: $0) }.flatMap({ $0 })
tokens = balances.map { BalanceTokenUIDescription.extractFrom(walletBalance: $0) }.flatMap({ $0 }).sorted(by: { $0.balanceUsd > $1.balanceUsd })
}
}
}
Expand Down

0 comments on commit c9714a5

Please sign in to comment.