diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d3da911ca..f5fa4ffc74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ The minor version will be incremented upon a breaking change and the patch versi - idl: Fix potential panic on external type resolution ([#2954](https://github.com/coral-xyz/anchor/pull/2954)). - lang: Fix using defined types in instruction parameters with `declare_program!` ([#2959](https://github.com/coral-xyz/anchor/pull/2959)). - lang: Fix using const generics with `declare_program!` ([#2965](https://github.com/coral-xyz/anchor/pull/2965)). +- lang: Fix using `Vec` type with `declare_program!` ([#2966](https://github.com/coral-xyz/anchor/pull/2966)). ### Breaking diff --git a/lang/attribute/program/src/declare_program/common.rs b/lang/attribute/program/src/declare_program/common.rs index 5cd08b87ed..9b1f71f350 100644 --- a/lang/attribute/program/src/declare_program/common.rs +++ b/lang/attribute/program/src/declare_program/common.rs @@ -59,7 +59,7 @@ pub fn convert_idl_type_to_str(ty: &IdlType) -> String { IdlType::I128 => "i128".into(), IdlType::U256 => "u256".into(), IdlType::I256 => "i256".into(), - IdlType::Bytes => "bytes".into(), + IdlType::Bytes => "Vec".into(), IdlType::String => "String".into(), IdlType::Pubkey => "Pubkey".into(), IdlType::Option(ty) => format!("Option<{}>", convert_idl_type_to_str(ty)),