-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(controller): wait for controller to be deployed #2278
Conversation
WalkthroughOhayo, sensei! The changes enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Controller
participant Provider
participant RPC
User->>Controller: Request to deploy account
Controller->>Provider: Check if account exists
Provider-->>Controller: Account existence response
alt Account does not exist
Controller->>RPC: Send deployment request
RPC-->>Controller: Deployment response
Controller->>TransactionWaiter: Wait for transaction confirmation
TransactionWaiter-->>Controller: Transaction confirmed
Controller-->>User: Account deployed successfully
else Account exists
Controller-->>User: Account already exists
end
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Additional comments not posted (1)
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
bin/sozo/src/commands/options/account/controller.rs (1)
329-333
: Consider improving error handling for response parsing.The current approach uses
context
for error handling, which is good, but consider adding more specific error messages or handling cases where the expected keys might be missing.// Example improvement let transaction_hash = response.get("result") .and_then(|result| result.get("transaction_hash")) .and_then(|hash| hash.as_str()) .context("Transaction hash not found in response")?;
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2278 +/- ##
==========================================
- Coverage 70.29% 70.27% -0.02%
==========================================
Files 342 342
Lines 45094 45107 +13
==========================================
+ Hits 31698 31699 +1
- Misses 13396 13408 +12 ☔ View full report in Codecov by Sentry. |
cartridge_deployController
doesn't wait until the account actually gets deployed before returning the response. so we wait for the returned deployment tx hash before proceeding.Summary by CodeRabbit
New Features
Bug Fixes