Skip to content

Commit

Permalink
Proxy added (#69)
Browse files Browse the repository at this point in the history
- added optional proxy setting to connect through (Tor) proxy 
- added additional way to set address category through context menu
  • Loading branch information
andreasgriffin authored Jan 25, 2025
1 parent 3e2cdd8 commit ae9dad8
Show file tree
Hide file tree
Showing 40 changed files with 1,435 additions and 553 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
rev: v1.11.2 # Use the latest MyPy version
hooks:
- id: mypy
files: ^bitcoin_safe/
files: ^bitcoin_safe/|^tools/
args:
- --check-untyped-defs
# - --disallow-untyped-defs
Expand Down
7 changes: 3 additions & 4 deletions bitcoin_safe/fx.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
class FX(QObject, ThreadingManager):
signal_data_updated: TypedPyQtSignalNo = pyqtSignal() # type: ignore

def __init__(self, threading_parent: ThreadingManager | None = None) -> None:
def __init__(self, proxies: Dict | None, threading_parent: ThreadingManager | None = None) -> None:
super().__init__(threading_parent=threading_parent) # type: ignore

self.proxies = proxies
self.rates: Dict[str, Dict] = {}
self.update()
logger.debug(f"initialized {self}")
Expand Down Expand Up @@ -89,7 +89,6 @@ def on_success(data) -> None:

self.append_thread(
threaded_fetch(
"https://api.coingecko.com/api/v3/exchange_rates",
on_success,
"https://api.coingecko.com/api/v3/exchange_rates", on_success, proxies=self.proxies
)
)
306 changes: 306 additions & 0 deletions bitcoin_safe/gui/icons/status_connected_proxy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bitcoin_safe/gui/locales/app_ar_AE.qm
Binary file not shown.
Loading

0 comments on commit ae9dad8

Please sign in to comment.