6 #include <validation.h> 27 return tr(
"conflicted with a transaction with %1 confirmations").arg(-nDepth);
28 else if (mi != wallet->
mapWallet.end() && (
GetAdjustedTime() - mi->second.nTimeReceived > 2 * 60) && mi->second.GetRequestCount() == 0)
29 return tr(
"%1/offline").arg(nDepth);
32 if(mi != wallet->
mapWallet.end() && mi->second.InMempool())
33 return tr(
"0/unconfirmed, in memory pool");
35 return tr(
"0/unconfirmed, not in memory pool");
38 return tr(
"%1/unconfirmed").arg(nDepth);
40 return tr(
"%1 confirmations").arg(nDepth);
48 strHTML.reserve(4000);
49 strHTML +=
"<html><font face='verdana, arial, helvetica, sans-serif'>";
51 int64_t nTime = rec->
time;
55 QString unit = QString::fromStdString(rec->
tokenSymbol);
57 strHTML +=
"<b>" + tr(
"Status") +
":</b> " +
FormatTxStatus(wallet, wtx);
63 strHTML +=
"<b>" + tr(
"Transaction ID") +
":</b> " + rec->
getTxID() +
"<br>";
65 strHTML +=
"<b>" + tr(
"Token Address") +
":</b> " + QString::fromStdString(wtx.
strContractAddress) +
"<br>";
67 strHTML +=
"<b>" + tr(
"From") +
":</b> " + QString::fromStdString(wtx.
strSenderAddress) +
"<br>";
69 strHTML +=
"<b>" + tr(
"To") +
":</b> " + QString::fromStdString(wtx.
strReceiverAddress) +
"<br>";
82 strHTML +=
"</font></html>";
std::string strReceiverAddress
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::signed_magnitude, boost::multiprecision::unchecked, void >> s256
CCriticalSection cs_wallet
QString dateTimeStr(const QDateTime &date)
static QString formatTokenWithUnit(const QString unit, int decimals, const int256_t &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format token as string.
UI model for a token transaction.
static QString FormatTxStatus(CWallet *wallet, const CTokenTx &wtx)
std::string strContractAddress
#define AssertLockHeld(cs)
int Height() const
Return the maximal height in the chain.
static QString toHTML(CWallet *wallet, CTokenTx &wtx, TokenTransactionRecord *rec)
CChain chainActive
The currently-connected chain of blocks (protected by cs_main).
QString getTxID() const
Return the unique identifier for this transaction (part)
int64_t GetAdjustedTime()
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
std::map< uint256, CWalletTx > mapWallet
std::string strSenderAddress
static const int RecommendedNumConfirmations
Number of confirmation recommended for accepting a token transaction.