Browse Source

native send zaddr val ellipsis

all-modes
pbca26 8 years ago
parent
commit
0f08fbabad
  1. 41
      react/src/actions/actions/addressBalance.js
  2. 2
      react/src/components/dashboard/walletsNativeSend.js

41
react/src/actions/actions/addressBalance.js

@ -275,6 +275,14 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
'hex': hashHexJson,
};
}
dispatch(logGuiHttp({
'timestamp': _timestamp,
'function': 'getKMDAddressesNative+ZBalance',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': payload,
'status': 'pending',
}));
fetch(`http://127.0.0.1:${Config.iguanaCorePort}`,
{
@ -292,17 +300,28 @@ export function getKMDAddressesNative(coin, mode, currentAddress) {
})
.then(response => response.json())
.then(function(json) {
resolve(json);
newAddressArray[1][index] = {
address: _address,
amount: json,
type: 'private',
};
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
if (json &&
json.error) {
resolve(0);
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'error',
'response': json,
}));
dispatch(triggerToaster(true, 'getKMDAddressesNative+ZBalance', 'Error', 'error'));
} else {
resolve(json);
newAddressArray[1][index] = {
address: _address,
amount: json,
type: 'private',
};
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
}));
}
});
});
});

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

@ -54,7 +54,7 @@ class WalletsNativeSend extends React.Component {
this.props.ActiveCoin.addresses[type].length) {
return this.props.ActiveCoin.addresses[type].map((address) =>
<li key={ address.address } className={ address.amount <= 0 ? 'hide' : '' }>
<a onClick={ () => this.updateAddressSelection(address.address, type, address.amount) }><i className={ type === 'public' ? 'icon fa-eye' : 'icon fa-eye-slash' }></i> <span className="text">[ { address.amount } { this.props.ActiveCoin.coin } ] { address.address }</span><span className="glyphicon glyphicon-ok check-mark"></span></a>
<a onClick={ () => this.updateAddressSelection(address.address, type, address.amount) }><i className={ type === 'public' ? 'icon fa-eye' : 'icon fa-eye-slash' }></i> <span className="text">[ { address.amount } { this.props.ActiveCoin.coin } ] { type === 'public' ? address.address : address.address.substring(0, 34) + '...' }</span><span className="glyphicon glyphicon-ok check-mark"></span></a>
</li>
);
} else {

Loading…
Cancel
Save