Browse Source

nativeNewAddress action creator err fix

all-modes
pbca26 8 years ago
parent
commit
9310060920
  1. 33
      react/src/actions/actions/nativeNewAddress.js

33
react/src/actions/actions/nativeNewAddress.js

@ -11,20 +11,10 @@ import {
} from './log'; } from './log';
function handleGetNewKMDAddresses(pubpriv, coin, dispatch, json) { 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 payload;
let ajaxFunctionInput = pubpriv === 'public' ? 'getnewaddress' : 'z_getnewaddress'; let ajaxFunctionInput = pubpriv === 'public' ? 'getnewaddress' : 'z_getnewaddress';
@ -115,22 +105,33 @@ export function getNewKMDAddresses(coin, pubpriv) {
})); }));
} }
dispatch( dispatch(
triggerToaster(
json.result ? json.result : json,
translate('KMD_NATIVE.NEW_ADDR_GENERATED'),
'info',
false
)
);
dispatch(getKMDAddressesNative(coin, mode));
/*dispatch(
handleGetNewKMDAddresses( handleGetNewKMDAddresses(
pubpriv, pubpriv,
coin, coin,
dispatch, dispatch,
json json
) )
); );*/
}) })
.catch(function(ex) { .catch(function(ex) {
dispatch( dispatch(
handleGetNewKMDAddresses( triggerToaster(
pubpriv, json.result ? json.result : json,
coin, translate('KMD_NATIVE.NEW_ADDR_GENERATED'),
dispatch 'info',
false
) )
); );
dispatch(getKMDAddressesNative(coin, mode));
}); });
} }
} }
Loading…
Cancel
Save