in service/src/main/java/org/apache/fineract/cn/stellarbridge/service/internal/federation/ExternalFederationService.java [47:74]
public StellarAccountId getAccountId(final StellarAddress stellarAddress)
throws FederationFailedException
{
final org.stellar.sdk.federation.FederationResponse federationResponse;
try {
federationResponse = stellarResolver.resolve(stellarAddress.toString());
}
catch (final MalformedAddressException e)
{
throw FederationFailedException.malformedAddress(stellarAddress.toString());
}
catch (final IOException e)
{
throw FederationFailedException
.domainDoesNotReferToValidFederationServer(stellarAddress.getDomain().toString());
}
if (federationResponse == null)
{
throw FederationFailedException.addressNameNotFound(stellarAddress.toString());
}
if (federationResponse.getAccountId() == null)
{
throw FederationFailedException.addressNameNotFound(stellarAddress.toString());
}
return convertFederationResponseToStellarAddress(federationResponse);
}