Browse Source

native tx history bugfix

all-modes
pbca26 8 years ago
parent
commit
0872df4181
  1. 7
      react/src/actions/actionCreators.js
  2. 9
      react/src/components/dashboard/walletsNativeSend/walletsNativeSend.js
  3. 15
      react/src/components/dashboard/walletsNativeSend/walletsNativeSend.render.js

7
react/src/actions/actionCreators.js

@ -322,15 +322,18 @@ export function setBasiliskMainAddress(json, coin, mode) {
}
export function getNativeTxHistoryState(json) {
console.log('getNativeTxHistoryState', json.result.length);
if (json &&
json.error) {
json = null;
} else if (json && json.result) {
} else if (json && json.result && json.result.length) {
json = json.result;
} else if (!json.length) {
} else if (!json || !json.result.length) {
json = 'no data';
}
console.log('getNativeTxHistoryState', json);
return {
type: DASHBOARD_ACTIVE_COIN_NATIVE_TXHISTORY,
txhistory: json,

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

@ -61,6 +61,15 @@ class WalletsNativeSend extends React.Component {
}
}
zAddressCount() {
return this.props.ActiveCoin.addresses &&
this.props.ActiveCoin.addresses.private &&
this.props.ActiveCoin.addresses.private.length;
console.log(this.props.ActiveCoin.addresses &&
this.props.ActiveCoin.addresses.private &&
this.props.ActiveCoin.addresses.private.length);
}
renderAddressByType(type) {
if (this.props.ActiveCoin.addresses &&
this.props.ActiveCoin.addresses[type] &&

15
react/src/components/dashboard/walletsNativeSend/walletsNativeSend.render.js

@ -20,7 +20,6 @@ export const AddressListRender = function() {
<a><span className="text"> - { translate('SEND.SELECT_T_OR_Z_ADDR') } - </span>
<span className="glyphicon glyphicon-ok check-mark"></span></a>
</li>
{ this.renderAddressByType('public') }
{ this.renderAddressByType('private') }
</ul>
</div>
@ -28,6 +27,8 @@ export const AddressListRender = function() {
);
};
// { this.renderAddressByType('public') }
export const OASendUIRender = function() {
return (
<div className="row">
@ -74,12 +75,14 @@ export const WalletsNativeSendRender = function() {
className="extcoin-send-form"
method="post"
autoComplete="off">
<div className="row">
<div className="col-xlg-12 form-group form-material">
<label className="control-label">{ translate('INDEX.SEND_FROM') }</label>
{ this.renderAddressList() }
{ this.zAddressCount &&
<div className="row">
<div className="col-xlg-12 form-group form-material">
<label className="control-label">{ translate('INDEX.SEND_FROM') }</label>
{ this.renderAddressList() }
</div>
</div>
</div>
}
{ this.renderOASendUI() }
<div className="row">
<div className="col-xlg-12 form-group form-material">

Loading…
Cancel
Save