Skip to content

Commit

Permalink
Adding fiat_ticker to manual.py transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
topherbuckley committed Apr 3, 2023
1 parent 815e6f1 commit 71b991c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dali/plugin/input/csv/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class InputPlugin(AbstractInputPlugin):
__IN_FIAT_IN_WITH_FEE_INDEX: int = 10
__IN_FIAT_FEE_INDEX: int = 11
__IN_NOTES_INDEX: int = 12
__IN_FIAT_TICKER: int = 13

__OUT_UNIQUE_ID_INDEX: int = 0
__OUT_TIMESTAMP_INDEX: int = 1
Expand All @@ -66,6 +67,8 @@ class InputPlugin(AbstractInputPlugin):
__OUT_FIAT_OUT_NO_FEE_INDEX: int = 10
__OUT_FIAT_FEE_INDEX: int = 11
__OUT_NOTES_INDEX: int = 12
__OUT_FIAT_TICKER: int = 13


__INTRA_UNIQUE_ID_INDEX: int = 0
__INTRA_TIMESTAMP_INDEX: int = 1
Expand All @@ -78,6 +81,7 @@ class InputPlugin(AbstractInputPlugin):
__INTRA_CRYPTO_SENT_INDEX: int = 8
__INTRA_CRYPTO_RECEIVED_INDEX: int = 9
__INTRA_NOTES_INDEX: int = 10
__OUT_FIAT_TICKER: int = 11

def __init__(
self,
Expand Down Expand Up @@ -149,6 +153,7 @@ def _load_in_file(self, transactions: List[AbstractTransaction]) -> None:
fiat_in_with_fee=line[self.__IN_FIAT_IN_WITH_FEE_INDEX],
fiat_fee=line[self.__IN_FIAT_FEE_INDEX],
notes=line[self.__IN_NOTES_INDEX],
fiat_ticker=[self.__IN_FIAT_TICKER]
)
)

Expand Down Expand Up @@ -198,6 +203,7 @@ def _load_out_file(self, transactions: List[AbstractTransaction]) -> None:
fiat_out_no_fee=line[self.__OUT_FIAT_OUT_NO_FEE_INDEX],
fiat_fee=line[self.__OUT_FIAT_FEE_INDEX],
notes=line[self.__OUT_NOTES_INDEX],
fiat_ticker=[self.__OUT_FIAT_TICKER]
)
)

Expand Down Expand Up @@ -232,6 +238,7 @@ def _load_intra_file(self, transactions: List[AbstractTransaction]) -> None:
to_holder: str = line[self.__INTRA_TO_HOLDER_INDEX]
crypto_sent: str = line[self.__INTRA_CRYPTO_SENT_INDEX]
crypto_received: str = line[self.__INTRA_CRYPTO_RECEIVED_INDEX]
fiat_ticker: str = line[self.__OUT_FIAT_TICKER]
transactions.append(
IntraTransaction(
plugin=self.__MANUAL,
Expand All @@ -247,5 +254,6 @@ def _load_intra_file(self, transactions: List[AbstractTransaction]) -> None:
crypto_sent=crypto_sent if crypto_sent else Keyword.UNKNOWN.value,
crypto_received=crypto_received if crypto_received else Keyword.UNKNOWN.value,
notes=line[self.__INTRA_NOTES_INDEX],
fiat_ticker=fiat_ticker if fiat_ticker else Keyword.UNKNOWN.value
)
)

0 comments on commit 71b991c

Please sign in to comment.