diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-10-10 15:29:56 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-10-10 15:29:56 +0200 |
| commit | 053e7c7cdae92659500d01e619f039d4c15ea9d3 (patch) | |
| tree | ca91d8dc8d661a8ef81ad6116e3f8574fb2b0d70 /src/libwalletqt/TransactionInfo.cpp | |
| parent | fab66fec38a37c35bac90836a462404b5e4b464c (diff) | |
| parent | b1454c6a1366ccf044d9ff92ac1aa95d2249f06b (diff) | |
| download | monzero-gui-053e7c7cdae92659500d01e619f039d4c15ea9d3.tar.gz monzero-gui-053e7c7cdae92659500d01e619f039d4c15ea9d3.tar.xz monzero-gui-053e7c7cdae92659500d01e619f039d4c15ea9d3.zip | |
Merge pull request #41
b1454c6 removed duplicated-by-mistake code (Ilya Kitaev)
be135e3 Processing splash formatting improved (Ilya Kitaev)
54b22d2 Wizard: finish page: restore height hidden if not set (Ilya Kitaev)
d67071a Settings page: layout items vertically (Ilya Kitaev)
4f4cc9c Settings page: small renaming and formatting (Ilya Kitaev)
da552a0 History: Fixed filter collapse (Ilya Kitaev)
7ed623e Basic mode: updating balance properly (Ilya Kitaev)
eafcf71 Minimized aka basic mode (Ilya Kitaev)
a032c84 History: fee color (Ilya Kitaev)
60b2d90 History: display "fee" for sent transactions (Ilya Kitaev)
0ac27e1 History: filter by amount (Ilya Kitaev)
10c2786 added restore height to wizardFinish (Jacob Brydolf)
883762c removed daemon-blockchain-progress rests (Jacob Brydolf)
38d9034 Wizard: added restore-height (Jacob Brydolf)
7f0d6c4 persistentSettings: added restoreHeight (Jacob Brydolf)
9f336a5 libwalletqt: added restore-height parameter to recoveryWallet(); (Jacob Brydolf)
0e0b0be removed moneroComponets dependency (Jacob Brydolf)
38db5a4 Integrate splash counter with restore-height (Jacob Brydolf)
868610c fix conflict (Jacob Brydolf)
4901839 added comma/locale separation to sync counter (Jacob Brydolf)
8b748bf History: filter by amount (Ilya Kitaev)
9b09e83 History: filtering by paymentId and date (Ilya Kitaev)
e3cea85 TransactionHistory: firstDateTime and lastDateTime properties (Ilya Kitaev)
9927182 Fix: unused dummy property removed (Ilya Kitaev)
fd9ed56 Fix: DatePicker component doesn't update the date (Ilya Kitaev)
612c497 TransactionHistory sorting (Ilya Kitaev)
e7e6c58 Adding sort-filter-proxy model (Ilya Kitaev)
0498c3b Transaction history is not crashing and refreshing properly (Ilya Kitaev)
defc2a4 build: get_libwallet_api.sh accepts build type ("Debug" or "Release", release is default); extra build script that skips cmake invocations (Ilya Kitaev)
2966b0d settings page: daemon change + password prompt on seed view (Jacob Brydolf)
9700944 close wallet before reopen (Jacob Brydolf)
522b067 Simple transaction history (Ilya Kitaev)
9cc92bf added onPageCompleted (Jacob Brydolf)
53d3bc4 Receive page: display long address from the beginning in TextField (Ilya Kitaev)
5814c19 Fixed overlapping clipboard icons on recieve page (Jacob Brydolf)
cd1247c Added option to show seed on settings-page (Jacob Brydolf)
af70c81 Added daemon BC sync progress bar depends on https://github.com/monero-project/monero/pull/1173 (Jacob Brydolf)
6a50951 Removed hardcoded height from PasswordDialog (Ilya Kitaev)
819be91 Integrating TransactionHistoryModel (Ilya Kitaev)
56c3579 Replaced Loader with StackView; Fixed payment id generation (Ilya Kitaev)
0ff3fd3 added TransactionHistoryModel; renamings (Ilya Kitaev)
bd8646d UX improvements in wizard - password page styling - tab navigation / focus on load - click language loads next page (Jacob Brydolf)
Diffstat (limited to 'src/libwalletqt/TransactionInfo.cpp')
| -rw-r--r-- | src/libwalletqt/TransactionInfo.cpp | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/libwalletqt/TransactionInfo.cpp b/src/libwalletqt/TransactionInfo.cpp index 192e85e5..248fd73e 100644 --- a/src/libwalletqt/TransactionInfo.cpp +++ b/src/libwalletqt/TransactionInfo.cpp @@ -1,4 +1,6 @@ #include "TransactionInfo.h" +#include "WalletManager.h" + #include <QDateTime> TransactionInfo::Direction TransactionInfo::direction() const @@ -16,15 +18,21 @@ bool TransactionInfo::isFailed() const return m_pimpl->isFailed(); } -quint64 TransactionInfo::amount() const + +double TransactionInfo::amount() const { - return m_pimpl->amount(); + // there's no unsigned uint64 for JS, so better use double + return WalletManager::instance()->displayAmount(m_pimpl->amount()).toDouble(); } -quint64 TransactionInfo::fee() const +QString TransactionInfo::displayAmount() const { - return m_pimpl->fee(); + return WalletManager::instance()->displayAmount(m_pimpl->amount()); +} +QString TransactionInfo::fee() const +{ + return WalletManager::instance()->displayAmount(m_pimpl->fee()); } quint64 TransactionInfo::blockHeight() const @@ -37,13 +45,23 @@ QString TransactionInfo::hash() const return QString::fromStdString(m_pimpl->hash()); } -QString TransactionInfo::timestamp() +QDateTime TransactionInfo::timestamp() const { - QString result = QDateTime::fromTime_t(m_pimpl->timestamp()).toString(Qt::ISODate); + QDateTime result = QDateTime::fromTime_t(m_pimpl->timestamp()); return result; } -QString TransactionInfo::paymentId() +QString TransactionInfo::date() const +{ + return timestamp().date().toString(Qt::ISODate); +} + +QString TransactionInfo::time() const +{ + return timestamp().time().toString(Qt::ISODate); +} + +QString TransactionInfo::paymentId() const { return QString::fromStdString(m_pimpl->paymentId()); } |
