Browse Source

minor basilisk update

all-modes
pbca26 8 years ago
parent
commit
d71f956c5e
  1. 4
      react/src/actions/actionCreators.js
  2. 3
      react/src/components/dashboard/coinTileItem.js
  3. 9
      react/src/components/dashboard/sendCoin.js
  4. 22
      react/src/components/dashboard/walletsData.js

4
react/src/actions/actionCreators.js

@ -838,13 +838,15 @@ export function addPeerNode(coin, ip) {
}
export function getAddressesByAccountState(json, coin, mode) {
json = json.result.map(res => Object.assign({}, res, { 'address': res }));
console.log('getAddressesByAccountState', json);
if (mode === 'basilisk') {
getDexBalance(coin, mode, json.result);
}
return {
type: ACTIVE_COIN_GET_ADDRESSES,
addresses: json.result,
addresses: { 'public': json.result },
}
}

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

@ -45,7 +45,7 @@ class CoinTileItem extends React.Component {
Store.dispatch(iguanaActiveHandle(true));
Store.dispatch(getSyncInfo(coin));
Store.dispatch(iguanaEdexBalance(coin, mode));
Store.dispatch(getKMDAddressesNative(coin, mode)); //getAddressesByAccount(coin));
Store.dispatch(getAddressesByAccount(coin, mode));
Store.dispatch(getFullTransactionsList(coin));
}
if (mode === 'basilisk') {
@ -68,6 +68,7 @@ class CoinTileItem extends React.Component {
Store.dispatch(dashboardChangeActiveCoin(coin, mode));
this.dispatchCoinActions(coin, mode);
if (mode === 'full') {
var _iguanaActiveHandle = setInterval(function() {
this.dispatchCoinActions(coin, mode);

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

@ -8,7 +8,8 @@ import {
getKMDOPID,
resolveOpenAliasAddress,
triggerToaster,
iguanaUTXORawTX
iguanaUTXORawTX,
clearLastSendToResponseState
} from '../../actions/actionCreators';
import Store from '../../store';
@ -130,6 +131,8 @@ class SendCoin extends React.Component {
}
changeSendCoinStep(step) {
Store.dispatch(clearLastSendToResponseState());
this.setState(Object.assign({}, this.state, {
currentStep: step,
}));
@ -253,7 +256,9 @@ class SendCoin extends React.Component {
</tr>
);
} else {
return null;
return (
<span>Processing transaction...</span>
);
}
}

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

@ -343,6 +343,21 @@ class WalletsData extends React.Component {
}));
}
renderUseCacheToggle() {
if (this.props.ActiveCoin.mode === 'basilisk') {
return (
<div className="col-sm-2">
<div className="pull-left margin-right-10">
<input type="checkbox" id="edexcoin_cache_api" checked={this.state.useCache} data-plugin="switchery" data-size="small" />
</div>
<label className="padding-top-3" htmlFor="edexcoin_cache_api" onClick={this.toggleCacheApi}>Use cache</label>
</div>
);
} else {
return null;
}
}
renderAddressByType(type) {
if (this.props.ActiveCoin.addresses && this.props.ActiveCoin.addresses[type] && this.props.ActiveCoin.addresses[type].length) {
return this.props.ActiveCoin.addresses[type].map((address) =>
@ -484,12 +499,7 @@ class WalletsData extends React.Component {
<div className="col-sm-6">
{this.renderAddressList()}
</div>
<div className="col-sm-2">
<div className="pull-left margin-right-10">
<input type="checkbox" id="edexcoin_cache_api" checked={this.state.useCache} data-plugin="switchery" data-size="small" />
</div>
<label className="padding-top-3" htmlFor="edexcoin_cache_api" onClick={this.toggleCacheApi}>Use cache</label>
</div>
{this.renderUseCacheToggle}
</div>
<div className="row" style={{padding: '20px 0 10px 0'}}>
<div className="col-sm-6">

Loading…
Cancel
Save