mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
Use preferredTradeCurrency is fiat, otherwise the users country currency
This commit is contained in:
parent
a7765d0cce
commit
249c6143c9
1 changed files with 8 additions and 4 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Reference in a new issue