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) {
|
||||
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",
|
||||
|
||||
@@ -32,6 +32,7 @@ app.openapi(
|
||||
);
|
||||
|
||||
if (error) {
|
||||
console.log(error);
|
||||
return c.json(
|
||||
{
|
||||
success: false,
|
||||
|
||||
Reference in New Issue
Block a user