model/network.py
def remove_outdated_transactions(self):
        """Removes any transactions that were added more than N days ago,
        where N is the transactions day limit"""

        date_limit = datetime.datetime.now(datetime.timezone.utc) - \
            datetime.timedelta(days=TRANSACTION_EXPIRE_DAYS)

        for key, value in self.__info["transactions"].items():
            self.__info["transactions"][key] = list(filter(
                lambda x: datetime.datetime.strptime(
                    x["date"],
                    "%Y-%m-%d %H:%M:%S.%f%z"
                ) > date_limit,
                value
            ))

        self.save()
Removes any transactions that were added more than N days ago,
        where N is the transactions day limit
Removes any transactions that were added more than N days ago,
where N is the transactions day limit
Removes any transactions that were added more than N days ago where N is the transactions day limit
def remove_outdated_transactions(self):
        date_limit = datetime.datetime.now(datetime.timezone.utc) - \
            datetime.timedelta(days=TRANSACTION_EXPIRE_DAYS)
        for key, value in self.__info["transactions"].items():
            self.__info["transactions"][key] = list(filter(
                lambda x: datetime.datetime.strptime(
                    x["date"],
                    "%Y-%m-%d %H:%M:%S.%f%z"
                ) > date_limit,
                value
            ))
        self.save()
def remove_outdated_transactions ( self ) : date_limit = datetime . datetime . now ( datetime . timezone . utc ) - datetime . timedelta ( days = TRANSACTION_EXPIRE_DAYS ) for key , value in self . __info [ "transactions" ] . items ( ) : self . __info [ "transactions" ] [ key ] = list ( filter ( lambda x : datetime . datetime . strptime ( x [ "date" ] , "%Y-%m-%d %H:%M:%S.%f%z" ) > date_limit , value ) ) self . save ( )
Removes any transactions that were added more than N days ago,
where N is the transactions day limit
Removes any transactions that were added more than N days ago where N is the transactions day limit
"""Removes any transactions that were added more than N days ago,
        where N is the transactions day limit"""
self