let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`;
export const fetchAssets = async () => {
  try {
    const response = await fetch(`${BackEnd_url}/api/v1/getAllAssets`);
    if (!response.ok) {
      console.error("Network response was not ok");
    }
    const result = await response.json();
    // const last10Assets = result.slice(-10);
    // console.log('last10Assets: ', last10Assets);
    return result;
  } catch (error) {
    echo.error("Failed to fetch assets");
    console.log("error: ", error);
    // console.log(error.message);
  }
};
