Przeglądaj źródła

client: Add `internal_rpc` method for `mock` feature (#3135)

cryptopapi997 1 rok temu
rodzic
commit
5a20cd9378
2 zmienionych plików z 6 dodań i 0 usunięć
  1. 1 0
      CHANGELOG.md
  2. 5 0
      client/src/lib.rs

+ 1 - 0
CHANGELOG.md

@@ -28,6 +28,7 @@ The minor version will be incremented upon a breaking change and the patch versi
 - spl: Add `withdraw_withheld_tokens_from_accounts` instruction ([#3128]([https://github.com/coral-xyz/anchor/pull/3128)).
 - ts: Add optional `wallet` property to the `Provider` interface ([#3130](https://github.com/coral-xyz/anchor/pull/3130)).
 - cli: Warn if `anchor-spl/idl-build` is missing ([#3133](https://github.com/coral-xyz/anchor/pull/3133)).
+- client: Add `internal_rpc` method for `mock` feature ([#3135](https://github.com/coral-xyz/anchor/pull/3135)).
 
 ### Fixes
 

+ 5 - 0
client/src/lib.rs

@@ -240,6 +240,11 @@ impl<C: Deref<Target = impl Signer> + Clone> Program<C> {
         self.program_id
     }
 
+    #[cfg(feature = "mock")]
+    pub fn internal_rpc(&self) -> &AsyncRpcClient {
+        &self.internal_rpc_client
+    }
+
     async fn account_internal<T: AccountDeserialize>(
         &self,
         address: Pubkey,