2016-06-08 13:53:24 +03:00
|
|
|
#include "TransactionInfo.h"
|
2016-10-02 21:40:40 +03:00
|
|
|
#include "WalletManager.h"
|
|
|
|
|
2016-06-08 13:53:24 +03:00
|
|
|
#include <QDateTime>
|
|
|
|
|
|
|
|
TransactionInfo::Direction TransactionInfo::direction() const
|
|
|
|
{
|
|
|
|
return static_cast<Direction>(m_pimpl->direction());
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TransactionInfo::isPending() const
|
|
|
|
{
|
|
|
|
return m_pimpl->isPending();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TransactionInfo::isFailed() const
|
|
|
|
{
|
|
|
|
return m_pimpl->isFailed();
|
|
|
|
}
|
|
|
|
|
2016-10-02 21:40:40 +03:00
|
|
|
|
|
|
|
QString TransactionInfo::amount() const
|
2016-06-08 13:53:24 +03:00
|
|
|
{
|
2016-10-02 21:40:40 +03:00
|
|
|
return WalletManager::instance()->displayAmount(m_pimpl->amount());
|
2016-06-08 13:53:24 +03:00
|
|
|
}
|
|
|
|
|
2016-10-02 21:40:40 +03:00
|
|
|
QString TransactionInfo::fee() const
|
2016-06-08 13:53:24 +03:00
|
|
|
{
|
2016-10-02 21:40:40 +03:00
|
|
|
return WalletManager::instance()->displayAmount(m_pimpl->fee());
|
2016-06-08 13:53:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
quint64 TransactionInfo::blockHeight() const
|
|
|
|
{
|
|
|
|
return m_pimpl->blockHeight();
|
|
|
|
}
|
|
|
|
|
|
|
|
QString TransactionInfo::hash() const
|
|
|
|
{
|
|
|
|
return QString::fromStdString(m_pimpl->hash());
|
|
|
|
}
|
|
|
|
|
|
|
|
QString TransactionInfo::timestamp()
|
|
|
|
{
|
|
|
|
QString result = QDateTime::fromTime_t(m_pimpl->timestamp()).toString(Qt::ISODate);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString TransactionInfo::paymentId()
|
|
|
|
{
|
|
|
|
return QString::fromStdString(m_pimpl->paymentId());
|
|
|
|
}
|
|
|
|
|
|
|
|
TransactionInfo::TransactionInfo(Bitmonero::TransactionInfo *pimpl, QObject *parent)
|
|
|
|
: QObject(parent), m_pimpl(pimpl)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|