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

Add retrieveBTCWithApproval to ckbtc minter canister #454

Merged
merged 5 commits into from
Oct 17, 2023

Conversation

dskloetd
Copy link
Collaborator

@dskloetd dskloetd commented Oct 17, 2023

Motivation

We want to use ICRC-2 for BTC withdrawals.

Changes

  1. Add createRetrieveBtcWithApprovalError to convert RetrieveBtcWithApprovalError.
  2. Add retrieveBtcWithApproval which calls retrieve_btc_with_approval on the minter canister.
  3. Add unit tests for retrieveBtcWithApproval.
  4. Unrelated: Correct a comment about the type of subaccount on getBtcAddress, which was mentioned as Principal but should be Uint8Array.

Tests

Unit tests pass.
Also tested manually by installing the local changes in nns-dapp.

Todos

  • Add entry to changelog (if necessary).

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2023

size-limit report 📦

Path Size
@dfinity/ckbtc 6.79 KB (+1.15% 🔺)
@dfinity/cmc 1.01 KB (0%)
@dfinity/ledger-icrc 2.92 KB (0%)
@dfinity/ledger-icp 14.17 KB (0%)
@dfinity/nns 33.54 KB (0%)
@dfinity/nns-proto 76.3 KB (0%)
@dfinity/sns 14.89 KB (0%)
@dfinity/utils 3.81 KB (0%)
@dfinity/ic-management 1.94 KB (0%)

@dskloetd dskloetd marked this pull request as ready for review October 17, 2023 08:21
Copy link
Contributor

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

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

LGTM!

@dskloetd dskloetd merged commit 234c232 into main Oct 17, 2023
9 checks passed
@dskloetd dskloetd deleted the kloet/ckbtc-approval branch October 17, 2023 08:42
@dskloetd dskloetd mentioned this pull request Oct 17, 2023
1 task
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