|
@@ -209,8 +209,14 @@ fn handle_program_log<T: anchor_lang::Event + anchor_lang::AnchorDeserialize>(
|
|
// Log emitted from the current program.
|
|
// Log emitted from the current program.
|
|
if l.starts_with("Program log:") {
|
|
if l.starts_with("Program log:") {
|
|
let log = l.to_string().split_off("Program log: ".len());
|
|
let log = l.to_string().split_off("Program log: ".len());
|
|
- let borsh_bytes = anchor_lang::__private::base64::decode(log)
|
|
|
|
- .map_err(|_| ClientError::LogParseError(l.to_string()))?;
|
|
|
|
|
|
+ let borsh_bytes = match anchor_lang::__private::base64::decode(&log) {
|
|
|
|
+ Ok(borsh_bytes) => borsh_bytes,
|
|
|
|
+ _ => {
|
|
|
|
+ #[cfg(feature = "debug")]
|
|
|
|
+ println!("Could not base64 decode log: {}", log);
|
|
|
|
+ return Ok((None, None, false));
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
|
|
let mut slice: &[u8] = &borsh_bytes[..];
|
|
let mut slice: &[u8] = &borsh_bytes[..];
|
|
let disc: [u8; 8] = {
|
|
let disc: [u8; 8] = {
|