aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiondesc.cpp
diff options
context:
space:
mode:
authorMark Friedenbach <mark@friedenbach.org>2014-04-22 15:46:19 -0700
committerMark Friedenbach <mark@blockstream.io>2014-09-26 15:42:04 -0700
commita372168e77a8a195613a02983f2589252698bf0f (patch)
treeb300a5f7aa007645c6ba2bd708e7a962fab2894b /src/qt/transactiondesc.cpp
parent64cfaf891fe539b36f6be37dac6c28a712d70b96 (diff)
downloadbitcoin-a372168e77a8a195613a02983f2589252698bf0f.tar.xz
Use a typedef for monetary values
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r--src/qt/transactiondesc.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 4923718341..1efad8259b 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -56,9 +56,9 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
int64_t nTime = wtx.GetTxTime();
- int64_t nCredit = wtx.GetCredit(ISMINE_ALL);
- int64_t nDebit = wtx.GetDebit(ISMINE_ALL);
- int64_t nNet = nCredit - nDebit;
+ CAmount nCredit = wtx.GetCredit(ISMINE_ALL);
+ CAmount nDebit = wtx.GetDebit(ISMINE_ALL);
+ CAmount nNet = nCredit - nDebit;
strHTML += "<b>" + tr("Status") + ":</b> " + FormatTxStatus(wtx);
int nRequests = wtx.GetRequestCount();
@@ -132,7 +132,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
//
// Coinbase
//
- int64_t nUnmatured = 0;
+ CAmount nUnmatured = 0;
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
nUnmatured += wallet->GetCredit(txout, ISMINE_ALL);
strHTML += "<b>" + tr("Credit") + ":</b> ";
@@ -206,13 +206,13 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
if (fAllToMe)
{
// Payment to self
- int64_t nChange = wtx.GetChange();
- int64_t nValue = nCredit - nChange;
+ CAmount nChange = wtx.GetChange();
+ CAmount nValue = nCredit - nChange;
strHTML += "<b>" + tr("Total debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nValue) + "<br>";
strHTML += "<b>" + tr("Total credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nValue) + "<br>";
}
- int64_t nTxFee = nDebit - wtx.GetValueOut();
+ CAmount nTxFee = nDebit - wtx.GetValueOut();
if (nTxFee > 0)
strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nTxFee) + "<br>";
}