Browse Source

basilisk fallback message

all-modes
pbca26 7 years ago
parent
commit
83a89467eb
  1. 5
      assets/mainWindow/js/init.js
  2. 25
      react/src/components/dashboard/walletsBalance/walletsBalance.js
  3. 2
      react/src/components/dashboard/walletsBalance/walletsBalance.render.js
  4. 2
      react/src/components/dashboard/walletsData/walletsData.js
  5. 1
      react/src/components/dashboard/walletsData/walletsData.render.js

5
assets/mainWindow/js/init.js

@ -3,6 +3,11 @@ $(document).ready(function() {
var window = remote.getCurrentWindow();
var appConf = remote.getCurrentWindow().appConfig;
if (!appConf.experimentalFeatures) {
$('#normalStartBtn').hide();
$('.dropdown-menu').css('right', '34.8%');
}
$('#pulse').jRoll({
radius: 100,
animation: 'pulse'

25
react/src/components/dashboard/walletsBalance/walletsBalance.js

@ -15,15 +15,36 @@ class WalletsBalance extends React.Component {
super();
this.state = {
currentAddress: null,
isExplorerData: false,
};
this.isFullySynced = this.isFullySynced.bind(this);
this.refreshBalance = this.refreshBalance.bind(this);
}
componentWillReceiveProps(props) {
if (!this.state.currentAddress &&
this.props.ActiveCoin.activeAddress) {
if (this.props.ActiveCoin.activeAddress) {
const _mode = this.props.ActiveCoin.mode;
let _isExplorerData = false;
if (_mode === 'basilisk') {
if (this.props.ActiveCoin.cache) {
const _cache = this.props.ActiveCoin.cache;
const _coin = this.props.ActiveCoin.coin;
const _address = this.props.ActiveCoin.activeAddress;
if (_address &&
_cache[_coin] &&
_cache[_coin][_address] &&
_cache[_coin][_address].getbalance &&
_cache[_coin][_address].getbalance.data &&
_cache[_coin][_address].getbalance.data.source) {
_isExplorerData = true;
}
}
}
this.setState(Object.assign({}, this.state, {
isExplorerData: _isExplorerData,
currentAddress: this.props.ActiveCoin.activeAddress,
}));
}

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

@ -108,6 +108,8 @@ const WalletsBalanceRender = function() {
</div>
</div>
</div>
<div className={ !this.state.isExplorerData ? 'hide' : '' } style={{ display: 'block', textAlign: 'center', paddingTop: '94px' }}><strong>Notice:</strong> balance is fetched from KMD explorer as a fallback measure!</div>
</div>
);
};

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

@ -54,6 +54,7 @@ class WalletsData extends React.Component {
searchTerm: null,
coin: null,
txhistory: null,
isExplorerData: false,
};
this.toggleBasiliskActionsMenu = this.toggleBasiliskActionsMenu.bind(this);
@ -344,6 +345,7 @@ class WalletsData extends React.Component {
(this.state.coin && this.state.coin !== this.props.ActiveCoin.coin) ||
(JSON.stringify(this.props.ActiveCoin.txhistory) !== JSON.stringify(this.state.txhistory))) {*/
_stateChange = Object.assign({}, _stateChange, {
isExplorerData: this.props.ActiveCoin.txhistory[0].source ? true : false,
itemsList: this.props.ActiveCoin.txhistory,
filteredItemsList: this.filterTransactions(this.props.ActiveCoin.txhistory, this.state.searchTerm),
txhistory: this.props.ActiveCoin.txhistory,

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

@ -249,6 +249,7 @@ export const WalletsDataRender = function() {
</div>
<h4 className="panel-title">{ translate('INDEX.TRANSACTION_HISTORY') }</h4>
</header>
<div className={ !this.state.isExplorerData ? 'hide' : '' } style={{ display: 'block', textAlign: 'center', paddingTop: '10px' }}><strong>Notice:</strong> transactions list is fetched from KMD explorer as a fallback measure!</div>
<div className="panel-body">
<div className="row padding-bottom-30 padding-top-10">
{ this.shouldDisplayAddressList() &&

Loading…
Cancel
Save