Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GitBolt committed Oct 14, 2024
1 parent 31277c4 commit 28753dd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
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 = "solathon"
version = "1.0.2"
version = "1.0.4"
description = "High performance, easy to use and feature-rich Solana SDK for Python."
license = "MIT"
authors = ["GitBolt"]
Expand Down
2 changes: 1 addition & 1 deletion solathon/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.0.2"
__version__ = "1.0.4"

from .client import Client
from .async_client import AsyncClient
Expand Down
2 changes: 1 addition & 1 deletion solathon/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ async def send_transaction(self, transaction: Transaction) -> RPCResponse:
RPCResponse: The response from the Solana network.
"""
if not transaction.recent_blockhash:
transaction.recent_blockhash = (await self.get_recent_blockhash())[
transaction.recent_blockhash = (await self.get_latest_blockhas())[
"result"
].blockhash

Expand Down
4 changes: 2 additions & 2 deletions solathon/solana_pay/create_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ def create_transfer(client: Client, sender: Keypair, transfer_fields: CreateTra

block_hash: BlockHash = None
if client.clean_response == False:
raw_block_hash: RPCResponse[BlockHashType] = client.get_recent_blockhash(
raw_block_hash: RPCResponse[BlockHashType] = client.get_latest_blockhas(
commitment=commitment)
block_hash: BlockHash = BlockHash(raw_block_hash['result']['value'])
else:
block_hash: BlockHash = client.get_recent_blockhash(
block_hash: BlockHash = client.get_latest_blockhas(
commitment=commitment)

transaction = Transaction(instructions=[instruction], signers=[
Expand Down
6 changes: 3 additions & 3 deletions solathon/solana_pay/fetch_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ def fetch_transaction(client: Client, account: PublicKey, link: str, commitment:
if len(transaction.signatures) == 1 and transaction.signatures[0].public_key == account:
if not transaction.recent_blockhash:
# Fetch recent blockhash if missing
raw_blockhash: RPCResponse[BlockHashType] = client.get_recent_blockhash(commitment=commitment)
raw_blockhash: RPCResponse[BlockHashType] = client.get_latest_blockhas(commitment=commitment)
transaction.recent_blockhash = BlockHash(raw_blockhash['result']['value']).blockhash
if not signatures:
if not transaction.signatures:
fee_payer = account
elif fee_payer not in signatures:
elif fee_payer not in transaction.signatures:
raise ValueError("Invalid Fee payer or Missing Signature")
return transaction

0 comments on commit 28753dd

Please sign in to comment.