mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-08-16 08:48:04 +00:00
Update src/trading/buyer.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
parent
ec1c3afae4
commit
2ad0f37912
@@ -268,6 +268,8 @@ class TokenBuyer(Trader):
|
|||||||
|
|
||||||
tokens_received = await self._get_tokens_received_from_tx(tx_response, token_info)
|
tokens_received = await self._get_tokens_received_from_tx(tx_response, token_info)
|
||||||
|
|
||||||
|
if tokens_received == 0:
|
||||||
|
raise ValueError("Cannot compute execution price: zero tokens received")
|
||||||
actual_price = sol_sent_to_curve / tokens_received
|
actual_price = sol_sent_to_curve / tokens_received
|
||||||
|
|
||||||
logger.info(f"Bonding curve received: {sol_sent_to_curve:.6f} SOL")
|
logger.info(f"Bonding curve received: {sol_sent_to_curve:.6f} SOL")
|
||||||
|
|||||||
Reference in New Issue
Block a user