Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "liquidops",
"version": "1.2.9",
"version": "1.2.10",
"author": "Lorimer Jenkins <lorimer@liquidops.io>, Marton Lederer <marton@liquidops.io>",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions src/functions/liquidations/getLiquidations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export async function getLiquidations(

// Make a request to RedStone oracle process for prices (same used onchain)
const redstonePriceFeedRes = await getData({
Owner: controllerAddress,
Target: redstoneOracleAddress,
Action: "v2.Request-Latest-Data",
Tickers: JSON.stringify(collateralEnabledTickers.map(convertTicker)),
Expand Down
4 changes: 3 additions & 1 deletion src/functions/liquidations/getLiquidationsMap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getData } from "../../ao/messaging/getData";
import {
collateralEnabledTickers,
controllerAddress,
tokens,
} from "../../ao/utils/tokenAddressData";
import { redstoneOracleAddress } from "../../ao/utils/tokenAddressData";
Expand Down Expand Up @@ -40,6 +41,7 @@ export async function getLiquidationsMap(): Promise<GetLiquidationsMapRes[]> {

// Make a request to RedStone oracle process for prices (same used onchain)
const redstonePriceFeedRes = await getData({
Owner: controllerAddress,
Target: redstoneOracleAddress,
Action: "v2.Request-Latest-Data",
Tickers: JSON.stringify(collateralEnabledTickers.map(convertTicker)),
Expand Down Expand Up @@ -196,4 +198,4 @@ export async function getLiquidationsMap(): Promise<GetLiquidationsMapRes[]> {
} catch (error) {
throw new Error(`Error in getLiquidationsMap function: ${error}`);
}
}
}
3 changes: 2 additions & 1 deletion src/functions/oTokenData/getGlobalPosition.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getData } from "../../ao/messaging/getData";
import { tokens, redstoneOracleAddress } from "../../ao/utils/tokenAddressData";
import { tokens, redstoneOracleAddress, controllerAddress } from "../../ao/utils/tokenAddressData";
import { collateralEnabledTickers } from "../../ao/utils/tokenAddressData";
import { getPosition } from "./getPosition";
import { dryRunAwait } from "../../ao/utils/dryRunAwait";
Expand Down Expand Up @@ -34,6 +34,7 @@ export async function getGlobalPosition({

// Make a request to RedStone oracle for prices
const redstonePriceFeedRes = await getData({
Owner: controllerAddress,
Target: redstoneOracleAddress,
Action: "v2.Request-Latest-Data",
Tickers: JSON.stringify(collateralEnabledTickers.map(convertTicker)),
Expand Down
3 changes: 2 additions & 1 deletion src/functions/utils/getPrice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TokenInput } from "../../ao/utils/tokenInput";
import { getData } from "../../ao/messaging/getData";
import { convertTicker } from "../../ao/utils/tokenAddressData";
import { controllerAddress, convertTicker } from "../../ao/utils/tokenAddressData";
import { redstoneOracleAddress } from "../../ao/utils/tokenAddressData";
import { RedstonePrices } from "../liquidations/getLiquidations";

Expand All @@ -17,6 +17,7 @@ export async function getPrice({ token }: GetPrice): Promise<GetPriceRes> {

try {
const redstonePriceFeedRes = await getData({
Owner: controllerAddress,
Target: redstoneOracleAddress,
Action: "v2.Request-Latest-Data",
Tickers: JSON.stringify([convertTicker(token)]),
Expand Down
Loading