Browse Source

basilisk balance fix

all-modes
pbca26 8 years ago
parent
commit
303361e0ea
  1. 3
      react/src/components/dashboard/navbar.js
  2. 4
      react/src/components/dashboard/receiveCoin.js
  3. 6
      react/src/components/dashboard/sendCoin.js

3
react/src/components/dashboard/navbar.js

@ -100,7 +100,8 @@ class Navbar extends React.Component {
</a>
</li>
<li
className={ this.props.Dashboard.activeSection === 'jumblr' ? 'active nav-top-menu' : 'nav-top-menu' }>
className={ this.props.Dashboard.activeSection === 'jumblr' ? 'active nav-top-menu' : 'nav-top-menu' }
style={{ display: 'none' }}>
<a id="nav-jumblr" onClick={ () => this.dashboardChangeSection('jumblr') }>
<i className="site-menu-icon" aria-hidden="true"></i> Jumblr
</a>

4
react/src/components/dashboard/receiveCoin.js

@ -78,11 +78,11 @@ class ReceiveCoin extends React.Component {
let address = this.props.addresses.public[i];
if (this.props.mode === 'basilisk' &&
address.amount === 'N/A') {
(address.amount === 'N/A' || address.amount === 0)) {
address.amount = this.props.cache && this.props.cache[this.props.coin][address.address] && this.props.cache[this.props.coin][address.address].getbalance.data && this.props.cache[this.props.coin][address.address].getbalance.data.balance ? this.props.cache[this.props.coin][address.address].getbalance.data.balance : 'N/A';
}
if (this.props.mode === 'basilisk' &&
(address.interest === 'N/A' || !address.interest)) {
(address.interest === 'N/A' || address.interest === 0 || !address.interest)) {
address.interest = this.props.cache && this.props.cache[this.props.coin][address.address] && this.props.cache[this.props.coin][address.address].getbalance.data && this.props.cache[this.props.coin][address.address].getbalance.data.interest ? this.props.cache[this.props.coin][address.address].getbalance.data.interest : 'N/A';
}

6
react/src/components/dashboard/sendCoin.js

@ -235,13 +235,13 @@ class SendCoin extends React.Component {
if (this.props.ActiveCoin.mode === 'basilisk') {
_amount = this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][address.address] && this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][address.address].getbalance.data && this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][address.address].getbalance.data.balance ? this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][address.address].getbalance.data.balance : 'N/A';
}
console.log('mainAddressAmount ' + address.address, _amount);
if (_amount !== 'N/A') {
items.push(
<li
data-original-index="2"
key={ address.address }
className={ address.amount <= 0 ? 'hide' : '' }>
className={ _amount <= 0 ? 'hide' : '' }>
<a
tabIndex="0"
onClick={ () => this.updateAddressSelection(address.address, type, _amount) }><i className={ type === 'public' ? 'icon fa-eye' : 'icon fa-eye-slash' }></i> <span className="text">[ { _amount } { this.props.ActiveCoin.coin } ] { address.address }</span><span className="glyphicon glyphicon-ok check-mark"></span></a>
@ -265,7 +265,7 @@ class SendCoin extends React.Component {
this.props.ActiveCoin.mode === 'basilisk') {
_amount = this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][this.state.sendFrom].getbalance.data && this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][this.state.sendFrom].getbalance.data.balance ? this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][this.state.sendFrom].getbalance.data.balance : 'N/A';
} else {
_amount = this.state._sendFromAmount;
_amount = this.state.sendFromAmount;
}
return (

Loading…
Cancel
Save