wownero
/
wownerujo
Archived
4
0
Fork 0

fix hardcoded format

openssl-1.1.0
fuwa 6 years ago
parent 299d0bd32e
commit 7c1b6be780

@ -962,7 +962,7 @@ public class WalletActivity extends SecureActivity implements WalletFragment.Lis
tvName.setText(wallet.getName());
final TextView tvBalance = (TextView) accountsView.getHeaderView(0).findViewById(R.id.tvBalance);
tvBalance.setText(getString(R.string.accounts_balance,
Helper.getDisplayAmount(wallet.getBalanceAll(), 5)));
Helper.getDisplayAmount(wallet.getBalanceAll(), Helper.DISPLAY_DIGITS_INFO)));
Menu menu = accountsView.getMenu();
menu.removeGroup(R.id.accounts_list);
final int n = wallet.getNumAccounts();

@ -145,7 +145,7 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
}
if ((infoItem.fee > 0)) {
String fee = Helper.getDisplayAmount(infoItem.fee, 5);
String fee = Helper.getDisplayAmount(infoItem.fee, Helper.DISPLAY_DIGITS_INFO);
tvFee.setText(context.getString(R.string.tx_list_fee, fee));
tvFee.setVisibility(View.VISIBLE);
} else {

@ -209,7 +209,8 @@ public class Helper {
if (isXmr) { // XMR
long xmr = Wallet.getAmountFromDouble(amount);
if ((xmr > 0) || (amount == 0)) {
displayB = String.format(Locale.US, "%,.4f", amount);
String displayFormat = String.format(Locale.US, "%%,.%1df", DISPLAY_DIGITS_INFO);
displayB = String.format(Locale.US, displayFormat, amount);
} else {
displayB = null;
}