Skip to content

Commit

Permalink
Merge pull request #34 from rcholic/bug1
Browse files Browse the repository at this point in the history
fix tokens bug
  • Loading branch information
rcholic authored Jul 15, 2024
2 parents 2ecf900 + 424e316 commit 604ed59
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cschwabpy/SchwabAsyncClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ async def _ensure_valid_access_token(self, force_refresh: bool = False) -> bool:

if response.status_code == 200:
json_res = response.json()
tokens = Tokens(**json_res)
await self.__token_store.save_tokens(tokens)
self.__tokens = Tokens(**json_res)
await self.__token_store.save_tokens(self.__tokens)
return True
else:
raise Exception(
Expand Down
4 changes: 2 additions & 2 deletions cschwabpy/SchwabClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def _ensure_valid_access_token(self, force_refresh: bool = False) -> bool:

if response.status_code == 200:
json_res = response.json()
tokens = Tokens(**json_res)
self.__token_store.save_tokens(tokens)
self.__tokens = Tokens(**json_res)
self.__token_store.save_tokens(self.__tokens)
return True
else:
raise Exception(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cschwabpy"
version = "0.1.3.3"
version = "0.1.3.4"
description = ""
authors = ["Tony Wang <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="CSchwabPy",
version="0.1.3.3",
version="0.1.3.4",
description="Charles Schwab Stock & Option Trade API Client for Python.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 604ed59

Please sign in to comment.