mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
walletAPI: correct confirmations in txHistory for unsynced wallets
This commit is contained in:
parent
9442b04302
commit
d92618675b
1 changed files with 2 additions and 2 deletions
|
@ -134,7 +134,7 @@ void TransactionHistoryImpl::refresh()
|
||||||
ti->m_subaddrAccount = pd.m_subaddr_index.major;
|
ti->m_subaddrAccount = pd.m_subaddr_index.major;
|
||||||
ti->m_label = m_wallet->m_wallet->get_subaddress_label(pd.m_subaddr_index);
|
ti->m_label = m_wallet->m_wallet->get_subaddress_label(pd.m_subaddr_index);
|
||||||
ti->m_timestamp = pd.m_timestamp;
|
ti->m_timestamp = pd.m_timestamp;
|
||||||
ti->m_confirmations = wallet_height - pd.m_block_height;
|
ti->m_confirmations = (wallet_height > pd.m_block_height) ? wallet_height - pd.m_block_height : 0;
|
||||||
ti->m_unlock_time = pd.m_unlock_time;
|
ti->m_unlock_time = pd.m_unlock_time;
|
||||||
m_history.push_back(ti);
|
m_history.push_back(ti);
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ void TransactionHistoryImpl::refresh()
|
||||||
ti->m_subaddrAccount = pd.m_subaddr_account;
|
ti->m_subaddrAccount = pd.m_subaddr_account;
|
||||||
ti->m_label = pd.m_subaddr_indices.size() == 1 ? m_wallet->m_wallet->get_subaddress_label({pd.m_subaddr_account, *pd.m_subaddr_indices.begin()}) : "";
|
ti->m_label = pd.m_subaddr_indices.size() == 1 ? m_wallet->m_wallet->get_subaddress_label({pd.m_subaddr_account, *pd.m_subaddr_indices.begin()}) : "";
|
||||||
ti->m_timestamp = pd.m_timestamp;
|
ti->m_timestamp = pd.m_timestamp;
|
||||||
ti->m_confirmations = wallet_height - pd.m_block_height;
|
ti->m_confirmations = (wallet_height > pd.m_block_height) ? wallet_height - pd.m_block_height : 0;
|
||||||
|
|
||||||
// single output transaction might contain multiple transfers
|
// single output transaction might contain multiple transfers
|
||||||
for (const auto &d: pd.m_dests) {
|
for (const auto &d: pd.m_dests) {
|
||||||
|
|
Loading…
Reference in a new issue