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';
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));
});
}
}
Loading…
Cancel
Save