diff --git a/src/main/tjava/com/r35157/libs/raydium/Raydium.tjava b/src/main/tjava/com/r35157/libs/raydium/Raydium.tjava index 11213da..c70cf81 100644 --- a/src/main/tjava/com/r35157/libs/raydium/Raydium.tjava +++ b/src/main/tjava/com/r35157/libs/raydium/Raydium.tjava @@ -15,11 +15,11 @@ public interface Raydium { * to any Raydium liquidity pool supported by the implementation.

* * @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. diff --git a/src/main/tjava/com/r35157/libs/raydium/impl/ref/RaydiumImpl.tjava b/src/main/tjava/com/r35157/libs/raydium/impl/ref/RaydiumImpl.tjava index 25e214a..5ed8408 100644 --- a/src/main/tjava/com/r35157/libs/raydium/impl/ref/RaydiumImpl.tjava +++ b/src/main/tjava/com/r35157/libs/raydium/impl/ref/RaydiumImpl.tjava @@ -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