private StellarAccountId convertFederationResponseToStellarAddress()

in service/src/main/java/org/apache/fineract/cn/stellarbridge/service/internal/federation/ExternalFederationService.java [76:91]


  private StellarAccountId convertFederationResponseToStellarAddress(
      final org.stellar.sdk.federation.FederationResponse response)
  {
    if (response.getMemoType().equalsIgnoreCase("text"))
    {
      return StellarAccountId.subAccount(response.getAccountId(), response.getMemo());
    }
    else if (response.getMemoType() == null || response.getMemoType().isEmpty())
    {
      return StellarAccountId.mainAccount(response.getAccountId());
    }
    else
    {
      throw FederationFailedException.addressRequiresUnsupportedMemoType(response.getMemoType());
    }
  }