Skip to content

Commit 2952930

Browse files
lang: Fix using Vec<u8> type with declare_program! (otter-sec#2966)
1 parent 1238270 commit 2952930

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ The minor version will be incremented upon a breaking change and the patch versi
2828
- idl: Fix potential panic on external type resolution ([#2954](https://github.com/coral-xyz/anchor/pull/2954)).
2929
- lang: Fix using defined types in instruction parameters with `declare_program!` ([#2959](https://github.com/coral-xyz/anchor/pull/2959)).
3030
- lang: Fix using const generics with `declare_program!` ([#2965](https://github.com/coral-xyz/anchor/pull/2965)).
31+
- lang: Fix using `Vec<u8>` type with `declare_program!` ([#2966](https://github.com/coral-xyz/anchor/pull/2966)).
3132

3233
### Breaking
3334

lang/attribute/program/src/declare_program/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub fn convert_idl_type_to_str(ty: &IdlType) -> String {
5959
IdlType::I128 => "i128".into(),
6060
IdlType::U256 => "u256".into(),
6161
IdlType::I256 => "i256".into(),
62-
IdlType::Bytes => "bytes".into(),
62+
IdlType::Bytes => "Vec<u8>".into(),
6363
IdlType::String => "String".into(),
6464
IdlType::Pubkey => "Pubkey".into(),
6565
IdlType::Option(ty) => format!("Option<{}>", convert_idl_type_to_str(ty)),

0 commit comments

Comments
 (0)