Skip to content

Commit

Permalink
Add preference 4 well-known currency
Browse files Browse the repository at this point in the history
  • Loading branch information
VibeNL committed Oct 31, 2023
1 parent 814489d commit 5189262
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions GhostfolioSidekick/Ghostfolio/API/GhostfolioAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public async Task UpdateAccount(Model.Account account)
.ThenBy(x => (expectedAssetClass?.Contains(x.AssetClass.GetValueOrDefault()) ?? false) ? 0 : 1)
.ThenBy(x => (expectedAssetSubClass?.Contains(x.AssetSubClass.GetValueOrDefault()) ?? false) ? 0 : 1)
.ThenBy(x => x.Currency.Symbol == expectedCurrency?.Symbol ? 0 : 1)
.ThenBy(x => new[] { "EUR", "USD", "GBP" }.Contains(x.Currency.Symbol) ? 0 : 1) // prefer wellknown currencies
.ThenBy(x => x.Name.Length)
.FirstOrDefault();
AddToCache(identifier, filteredAsset, memoryCache);
Expand Down

0 comments on commit 5189262

Please sign in to comment.