Skip to content

Commit

Permalink
fix: mixed case currency conversion (#223,#231)
Browse files Browse the repository at this point in the history
Force currency code to be upper case to compensate for Yahoo improperly formatting some foreign currencies (at least GBP), which confused currency conversion.
  • Loading branch information
deroshkin committed Aug 27, 2022
1 parent 6600711 commit 76fee90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/quote/yahoo/quote.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func transformResponseQuote(responseQuote ResponseQuote) c.AssetQuote {
Symbol: responseQuote.Symbol,
Class: assetClass,
Currency: c.Currency{
FromCurrencyCode: responseQuote.Currency,
FromCurrencyCode: strings.ToUpper(responseQuote.Currency),
},
QuotePrice: c.QuotePrice{
Price: responseQuote.RegularMarketPrice,
Expand Down

0 comments on commit 76fee90

Please sign in to comment.