Use preferredTradeCurrency is fiat, otherwise the users country currency

This commit is contained in:
chimp1984 2020-12-07 13:48:43 -05:00
parent a7765d0cce
commit 249c6143c9
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3

View file

@ -292,10 +292,14 @@ public class OfferUtil {
public Optional<Volume> getFeeInUserFiatCurrency(Coin makerFee, public Optional<Volume> getFeeInUserFiatCurrency(Coin makerFee,
boolean isCurrencyForMakerFeeBtc, boolean isCurrencyForMakerFeeBtc,
CoinFormatter bsqFormatter) { CoinFormatter bsqFormatter) {
// We use the users currency derived from his selected country. We don't use the String userCurrencyCode = preferences.getPreferredTradeCurrency().getCode();
// preferredTradeCurrency from preferences as that can be also set to an altcoin. if (CurrencyUtil.isCryptoCurrency(userCurrencyCode)) {
String countryCode = preferences.getUserCountry().code; // In case the user has selected a altcoin as preferredTradeCurrency
String userCurrencyCode = CurrencyUtil.getCurrencyByCountryCode(countryCode).getCode(); // we derive the fiat currency from the user country
String countryCode = preferences.getUserCountry().code;
userCurrencyCode = CurrencyUtil.getCurrencyByCountryCode(countryCode).getCode();
}
return getFeeInUserFiatCurrency(makerFee, return getFeeInUserFiatCurrency(makerFee,
isCurrencyForMakerFeeBtc, isCurrencyForMakerFeeBtc,
userCurrencyCode, userCurrencyCode,