Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 65eeaf8

Browse files
committed
token-client: Add new and new_with_confirmation methods
1 parent 64abc40 commit 65eeaf8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

token/client/src/client.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ pub struct ProgramRpcClientSendTransaction {
125125
confirm: bool,
126126
}
127127

128+
impl ProgramRpcClientSendTransaction {
129+
/// Create an instance that sends the transaction **without** waiting for confirmation.
130+
pub fn new() -> Self {
131+
Self::default()
132+
}
133+
134+
/// Create an instance that sends and confirms the transaction.
135+
pub fn new_with_confirmation() -> Self {
136+
Self { confirm: true }
137+
}
138+
}
139+
128140
#[derive(Debug, Clone, PartialEq, Eq)]
129141
pub enum RpcClientResponse {
130142
Signature(Signature),

0 commit comments

Comments
 (0)