mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-11 09:08:02 +00:00
avoid showing balance in fiat when exchange source is none
This commit is contained in:
@@ -6,9 +6,9 @@ import com.googlecode.lanterna.TerminalSize;
|
||||
import com.googlecode.lanterna.gui2.*;
|
||||
import com.googlecode.lanterna.gui2.table.Table;
|
||||
import com.googlecode.lanterna.gui2.table.TableModel;
|
||||
import com.sparrowwallet.drongo.protocol.Transaction;
|
||||
import com.sparrowwallet.sparrow.AppServices;
|
||||
import com.sparrowwallet.sparrow.event.*;
|
||||
import com.sparrowwallet.sparrow.io.Config;
|
||||
import com.sparrowwallet.sparrow.net.ExchangeSource;
|
||||
import com.sparrowwallet.sparrow.terminal.SparrowTerminal;
|
||||
import com.sparrowwallet.sparrow.terminal.wallet.table.CoinTableCell;
|
||||
@@ -94,7 +94,7 @@ public class TransactionsDialog extends WalletDialog {
|
||||
balance.setText(formatBitcoinValue(walletTransactionsEntry.getBalance(), true));
|
||||
mempoolBalance.setText(formatBitcoinValue(walletTransactionsEntry.getMempoolBalance(), true));
|
||||
|
||||
if(AppServices.getFiatCurrencyExchangeRate() != null) {
|
||||
if(AppServices.getFiatCurrencyExchangeRate() != null && Config.get().getExchangeSource() != ExchangeSource.NONE) {
|
||||
fiatBalance.setText(formatFiatValue(getFiatValue(walletTransactionsEntry.getBalance(), AppServices.getFiatCurrencyExchangeRate())));
|
||||
fiatMempoolBalance.setText(formatFiatValue(getFiatValue(walletTransactionsEntry.getMempoolBalance(), AppServices.getFiatCurrencyExchangeRate())));
|
||||
} else {
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.sparrowwallet.drongo.wallet.*;
|
||||
import com.sparrowwallet.sparrow.AppServices;
|
||||
import com.sparrowwallet.sparrow.EventManager;
|
||||
import com.sparrowwallet.sparrow.event.*;
|
||||
import com.sparrowwallet.sparrow.io.Config;
|
||||
import com.sparrowwallet.sparrow.net.ExchangeSource;
|
||||
import com.sparrowwallet.sparrow.terminal.ModalDialog;
|
||||
import com.sparrowwallet.sparrow.terminal.SparrowTerminal;
|
||||
@@ -233,7 +234,7 @@ public class UtxosDialog extends WalletDialog {
|
||||
balance.setText(formatBitcoinValue(walletUtxosEntry.getBalance(), true));
|
||||
mempoolBalance.setText(formatBitcoinValue(walletUtxosEntry.getMempoolBalance(), true));
|
||||
|
||||
if(AppServices.getFiatCurrencyExchangeRate() != null) {
|
||||
if(AppServices.getFiatCurrencyExchangeRate() != null && Config.get().getExchangeSource() != ExchangeSource.NONE) {
|
||||
fiatBalance.setText(formatFiatValue(getFiatValue(walletUtxosEntry.getBalance(), AppServices.getFiatCurrencyExchangeRate())));
|
||||
fiatMempoolBalance.setText(formatFiatValue(getFiatValue(walletUtxosEntry.getMempoolBalance(), AppServices.getFiatCurrencyExchangeRate())));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user