Skip to content
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

SECFIND-244: Add notifyAndAttachCanister to canisters API #6126

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

dskloetd
Copy link
Contributor

@dskloetd dskloetd commented Jan 9, 2025

Motivation

We want to recover from interrupted canister creation in the frontend code.
To do this we should be able to notify the CMC and attach a canister without first making a transfer, as the transfer has already happened before the process got interrupted.
See this doc for details.

Changes

  1. Add notifyAndAttachCanister which can be used to recover canister creation based on an existing ICP transfer.

Tests

  1. Added unit tests.
  2. Cleaned up the existing test on which the new test was based, by using fake time instead of stubbing out setTimeout and not mocking console.log as nothing gets logged and this just makes debugging harder.
  3. Tested manually in a branch with the end-to-end solution.

Todos

  • Add entry to changelog (if necessary).
    not yet

@dskloetd dskloetd marked this pull request as ready for review January 9, 2025 10:11
@dskloetd dskloetd requested a review from a team as a code owner January 9, 2025 10:11
@dskloetd dskloetd enabled auto-merge January 9, 2025 10:11
Copy link
Contributor

@yhabib yhabib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

frontend/src/lib/api/canisters.api.ts Show resolved Hide resolved
frontend/src/lib/api/canisters.api.ts Show resolved Hide resolved
@dskloetd dskloetd added this pull request to the merge queue Jan 9, 2025
Merged via the queue into main with commit 8e3c2e6 Jan 9, 2025
31 checks passed
@dskloetd dskloetd deleted the kloet/attach-api branch January 9, 2025 10:59
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.

2 participants