diff --git a/react/src/components/dashboard/walletsData.js b/react/src/components/dashboard/walletsData.js index 410f729..1671892 100644 --- a/react/src/components/dashboard/walletsData.js +++ b/react/src/components/dashboard/walletsData.js @@ -83,19 +83,25 @@ class WalletsData extends React.Component { } updateSocketsData(data) { - if (data && data.message && data.message.shepherd.iguanaAPI && + if (data && + data.message && + data.message.shepherd.iguanaAPI && data.message.shepherd.iguanaAPI.totalStackLength) { this.setState(Object.assign({}, this.state, { totalStackLength: data.message.shepherd.iguanaAPI.totalStackLength, })); } - if (data && data.message && data.message.shepherd.iguanaAPI && + if (data && + data.message && + data.message.shepherd.iguanaAPI && data.message.shepherd.iguanaAPI.currentStackLength) { this.setState(Object.assign({}, this.state, { currentStackLength: data.message.shepherd.iguanaAPI.currentStackLength, })); } - if (data && data.message && data.message.shepherd.method && + if (data && + data.message && + data.message.shepherd.method && data.message.shepherd.method === 'cache-one' && data.message.shepherd.status === 'done') { Store.dispatch(basiliskRefresh(false)); @@ -120,13 +126,6 @@ class WalletsData extends React.Component { 'calls': 'refresh', 'address': this.state.currentAddress, })); - console.log('_fetchUtxoCache', { - 'pubkey': this.props.Dashboard.activeHandle.pubkey, - 'allcoins': false, - 'coin': this.props.ActiveCoin.coin, - 'calls': 'refresh', - 'address': this.state.currentAddress, - }); } toggleBasiliskActionsMenu() { @@ -182,7 +181,8 @@ class WalletsData extends React.Component { } componentWillReceiveProps(props) { - if (!this.state.currentAddress && this.props.ActiveCoin.activeAddress) { + if (!this.state.currentAddress && + this.props.ActiveCoin.activeAddress) { this.setState(Object.assign({}, this.state, { currentAddress: this.props.ActiveCoin.activeAddress, })); @@ -192,7 +192,9 @@ class WalletsData extends React.Component { this.props.ActiveCoin.txhistory !== 'loading' && this.props.ActiveCoin.txhistory !== 'no data' && this.props.ActiveCoin.txhistory.length) { - if (!this.state.itemsList || (this.state.itemsList && !this.state.itemsList.length) || (props.ActiveCoin.txhistory !== this.props.ActiveCoin.txhistory)) { + if (!this.state.itemsList || + (this.state.itemsList && !this.state.itemsList.length) || + (props.ActiveCoin.txhistory !== this.props.ActiveCoin.txhistory)) { let historyToSplit = sortByDate(this.props.ActiveCoin.txhistory); historyToSplit = historyToSplit.slice((this.state.activePage - 1) * this.state.itemsPerPage, this.state.activePage * this.state.itemsPerPage); @@ -202,7 +204,8 @@ class WalletsData extends React.Component { } } - if (this.props.ActiveCoin.txhistory && this.props.ActiveCoin.txhistory === 'no data') { + if (this.props.ActiveCoin.txhistory && + this.props.ActiveCoin.txhistory === 'no data') { this.setState(Object.assign({}, this.state, { itemsList: 'no data', })); @@ -228,8 +231,13 @@ class WalletsData extends React.Component { for (let i=0; i < Math.ceil(this.props.ActiveCoin.txhistory.length / this.state.itemsPerPage); i++) { items.push( -
{translate('INDEX.TYPE')} | -{translate('INDEX.ADDRESS')} | -{translate('INDEX.AMOUNT')} | +{ translate('INDEX.TYPE') } | +{ translate('INDEX.ADDRESS') } | +{ translate('INDEX.AMOUNT') } |
---|---|---|---|---|---|
{translate('INDEX.TYPE')} | -{translate('INDEX.ADDRESS')} | -{translate('INDEX.AMOUNT')} | +{ translate('INDEX.TYPE') } | +{ translate('INDEX.ADDRESS') } | +{ translate('INDEX.AMOUNT') } |