chore: DEFI-2304 remove deprecated ic-cdk imports in ic-bitcoin-canister-mock#10289
Draft
gregorydemay wants to merge 1 commit into
Draft
chore: DEFI-2304 remove deprecated ic-cdk imports in ic-bitcoin-canister-mock#10289gregorydemay wants to merge 1 commit into
gregorydemay wants to merge 1 commit into
Conversation
…ter-mock Migrate `BitcoinNetwork` and `SendTransactionRequest` from the deprecated `ic_cdk::api::management_canister::bitcoin` path to the modern `ic_cdk::bitcoin_canister` module, and drop the file-level `#![allow(deprecated)]` introduced by PR #6264. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes usage of deprecated ic-cdk Bitcoin management canister types in ic-bitcoin-canister-mock by switching to the non-deprecated ic_cdk::bitcoin_canister equivalents, allowing the file-level #![allow(deprecated)] suppression to be dropped without changing behavior.
Changes:
- Removed
#![allow(deprecated)]crate attributes from the mock canister and its tests. - Replaced
ic_cdk::api::management_canister::bitcoin::{BitcoinNetwork, SendTransactionRequest}withic_cdk::bitcoin_canister::{Network as BitcoinNetwork, SendTransactionRequest}.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rs/bitcoin/mock/src/main.rs | Drops deprecated import surface and the allow(deprecated) suppression by using ic_cdk::bitcoin_canister types. |
| rs/bitcoin/mock/tests/tests.rs | Updates test imports to the new ic_cdk::bitcoin_canister types and removes the allow(deprecated) suppression. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continues DEFI-2304 — removing the file-level
#![allow(deprecated)]attributes that were introduced in #6264 whenic-cdkwas upgraded to 0.18, by migrating the affected files off the deprecatedic_cdk::api::management_canister::*surface.This PR handles
ic-bitcoin-canister-mock. The only deprecated APIs it referenced were theBitcoinNetworkandSendTransactionRequesttypes; both now live atic_cdk::bitcoin_canister::{Network, SendTransactionRequest}. No behavior change.Follows the same pattern as #6755 (
ic-btc-checker) and #6761 (ic-ckbtc-minter).