|
|
@ -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)); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |