Skip to content

Commit

Permalink
chore: filter timpi/usdc chart
Browse files Browse the repository at this point in the history
  • Loading branch information
trungbach committed Feb 20, 2024
1 parent 64c2c71 commit c0b6004
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,27 @@ OraiAtomChartDefaultURL.args = {
// wsUrl: BASE_SOCKET_URL.ORAIDEX
};

export const TimpiChartDefaultURL: Story = (args: TVChartContainerProsp) => (
<div style={{ height: "80vh" }}>
<TVChartContainer {...args} />;
</div>
);
TimpiChartDefaultURL.args = {
theme: "dark",
currentPair: {
symbol: "NTMPI/USDC",
info: "ibc/576B1D63E401B6A9A071C78A1D1316D016EC9333D2FEB14AD503FAC4B8731CD1-orai15un8msx3n5zf9ahlxmfeqd2kwa5wm0nrpxer304m9nd5q6qq0g6sku5pdd"
},
pairsChart: [
{
symbol: "NTMPI/USDC",
info: "ibc/576B1D63E401B6A9A071C78A1D1316D016EC9333D2FEB14AD503FAC4B8731CD1-orai15un8msx3n5zf9ahlxmfeqd2kwa5wm0nrpxer304m9nd5q6qq0g6sku5pdd"
}
]
// baseUrl: BASE_API_URL.ORAIDEX,
// wsUrl: BASE_SOCKET_URL.ORAIDEX
};

export const OraiUsdcChart: Story = (args: TVChartContainerProsp) => (
<div style={{ height: "80vh" }}>
<TVChartContainer {...args} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export const getTokenChartPrice = async ({
tf: +resolution * 60
});
}

const res = await axios.get(endpoint, {
params: {
pair: info,
Expand All @@ -87,6 +86,11 @@ export const getTokenChartPrice = async ({
}
});

if (symbol === "NTMPI/USDC") {
const TWO_PM_TIMESTAMP = 1708412400;
return res.data && res.data.filter((item) => Number(item.time) >= TWO_PM_TIMESTAMP);
}

return res.data;
} catch (e) {
console.error("GetTokenChartPrice", e);
Expand Down

0 comments on commit c0b6004

Please sign in to comment.