Browse Source

WalletsTxInfo component - update the render method condition to include the native mode tx-s

TxInfo tab - walletconflicts, time, timereceived should only be displayed in native mode
all-modes
petitPapillon 8 years ago
parent
commit
1598d9b129
  1. 5
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js
  2. 9
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

5
react/src/components/dashboard/walletsTxInfo/walletsTxInfo.js

@ -35,7 +35,10 @@ class WalletsTxInfo extends React.Component {
render() {
if (this.props &&
this.props.ActiveCoin.showTransactionInfo &&
this.props.ActiveCoin.mode !== 'native') {
// TODO the conditions below should be merged once the native mode components are fully merged
// into the rest of the components
(!this.isNativeMode() ||
(this.isNativeMode() && this.props.ActiveCoin.nativeActiveSection === 'default'))) {
const txInfo = this.props.ActiveCoin.txhistory[this.props.ActiveCoin.showTransactionInfoTxIndex];
return WalletsTxInfoRender.call(this, txInfo);
}

9
react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

@ -88,24 +88,33 @@ const WalletsTxInfoRender = function(txInfo) {
{ txInfo.txid }
</td>
</tr>
{ this.isNativeMode() &&
<tr>
<td>walletconflicts</td>
<td>
{ txInfo.walletconflicts.length }
</td>
</tr>
}
{ this.isNativeMode() &&
<tr>
<td>time</td>
<td>
{ secondsToString(txInfo.time) }
</td>
</tr>
}
{ this.isNativeMode() &&
<tr>
<td>timereceived</td>
<td>
{ secondsToString(txInfo.timereceived) }
</td>
</tr>
}
</tbody>
</table>
</div>

Loading…
Cancel
Save