The ic-ledger-types
crate was not released at the same time as ic-cdk 0.17.0
. As a result, if both crates are used in a project, the project cannot be built.
For example:
Compiling junobuild-shared v0.0.21 (/Users/daviddalbusco/projects/juno/juno/src/libs/shared)
error[E0308]: mismatched types
--> src/libs/shared/src/ledger/icp.rs:74:5
|
74 | transfer(ledger, args).await
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `RejectionCode`, found `ic_cdk::api::call::RejectionCode`
|
= note: `ic_cdk::api::call::RejectionCode` and `RejectionCode` have similar names, but are actually distinct types
note: `ic_cdk::api::call::RejectionCode` is defined in crate `ic_cdk`
--> /cargo/registry/src/index.crates.io-6f17d22bba15001f/ic-cdk-0.16.0/src/api/call.rs:21:1
|
21 | pub enum RejectionCode {
| ^^^^^^^^^^^^^^^^^^^^^^
note: `RejectionCode` is defined in crate `ic_cdk`
--> /cargo/registry/src/index.crates.io-6f17d22bba15001f/ic-cdk-0.17.0/src/api/call.rs:21:1
|
21 | pub enum RejectionCode {
| ^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `ic_cdk` are being used?
Lock file:
[[package]]
name = "ic-ledger-types"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a144b5b4c9e4b164b338440cfbdcf9f30ff45e3d48a3be62d2424996dc93d6f"
dependencies = [
"candid",
"crc32fast",
"hex",
"ic-cdk 0.16.0",
"serde",
"serde_bytes",
"sha2",
]
Can someone release a compatible version of ic-ledger-types
?