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

FOLLOW-244: Add notifyTopUpCanister to CMC API #5852

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Conversation

dskloetd
Copy link
Contributor

Motivation

Topping up a canister is a 2-step process:

  1. Transfer ICP to a subaccount of the CMC
  2. Notify the CMC of the transfer

Because the process might be interrupted between the 2 steps, the nns-dapp canister listens for all transactions to see if any might be a canister top-up transaction by an NNS dapp user.

We want the NNS dapp to stop listening for all transactions so we want to move this fallback mechanism to the frontend.

In this PR we add just an API function that will be needed to notify the CMC from the frontend.

Changes

  1. Add notifyTopUpCanister to CMC API.

Tests

  1. Unit tests added.
  2. Tested manually in another branch with more changes.

Todos

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

@dskloetd dskloetd marked this pull request as ready for review November 25, 2024 15:14
@dskloetd dskloetd requested a review from a team as a code owner November 25, 2024 15:14
Copy link
Contributor

@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

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

Thanks!

@dskloetd dskloetd added this pull request to the merge queue Nov 25, 2024
Merged via the queue into main with commit 257bf40 Nov 25, 2024
30 checks passed
@dskloetd dskloetd deleted the kloet/topup-api branch November 25, 2024 15:51
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