From 1faf3436248b50ef07fd41a4d7483e47cca33b34 Mon Sep 17 00:00:00 2001 From: acheron Date: Sat, 27 Jul 2024 16:20:10 +0200 Subject: [PATCH 1/2] client: Support non-8-byte discriminators --- client/src/lib.rs | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 59d21e6995..b81ead8222 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -373,8 +373,8 @@ pub fn handle_program_log borsh_bytes, + let log_bytes = match STANDARD.decode(log) { + Ok(log_bytes) => log_bytes, _ => { #[cfg(feature = "debug")] println!("Could not base64 decode log: {}", log); @@ -382,19 +382,14 @@ pub fn handle_program_log Date: Sat, 27 Jul 2024 22:27:26 +0200 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 972f47792b..dcab69a022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The minor version will be incremented upon a breaking change and the patch versi - lang: Update `dispatch` function to support dynamic discriminators ([#3104](https://github.com/coral-xyz/anchor/pull/3104)). - lang: Remove the fallback function shortcut in `try_entry` function ([#3109](https://github.com/coral-xyz/anchor/pull/3109)). - ts: Get discriminator lengths dynamically ([#3120](https://github.com/coral-xyz/anchor/pull/3120)). +- client: Support non-8-byte discriminators ([#3125](https://github.com/coral-xyz/anchor/pull/3125)). ### Fixes