fix(openorders): changes to prevent and error during the get request due to missing data

This commit is contained in:
2025-04-25 10:42:17 -05:00
parent 67d47ee030
commit 9c8249b2e4
2 changed files with 4 additions and 3 deletions

View File

@@ -39,13 +39,13 @@ export const getOpenOrders = async (data: any | null) => {
} catch (error) {
return {
success: false,
message: "Current open orders",
data: orders.data,
message: "Errot getting current open orders",
data: [],
};
}
// add plant token in
const pOrders = orders.map((item: any) => {
const pOrders = orders.data.map((item: any) => {
// const dateCon = new Date(item.loadingDate).toLocaleString("en-US", {
// month: "numeric",
// day: "numeric",

View File

@@ -32,6 +32,7 @@ app.openapi(
);
if (error) {
console.log(error);
return c.json(
{
success: false,