Skip to content

Commit

Permalink
Fix currencies in v2/accounts/{account_id}/jettons
Browse files Browse the repository at this point in the history
  • Loading branch information
aiexz committed Oct 20, 2024
1 parent 08cf117 commit 28cf99e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pytonapi/schema/rates.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ChartRates(BaseModel):


class TokenRates(BaseModel):
prices: Optional[Dict[str, str]] = None
prices: Optional[Dict[str, Union[float, int]]] = None
diff_24h: Optional[Dict[str, str]] = None
diff_7d: Optional[Dict[str, str]] = None
diff_30d: Optional[Dict[str, str]] = None
Expand Down
4 changes: 4 additions & 0 deletions tests/tonapi/test_accounts_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def test_get_jettons(self):
response = self.tonapi.accounts.get_jettons_balances(ACCOUNT_ID)
self.assertIsInstance(response, schema.jettons.JettonsBalances)

def test_get_jettons_with_currencies(self):
response = self.tonapi.accounts.get_jettons_balances(ACCOUNT_ID, currencies=["ton"])
self.assertIsInstance(response, schema.jettons.JettonsBalances)

def test_get_jetton(self):
response = self.tonapi.accounts.get_jetton_balance(ACCOUNT_ID, JETTON_ID)
self.assertIsInstance(response, schema.jettons.JettonBalance)
Expand Down

0 comments on commit 28cf99e

Please sign in to comment.