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

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

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

Loading…
Cancel
Save