syncDatabaseOrders = async logger => {
  const databaseOrders = await mongo.findAll(
    logger,
    'trailing-trade-grid-trade-orders',
    {}
  );

  return Promise.all(
    databaseOrders.map(async databaseOrder => {
      const { key, order } = databaseOrder;
      const { symbol, orderId } = order;

      try {
        const orderResult = await binance.client.getOrder({
          symbol,
          orderId
        });

        const { side } = orderResult;

        return updateGridTradeLastOrder(logger, symbol, side.toLowerCase(), {
          ...order,
          ...orderResult
        });
      } catch (e) {
        logger.info(
          { databaseOrder, saveLog: true, e },
          `There was an error that occurred while retrieving the last grid order. ` +
            `Delete the order - ${symbol} - ${orderId}`
        );

        return deleteGridTradeOrder(logger, key);
      }
    })
  );
}
Sync database orders on boot with binance by orderId
This is helpful when the order executed and the bot is not on

@param {*} logger