Skip to content

Commit

Permalink
client: Add internal_rpc method for mock feature (#3135)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptopapi997 authored Jul 30, 2024
1 parent 895f018 commit 5a20cd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5a20cd9

Please sign in to comment.