diff --git a/react/src/actions/actions/addressBalance.js b/react/src/actions/actions/addressBalance.js index 4a551c5..ad77083 100644 --- a/react/src/actions/actions/addressBalance.js +++ b/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, + })); + } }); }); }); diff --git a/react/src/components/dashboard/walletsNativeSend.js b/react/src/components/dashboard/walletsNativeSend.js index 1d82938..666881e 100644 --- a/react/src/components/dashboard/walletsNativeSend.js +++ b/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) =>
  • - this.updateAddressSelection(address.address, type, address.amount) }> [ { address.amount } { this.props.ActiveCoin.coin } ]  { address.address } + this.updateAddressSelection(address.address, type, address.amount) }> [ { address.amount } { this.props.ActiveCoin.coin } ]  { type === 'public' ? address.address : address.address.substring(0, 34) + '...' }
  • ); } else {