use of run.wallet.iota.api.responses.AddressSecurityChangeResponse in project run-wallet-android by runplay.
the class AddressSecurityChangeRequestHandler method handle.
@Override
public ApiResponse handle(ApiRequest request) {
ApiResponse response;
AddressSecurityChangeRequest gnr = ((AddressSecurityChangeRequest) request);
try {
jota.dto.response.GetNewAddressResponse resp = apiProxy.getNewAddress(gnr.getAddress().getAddress(), gnr.getSecurity(), gnr.getAddress().getIndex(), false, 1, true);
// Log.e("ADDRES-SECURITY","has response: "+resp.getAddresses().get(0));
response = new GetNewAddressResponse(gnr.getSeed(), resp);
Store.updateAddressFromSecurity(context, gnr, (GetNewAddressResponse) response);
return new AddressSecurityChangeResponse();
} catch (ArgumentException e) {
response = new NetworkError();
}
return response;
}
Aggregations