Переглянути джерело

client: Fix compilation with Solana `1.14` (#2572)

acheron 2 роки тому
батько
коміт
cf057acac0
2 змінених файлів з 5 додано та 3 видалено
  1. 1 0
      CHANGELOG.md
  2. 4 3
      client/src/lib.rs

+ 1 - 0
CHANGELOG.md

@@ -22,6 +22,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 - ts: Packages no longer depend on `assert` ([#2535](https://github.com/coral-xyz/anchor/pull/2535)).
 - lang: Support for `const` in the `InitSpace` macro ([#2555](https://github.com/coral-xyz/anchor/pull/2555)).
 - cli: Support workspace inheritence ([#2570](https://github.com/coral-xyz/anchor/pull/2570)).
+- client: Compile with Solana `1.14`([#2572](https://github.com/coral-xyz/anchor/pull/2572)).
 
 ### Breaking
 

+ 4 - 3
client/src/lib.rs

@@ -279,9 +279,10 @@ impl<C: Deref<Target = impl Signer> + Clone> Program<C> {
                     client.logs_subscribe(filter, config).await?;
 
                 tx.send(unsubscribe).map_err(|e| {
-                    ClientError::SolanaClientPubsubError(PubsubClientError::UnexpectedMessageError(
-                        e.to_string(),
-                    ))
+                    ClientError::SolanaClientPubsubError(PubsubClientError::RequestFailed {
+                        message: "Unsubscribe failed".to_string(),
+                        reason: e.to_string(),
+                    })
                 })?;
 
                 while let Some(logs) = notifications.next().await {