-
Notifications
You must be signed in to change notification settings - Fork 40
fix: consistent interaction with contract after deployment #733
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: consistent interaction with contract after deployment #733
Conversation
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.
Pull Request Overview
This PR fixes the contract deployment flow to ensure consistent interaction prompts after deployment, addressing issue #732. The changes restructure the deployment logic to unify the cleanup and interaction prompt handling across both wallet and non-wallet flows.
- Introduced a tracking variable to capture deployed contract addresses across both deployment flows
- Restructured the non-wallet deployment logic into a unified else block
- Added a consolidated interaction prompt at the end that respects the
skip_confirmflag
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Ok(_) => {}, | ||
| Err(_) => { | ||
| terminate_nodes(&mut Cli, processes).await?; | ||
| Cli.outro_cancel(FAILED)?; | ||
| return Ok(()); | ||
| }, | ||
| } |
Copilot
AI
Nov 12, 2025
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.
In the upload-only success path (line 339), the function returns early at line 343 without properly cleaning up. This bypasses the node termination at line 417 and doesn't display any outro message to the user. Consider restructuring to fall through to the unified cleanup section at the end of the function, or explicitly handle cleanup and user messaging before returning.
| Ok(_) => {}, | |
| Err(_) => { | |
| terminate_nodes(&mut Cli, processes).await?; | |
| Cli.outro_cancel(FAILED)?; | |
| return Ok(()); | |
| }, | |
| } | |
| Ok(_) => { | |
| terminate_nodes(&mut Cli, processes).await?; | |
| Cli.outro("Contract uploaded successfully!")?; | |
| return Ok(()); | |
| }, | |
| Err(_) => { | |
| terminate_nodes(&mut Cli, processes).await?; | |
| Cli.outro_cancel(FAILED)?; | |
| return Ok(()); | |
| }, |
823e846
into
daan/fix-pop_up_contract_signer
* fix(pop up contract): signer prompted if not provided * fix: contracts integration tests * refactor: pop up ink node automatic deployment (#729) * fix: consistent interaction with contract after deployment (#733) * refactor: pop up ink node automatic deployment * fix: consistent interaction with contract after deployment for suri or wallet * refactor: make should_auto_start_local_node attached to the command * feat: do not ask for suri if --skip-confirm * fix: contract tests * feat: never prompt with --skip-confirm * test: contract flow * fix: contract integration tests * feat: allow using --skip-confirm and --use-wallet * fix: increase timeout for integration test * refactor: make pop function asynchronous * fix: integration tests (#746) --------- Co-authored-by: José Molina <jose@r0gue.io> Co-authored-by: Alex Bean <alexfraga10@gmail.com>
No description provided.