Skip to content

Commit 163e233

Browse files
committed
fix: get_token_accounts_by_owner args, add: repr to some objects
1 parent 0498c6f commit 163e233

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "solathon"
3-
version = "0.1.7"
3+
version = "0.1.8"
44
description = "High performance, easy to use and feature-rich Solana SDK for Python."
55
license = "MIT"
66
authors = ["GitBolt"]

solathon/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.1.7"
1+
__version__ = "0.1.8"
22

33
from .client import Client
44
from .async_client import AsyncClient

solathon/client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,10 @@ def get_token_accounts_by_owner(
543543
[
544544
str(public_key),
545545
{"mint": mint_id} if mint_id else {"programId": program_id},
546-
{"encoding": encoding},
547-
commitment
546+
{
547+
"encoding": encoding,
548+
"commitment": commitment
549+
},
548550
],
549551
)
550552
if self.clean_response:

solathon/core/types/account_info.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class AccountInfoType(TypedDict):
1111
size: Union[int, None]
1212
data: Union[str, dict[str, Any]]
1313

14+
def __repr__(self) -> str:
15+
return f"AccountInfoType(owner={self.owner!r})"
16+
1417
class AccountInfo():
1518
'''
1619
Convert Account Information JSON to Class
@@ -23,6 +26,9 @@ def __init__(self, result: AccountInfoType) -> None:
2326
self.size = result.get('size', None)
2427
self.data = result['data']
2528

29+
def __repr__(self) -> str:
30+
return f"AccountInfo(owner={self.owner!r})"
31+
2632
class ProgramAccountType(TypedDict):
2733
'''
2834
JSON Response type of Program Account Information received by RPC
@@ -37,3 +43,6 @@ class ProgramAccount:
3743
def __init__(self, result: ProgramAccountType) -> None:
3844
self.pubkey = result['pubkey']
3945
self.account = AccountInfo(result['account'])
46+
47+
def __repr__(self) -> str:
48+
return f"ProgramAccount(pubkey={self.pubkey!r})"

0 commit comments

Comments
 (0)