From 401c4fa3ab96944d2a219686b11684f7d5834658 Mon Sep 17 00:00:00 2001 From: Jared Silva Date: Fri, 5 Apr 2024 06:22:37 -0400 Subject: [PATCH 1/3] Fix trailing-whitespace. --- docs/configuration_file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration_file.md b/docs/configuration_file.md index 6a454b5d..81975dd9 100644 --- a/docs/configuration_file.md +++ b/docs/configuration_file.md @@ -525,7 +525,7 @@ transaction age | candle used Accuracy will improve once new CSV data is released, which is typically 2 weeks after the end of a quarter. Also, the Kraken REST API is very slow. It may take 20-30 seconds per transaction to retrieve prices for the latest quarter. -##### Note on Unified CSV File +##### Note on Unified CSV File The unified CSV file is a CSV file that contains all the candles for all the assets on the Kraken exchange. It is used to retrieve the price for the transaction if the transaction is older than the latest quarter. The plugin will prompt you to download the unified CSV file if it is needed for the transaction. You can also manually download the file from [Kraken Exchange](https://support.kraken.com/hc/en-us/articles/360047124832-Downloadable-historical-OHLCVT-Open-High-Low-Close-Volume-Trades-data) and put it in `.dali_cache/kraken/csv/`. ### Binance Locked CCXT From f8171bc8f269193206b6e10bd1db207e269f6c05 Mon Sep 17 00:00:00 2001 From: Jared Silva Date: Fri, 5 Apr 2024 06:24:04 -0400 Subject: [PATCH 2/3] black src tests reformatted. --- src/dali/plugin/input/csv/trezor_v2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dali/plugin/input/csv/trezor_v2.py b/src/dali/plugin/input/csv/trezor_v2.py index cc82ddcd..1fcf4756 100644 --- a/src/dali/plugin/input/csv/trezor_v2.py +++ b/src/dali/plugin/input/csv/trezor_v2.py @@ -90,8 +90,9 @@ def load(self, country: AbstractCountry) -> List[AbstractTransaction]: self.__logger.warning("Possible dusting attack (fee > 0, total = 0), skipping transaction: %s", raw_data) continue if line[self.__AMOUNT_UNIT] in self._POSSIBLE_DUST_ATTACKERS: - self.__logger.warning("Possible dusting attack (amount unit %s is suspicious), skipping transaction: %s", - line[self.__AMOUNT_UNIT], raw_data) + self.__logger.warning( + "Possible dusting attack (amount unit %s is suspicious), skipping transaction: %s", line[self.__AMOUNT_UNIT], raw_data + ) continue if transaction_type in {_RECV, _SENT}: result.append( From d2f89f7b2653b7816d2e955af3ade5cdb9b813d9 Mon Sep 17 00:00:00 2001 From: Jared Silva Date: Fri, 5 Apr 2024 06:26:30 -0400 Subject: [PATCH 3/3] Make in, out, and intra CSV files optional. --- src/dali/plugin/input/csv/manual.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dali/plugin/input/csv/manual.py b/src/dali/plugin/input/csv/manual.py index 7153f6e4..d4f49abe 100644 --- a/src/dali/plugin/input/csv/manual.py +++ b/src/dali/plugin/input/csv/manual.py @@ -80,16 +80,16 @@ class InputPlugin(AbstractInputPlugin): def __init__( self, - in_csv_file: str, - out_csv_file: str, - intra_csv_file: str, + in_csv_file: Optional[str] = None, + out_csv_file: Optional[str] = None, + intra_csv_file: Optional[str] = None, native_fiat: Optional[str] = None, ) -> None: super().__init__(account_holder="", native_fiat=native_fiat) - self.__in_csv_file: str = in_csv_file - self.__out_csv_file: str = out_csv_file - self.__intra_csv_file: str = intra_csv_file + self.__in_csv_file: Optional[str] = in_csv_file + self.__out_csv_file: Optional[str] = out_csv_file + self.__intra_csv_file: Optional[str] = intra_csv_file self.__logger: logging.Logger = create_logger(self.__MANUAL)