Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into version/0.40
Browse files Browse the repository at this point in the history
# Conflicts:
#	UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj
  • Loading branch information
ealymbaev committed Sep 6, 2024
2 parents d52a604 + baeec1c commit 7bc9026
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ struct MultiSwapQuotesView: View {
VStack(alignment: .leading, spacing: 1) {
Text(quote.provider.name).textSubhead2(color: .themeLeah)

if quote.provider.id == viewModel.bestQuote?.provider.id {
Text("swap.quotes.best_price".localized).textSubhead2(color: .themeRemus)
}
// if quote.provider.id == viewModel.bestQuote?.provider.id {
// Text("swap.quotes.best_price".localized).textSubhead2(color: .themeRemus)
// }
}

Spacer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,12 @@ class MultiSwapViewModel: ObservableObject {

@Published var quotes: [Quote] = [] {
didSet {
bestQuote = quotes.max { $0.quote.amountOut < $1.quote.amountOut }
if let featuredQuote = quotes.first(where: { $0.provider is OneInchMultiSwapProvider }) {
bestQuote = featuredQuote
} else {
bestQuote = quotes.max { $0.quote.amountOut < $1.quote.amountOut }
}

syncCurrentQuote()

timer?.invalidate()
Expand Down

0 comments on commit 7bc9026

Please sign in to comment.