Conversation
| @contextlib.asynccontextmanager | ||
| async def open(self) -> typing.AsyncGenerator["EVMBlockchainWallet", None]: | ||
| rpc_url = self._get_rpc_url() | ||
| self._w3 = web3_lib.AsyncWeb3(web3_lib.AsyncWeb3.AsyncHTTPProvider(rpc_url)) |
Member
There was a problem hiding this comment.
I believe we can do async with AsyncWeb3 to close everything automatically
e7d78ad to
219e381
Compare
219e381 to
362fbd2
Compare
GuillaumeDSM
reviewed
Mar 1, 2026
Member
There was a problem hiding this comment.
this file should not be comitted
|
|
||
| class TestLiveEthereumBalance: | ||
| @pytest.mark.asyncio | ||
| @pytest.mark.skipif(not _ETH_TEST_ADDRESS, reason="TEST_EVM_ETH_ADDRESS not set") |
| async with wallet.open(): | ||
| return _convert_portfolio_assets(await wallet.get_balance()) | ||
| except ImportError: | ||
| return None |
Member
There was a problem hiding this comment.
should we raise something here ? I think it's better than silencing this error
| profile_data: "exchange_service_feed.ExchangeProfile", | ||
| new_position_only: bool, | ||
| started_at: datetime.datetime, | ||
| reference_market: str = "USDT", |
Member
There was a problem hiding this comment.
Suggested change
| reference_market: str = "USDT", | |
| reference_market: str = octobot_commons.constants.DEFAULT_REFERENCE_MARKET, |
Comment on lines
+157
to
+158
| # Total portfolio value = positions + free reference-market balance | ||
| total_portfolio_value = total_position_value + reference_market_balance |
| # Scripting requirements | ||
| tinydb | ||
| # Blockchain wallet | ||
| web3==7.14.1 |
362fbd2 to
f78109a
Compare
Member
Author
|
It's up, thanks! |
GuillaumeDSM
approved these changes
Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.