Browse Source

basilisk tx history address selector check mark

all-modes
pbca26 8 years ago
parent
commit
d34a436caf
  1. 24
      react/src/components/dashboard/walletsData/walletsData.js
  2. 2
      react/src/components/dashboard/walletsData/walletsData.render.js
  3. 2
      react/src/components/dashboard/walletsTxInfo/walletsTxInfo.render.js

24
react/src/components/dashboard/walletsData/walletsData.js

@ -124,22 +124,24 @@ class WalletsData extends React.Component {
} }
updateSocketsData(data) { updateSocketsData(data) {
let stateObj = {};
if (this.props.ActiveCoin.mode === 'basilisk') { if (this.props.ActiveCoin.mode === 'basilisk') {
if (data && if (data &&
data.message && data.message &&
data.message.shepherd.iguanaAPI && data.message.shepherd.iguanaAPI &&
data.message.shepherd.iguanaAPI.totalStackLength) { data.message.shepherd.iguanaAPI.totalStackLength) {
this.setState(Object.assign({}, this.state, { stateObj = Object.assign(stateObj, {
totalStackLength: data.message.shepherd.iguanaAPI.totalStackLength, totalStackLength: data.message.shepherd.iguanaAPI.totalStackLength,
})); });
} }
if (data && if (data &&
data.message && data.message &&
data.message.shepherd.iguanaAPI && data.message.shepherd.iguanaAPI &&
data.message.shepherd.iguanaAPI.currentStackLength) { data.message.shepherd.iguanaAPI.currentStackLength) {
this.setState(Object.assign({}, this.state, { stateObj = Object.assign(stateObj, {
currentStackLength: data.message.shepherd.iguanaAPI.currentStackLength, currentStackLength: data.message.shepherd.iguanaAPI.currentStackLength,
})); });
} }
if (data && if (data &&
data.message && data.message &&
@ -148,6 +150,8 @@ class WalletsData extends React.Component {
data.message.shepherd.status === 'done') { data.message.shepherd.status === 'done') {
Store.dispatch(basiliskRefresh(false)); Store.dispatch(basiliskRefresh(false));
} }
this.setState(Object.assign({}, this.state, stateObj));
} }
} }
@ -254,8 +258,8 @@ class WalletsData extends React.Component {
if (this.props && if (this.props &&
this.props.ActiveCoin && this.props.ActiveCoin &&
this.props.ActiveCoin.coin) { this.props.ActiveCoin.coin) {
if (!this.state.currentAddress && if ((!this.state.currentAddress && this.props.ActiveCoin.activeAddress) ||
this.props.ActiveCoin.activeAddress) { (this.state.currentAddress !== this.props.ActiveCoin.activeAddress)) {
stateObj = Object.assign(stateObj, { stateObj = Object.assign(stateObj, {
currentAddress: this.props.ActiveCoin.activeAddress, currentAddress: this.props.ActiveCoin.activeAddress,
}); });
@ -307,9 +311,9 @@ class WalletsData extends React.Component {
itemsList: historyToSplit, itemsList: historyToSplit,
}); });
} }
}
this.setState(Object.assign({}, this.state, stateObj)); this.setState(Object.assign({}, this.state, stateObj));
}
} }
updateCurrentPage(page) { updateCurrentPage(page) {
@ -518,7 +522,9 @@ class WalletsData extends React.Component {
} }
items.push( items.push(
<li key={address}> <li
key={address}
className={ address === this.state.currentAddress ? 'selected' : '' }>
<a onClick={ () => this.updateAddressSelection(address, type, _amount) }> <a onClick={ () => this.updateAddressSelection(address, type, _amount) }>
<i className={ 'icon fa-eye' + (type === 'public' ? '' : '-slash') }></i>&nbsp;&nbsp; <i className={ 'icon fa-eye' + (type === 'public' ? '' : '-slash') }></i>&nbsp;&nbsp;
<span className="text">[ { _amount } { _coin } ]{ address }</span> <span className="text">[ { _amount } { _coin } ]{ address }</span>

2
react/src/components/dashboard/walletsData/walletsData.render.js

@ -131,7 +131,7 @@ export const AddressListRender = function() {
<div className="dropdown-menu open"> <div className="dropdown-menu open">
<ul className="dropdown-menu inner"> <ul className="dropdown-menu inner">
<li className="selected"> <li className="selected">
<a><span className="text"> - { translate('KMD_NATIVE.SELECT_ADDRESS') } - </span><span className="glyphicon glyphicon-ok check-mark"></span></a> <a><span className="text"> - { translate('KMD_NATIVE.SELECT_ADDRESS') } - </span></a>
</li> </li>
{ this.renderAddressByType('public') } { this.renderAddressByType('public') }
</ul> </ul>

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

@ -51,7 +51,7 @@ const WalletsTxInfoRender = function(txInfo) {
<tr> <tr>
<td>{ translate('TX_INFO.ADDRESS') }</td> <td>{ translate('TX_INFO.ADDRESS') }</td>
<td> <td>
{ txInfo.address } { this.props.ActiveCoin.mode === 'basilisk' ? this.props.ActiveCoin.activeAddress : txInfo.address }
</td> </td>
</tr> </tr>
<tr> <tr>

Loading…
Cancel
Save