fix(openorders): changes to prevent and error during the get request due to missing data
This commit is contained in:
@@ -39,13 +39,13 @@ export const getOpenOrders = async (data: any | null) => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
message: "Current open orders",
|
message: "Errot getting current open orders",
|
||||||
data: orders.data,
|
data: [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// add plant token in
|
// 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", {
|
// const dateCon = new Date(item.loadingDate).toLocaleString("en-US", {
|
||||||
// month: "numeric",
|
// month: "numeric",
|
||||||
// day: "numeric",
|
// day: "numeric",
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ app.openapi(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
|
console.log(error);
|
||||||
return c.json(
|
return c.json(
|
||||||
{
|
{
|
||||||
success: false,
|
success: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user