@@ -451,7 +451,9 @@ QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const
451451
452452QString TransactionTableModel::formatTxAmount (const TransactionRecord *wtx, bool showUnconfirmed, BitcoinUnits::SeparatorStyle separators) const
453453{
454- QString str = BitcoinUnits::format (walletModel->getOptionsModel ()->getDisplayUnit (), wtx->credit + wtx->debit , false , separators);
454+ const bool privacy = walletModel->getOptionsModel ()->getOption (OptionsModel::MaskValues).toBool ();
455+ BitcoinUnit unit = walletModel->getOptionsModel ()->getDisplayUnit ();
456+ QString str = BitcoinUnits::formatWithPrivacy (unit, wtx->credit + wtx->debit , separators, privacy);
455457 if (showUnconfirmed)
456458 {
457459 if (!wtx->status .countsForBalance )
@@ -698,11 +700,15 @@ QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex
698700 return QModelIndex ();
699701}
700702
703+ void TransactionTableModel::refreshAmounts ()
704+ {
705+ Q_EMIT dataChanged (index (0 , Amount), index (priv->size ()-1 , Amount));
706+ }
707+
701708void TransactionTableModel::updateDisplayUnit ()
702709{
703- // emit dataChanged to update Amount column with the current unit
704710 updateAmountColumnTitle ();
705- Q_EMIT dataChanged ( index ( 0 , Amount), index (priv-> size ()- 1 , Amount));
711+ refreshAmounts (); // refresh ' Amount' column to update the current unit
706712}
707713
708714void TransactionTablePriv::NotifyTransactionChanged (const uint256 &hash, ChangeType status)
0 commit comments