diff --git a/react/src/actions/actions/nativeNewAddress.js b/react/src/actions/actions/nativeNewAddress.js index 4bd4088..8340170 100644 --- a/react/src/actions/actions/nativeNewAddress.js +++ b/react/src/actions/actions/nativeNewAddress.js @@ -11,20 +11,10 @@ import { } from './log'; function handleGetNewKMDAddresses(pubpriv, coin, dispatch, json) { - dispatch( - triggerToaster( - json.result ? json.result : json, - translate('KMD_NATIVE.NEW_ADDR_GENERATED'), - 'info', - false - ) - ); - dispatch(getKMDAddressesNative(coin)); - return {}; } -export function getNewKMDAddresses(coin, pubpriv) { +export function getNewKMDAddresses(coin, pubpriv, mode) { let payload; let ajaxFunctionInput = pubpriv === 'public' ? 'getnewaddress' : 'z_getnewaddress'; @@ -115,22 +105,33 @@ export function getNewKMDAddresses(coin, pubpriv) { })); } dispatch( + triggerToaster( + json.result ? json.result : json, + translate('KMD_NATIVE.NEW_ADDR_GENERATED'), + 'info', + false + ) + ); + dispatch(getKMDAddressesNative(coin, mode)); + /*dispatch( handleGetNewKMDAddresses( pubpriv, coin, dispatch, json ) - ); + );*/ }) .catch(function(ex) { dispatch( - handleGetNewKMDAddresses( - pubpriv, - coin, - dispatch + triggerToaster( + json.result ? json.result : json, + translate('KMD_NATIVE.NEW_ADDR_GENERATED'), + 'info', + false ) ); + dispatch(getKMDAddressesNative(coin, mode)); }); } } \ No newline at end of file