Skip to content

Commit

Permalink
Rollback source_finary.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoue authored Nov 6, 2023
1 parent 7b9f2a2 commit 1983b81
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions finalynx/fetch/source_finary.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ def _authenticate(self) -> Optional[Session]:

# Login to Finary with the existing cookies file or credentials in environment variables and retrieve data
if os.environ.get("FINARY_EMAIL") and os.environ.get("FINARY_PASSWORD"):
with console.status(f"[bold {TH().ACCENT}]Signing in to Finary...", spinner_style=TH().ACCENT):
self._log("Signing in to Finary...")
with console.status(
f"""[bold {TH().ACCENT}]Signing in to Finary...[/] """
"""[dim white](Type your 2FA code if prompted and press [italic]Enter[/], """
"""it will remain invisible while you type)""",
spinner_style=TH().ACCENT,
):
result = ff.signin()
self._log("Signed in to Finary.")

Expand Down Expand Up @@ -176,17 +182,12 @@ def _process_account(self, dict_account: Dict[str, Any], tree: Tree) -> None:
node = tree.add(account_name)

for item in dict_account["fiats"]:
subtype=dict_account["bank_account_type"]["subtype"]
if subtype == "credit":
amount = -item["display_current_value"]
else:
amount = item["display_current_value"]
self._register_fetchline(
tree_node=node,
name=account_name,
id=item["id"],
account=dict_account["institution"]["name"],
amount=amount,
amount=item["display_current_value"],
currency=item["fiat"]["symbol"],
)

Expand Down

0 comments on commit 1983b81

Please sign in to comment.