mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
export 8 decimal places when exporting a csv in btc units
This commit is contained in:
parent
8ba0a9f360
commit
ce44cfe877
3 changed files with 6 additions and 2 deletions
|
@ -82,6 +82,10 @@ public enum UnitFormat {
|
|||
return getBtcFormat().format(amount.doubleValue() / Transaction.SATOSHIS_PER_BITCOIN);
|
||||
}
|
||||
|
||||
public String tableFormatBtcValue(Long amount) {
|
||||
return getTableBtcFormat().format(amount.doubleValue() / Transaction.SATOSHIS_PER_BITCOIN);
|
||||
}
|
||||
|
||||
public String formatSatsValue(Long amount) {
|
||||
return getSatsFormat().format(amount);
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ public class TransactionsController extends WalletFormController implements Init
|
|||
|
||||
private String getCoinValue(Long value) {
|
||||
UnitFormat format = Config.get().getUnitFormat() == null ? UnitFormat.DOT : Config.get().getUnitFormat();
|
||||
return BitcoinUnit.BTC.equals(transactionsTable.getBitcoinUnit()) ? format.formatBtcValue(value) : String.format(Locale.ENGLISH, "%d", value);
|
||||
return BitcoinUnit.BTC.equals(transactionsTable.getBitcoinUnit()) ? format.tableFormatBtcValue(value) : String.format(Locale.ENGLISH, "%d", value);
|
||||
}
|
||||
|
||||
private void logMessage(String logMessage) {
|
||||
|
|
|
@ -491,7 +491,7 @@ public class UtxosController extends WalletFormController implements Initializab
|
|||
|
||||
private String getCoinValue(Long value) {
|
||||
UnitFormat format = Config.get().getUnitFormat() == null ? UnitFormat.DOT : Config.get().getUnitFormat();
|
||||
return BitcoinUnit.BTC.equals(utxosTable.getBitcoinUnit()) ? format.formatBtcValue(value) : String.format(Locale.ENGLISH, "%d", value);
|
||||
return BitcoinUnit.BTC.equals(utxosTable.getBitcoinUnit()) ? format.tableFormatBtcValue(value) : String.format(Locale.ENGLISH, "%d", value);
|
||||
}
|
||||
|
||||
private static Glyph getExternalGlyph() {
|
||||
|
|
Loading…
Reference in a new issue