Skip to content

chore: DEFI-2304 remove deprecated ic-cdk imports in ic-bitcoin-canister-mock#10289

Draft
gregorydemay wants to merge 1 commit into
masterfrom
gdemay/DEFI-2304-bitcoin-canister-mock
Draft

chore: DEFI-2304 remove deprecated ic-cdk imports in ic-bitcoin-canister-mock#10289
gregorydemay wants to merge 1 commit into
masterfrom
gdemay/DEFI-2304-bitcoin-canister-mock

Conversation

@gregorydemay
Copy link
Copy Markdown
Contributor

@gregorydemay gregorydemay commented May 22, 2026

Summary

Continues DEFI-2304 — removing the file-level #![allow(deprecated)] attributes that were introduced in #6264 when ic-cdk was upgraded to 0.18, by migrating the affected files off the deprecated ic_cdk::api::management_canister::* surface.

This PR handles ic-bitcoin-canister-mock. The only deprecated APIs it referenced were the BitcoinNetwork and SendTransactionRequest types; both now live at ic_cdk::bitcoin_canister::{Network, SendTransactionRequest}. No behavior change.

Follows the same pattern as #6755 (ic-btc-checker) and #6761 (ic-ckbtc-minter).

…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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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} with ic_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants