Skip to content

Conversation

@Daanvdplas
Copy link
Collaborator

@Daanvdplas Daanvdplas commented Nov 12, 2025

No description provided.

Copy link
Contributor

Copilot AI left a 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_confirm flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +339 to +345
Ok(_) => {},
Err(_) => {
terminate_nodes(&mut Cli, processes).await?;
Cli.outro_cancel(FAILED)?;
return Ok(());
},
}
Copy link

Copilot AI Nov 12, 2025

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.

Suggested change
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(());
},

Copilot uses AI. Check for mistakes.
Base automatically changed from daan/refactor-pop_up_ink_node_automatic_deployment to daan/fix-pop_up_contract_signer November 12, 2025 12:00
@moliholy moliholy merged commit 823e846 into daan/fix-pop_up_contract_signer Nov 12, 2025
22 of 23 checks passed
@moliholy moliholy deleted the daan/fix-interaction_with_contract_after_deployment branch November 12, 2025 12:01
moliholy added a commit that referenced this pull request Nov 14, 2025
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants