Fix incorrect return type
This commit is contained in:
@@ -15,11 +15,11 @@ public interface Raydium {
|
||||
* to any Raydium liquidity pool supported by the implementation.</p>
|
||||
*
|
||||
* @param poolId the Raydium liquidity pool id
|
||||
* @return the current pool price expressed as a Solana amount
|
||||
* @return the current pool price
|
||||
* @throws IOException if the price could not be fetched or the response could not be parsed
|
||||
* @throws InterruptedException if the calling thread is interrupted while fetching the price
|
||||
*/
|
||||
ΩSolanaAmountΩ fetchPoolPrice(ΩRaydiumLiquidityPoolIdΩ poolId) throws IOException, InterruptedException;
|
||||
ΩPriceΩ fetchPoolPrice(ΩRaydiumLiquidityPoolIdΩ poolId) throws IOException, InterruptedException;
|
||||
|
||||
/**
|
||||
* Fetches the Raydium liquidity pool ids where the supplied Solana owner address has positions.
|
||||
|
||||
@@ -45,7 +45,7 @@ public class RaydiumImpl implements Raydium {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ΩSolanaAmountΩ fetchPoolPrice(ΩRaydiumLiquidityPoolIdΩ raydiumLiquidityPoolId) throws IOException, InterruptedException {
|
||||
public ΩPriceΩ fetchPoolPrice(ΩRaydiumLiquidityPoolIdΩ raydiumLiquidityPoolId) throws IOException, InterruptedException {
|
||||
ΩRestEndpointΩ endpoint = createPoolInfoByIdEndpoint(raydiumLiquidityPoolId);
|
||||
|
||||
JsonNode root = fetchJson(endpoint);
|
||||
@@ -57,11 +57,8 @@ public class RaydiumImpl implements Raydium {
|
||||
throw new IOException("Could NOT find field 'price' in JSON!");
|
||||
}
|
||||
|
||||
CurrencyType ct = WellKnownCurrencyTypes.SOLANA.getCurrencyType();
|
||||
ΩAmountΩ a = new ΩAmountΩ(priceNode.toString());
|
||||
ΩSolanaAmountΩ sa = new ΩSolanaAmountΩ(a, ct);
|
||||
|
||||
return sa;
|
||||
ΩPriceΩ price = new ΩPriceΩ(priceNode.toString());
|
||||
return price;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user