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

Expose pending UTXOs returned by the minter #477

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Conversation

dskloetd
Copy link
Collaborator

Motivation

When we call update_balace on the ckBTC minter, it will credit deposited BTC from transactions with at least 12 confirmations.
If there are no new transactions with at least 12 confirmations, it will return an error.
If there are transactions with fewer than 12 confirmations, the error will contain the pending UTXOs of those transaction.

Changes

Forward the pending UTXOs returned by the minter, in the mapped error.

Tests

Existing unit test has been updated.

Todos

  • Add entry to changelog (if necessary).

@dskloetd dskloetd requested a review from lmuntaner November 21, 2023 10:42
Copy link
Contributor

size-limit report 📦

Path Size
@dfinity/ckbtc 6.86 KB (+0.65% 🔺)
@dfinity/cmc 1.01 KB (0%)
@dfinity/ledger-icrc 2.92 KB (0%)
@dfinity/ledger-icp 14.41 KB (0%)
@dfinity/nns 33.82 KB (0%)
@dfinity/nns-proto 76.3 KB (0%)
@dfinity/sns 14.92 KB (0%)
@dfinity/utils 4.12 KB (0%)
@dfinity/ic-management 1.94 KB (0%)

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 903300e into main Nov 21, 2023
10 checks passed
@dskloetd dskloetd deleted the kloet/pending-utxos branch November 21, 2023 10:55
@dskloetd dskloetd mentioned this pull request Nov 21, 2023
1 task
github-merge-queue bot pushed a commit to dfinity/nns-dapp that referenced this pull request Nov 21, 2023
# Motivation

Pull in the changes from dfinity/ic-js#477 to
forward pending UTXOs from the minter.

# Changes

## Automated

Ran `npm run upgrade:next`

## Manual

Added required constructor parameters to `MinterNoNewUtxosError`.

# Tests

Existing tests pass.

# Todos

- [ ] Add entry to changelog (if necessary).
not necessary
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