use of run.wallet.iota.api.responses.MessageNewAddressResponse in project run-wallet-android by runplay.
the class MessageNewAddressRequestHandler method handle.
@Override
public ApiResponse handle(ApiRequest request) {
ApiResponse response;
List<Address> addressList = MsgStore.getAddresses();
try {
jota.dto.response.GetNewAddressResponse resp = apiProxy.getNewAddress(String.valueOf(Store.getSeedRaw(context, ((MessageNewAddressRequest) request).getSeed())), ((MessageNewAddressRequest) request).getSecurity(), addressList.size(), ((MessageNewAddressRequest) request).isChecksum(), 1, ((MessageNewAddressRequest) request).isReturnAll());
response = new MessageNewAddressResponse(resp);
// Store.addAddress(context,((MessageNewAddressRequest) request).getSeed(),(MessageNewAddressResponse)response);
} catch (ArgumentException e) {
response = new NetworkError();
}
return response;
}
Aggregations