Skip to content

Commit

Permalink
fix ondemand oracle price parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
abrzezinski94 committed Dec 10, 2024
1 parent a48335a commit cf6179f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ts/client/src/accounts/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export function parseSwitchboardOnDemandOracle(
}
values = values.sort((x, y) => (x.value.lt(y.value) ? -1 : 1));
const feedValue = values[Math.floor(values.length / 2)];
const price = new Big(feedValue.value.toString()).div(1e18);
const price = new Big(feedValue.value.toString()).div(1e18).toNumber();
const lastUpdatedSlot = feedValue.slot.toNumber();
const stdDeviation = getStandardDeviation(
values.map((val: any) =>
Expand Down

0 comments on commit cf6179f

Please sign in to comment.