Use balance_delta in txn list #731

Merged
hackrush01 merged 3 commits from txn_list into master 2017-11-22 18:14:16 +01:00
2 changed files with 10 additions and 2 deletions

View file

@ -20,6 +20,8 @@ Web UI version numbers should always match the corresponding version of LBRY App
* Fixed regression in #697 causing transaction screen to not load for new users (#755) * Fixed regression in #697 causing transaction screen to not load for new users (#755)
* Fixed scriolling restore/reset/set (#729) * Fixed scriolling restore/reset/set (#729)
* Fixed sorting by title for published files (#614) * Fixed sorting by title for published files (#614)
* App now uses the new balance_delta field in the txn list.
*
### Deprecated ### Deprecated
* *

View file

@ -21,7 +21,13 @@ export const selectTransactionItems = createSelector(
const tx = byId[txid]; const tx = byId[txid];
//ignore dust/fees //ignore dust/fees
if (Math.abs(tx.amount) === Math.abs(tx.fee)) { // it is fee only txn if all infos are also empty
if (
Math.abs(tx.value) === Math.abs(tx.fee) &&
tx.claim_info.length == 0 &&
tx.support_info.length == 0 &&
tx.update_info.length == 0
) {
return; return;
} }
@ -60,7 +66,7 @@ export const selectTransactionItems = createSelector(
//value on transaction, amount on outpoint //value on transaction, amount on outpoint
//amount is always positive, but should match sign of value //amount is always positive, but should match sign of value
const amount = parseFloat( const amount = parseFloat(
item.amount ? (item.value < 0 ? -1 : 1) * item.amount : item.value item.balance_delta ? item.balance_delta : item.value
); );
return { return {