Skip to content

Commit 2d504ad

Browse files
authored
bump sdk version (#24)
* bump sdk version includes changes to use commitment level Confirmed for events
1 parent 3af4564 commit 2d504ad

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

Cargo.lock

+19-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2021"
77
actix-web = "4.4.0"
88
argh = "0.1.12"
99
drift-sdk = { git = "https://github.com/circuit-research/protocol-v2", branch = "cargo-add-sdk" }
10+
# drift-sdk = { path = "../protocol-v2/sdk-rs" }
1011
env_logger = "0.10.1"
1112
futures-util = "0.3.29"
1213
log = "0.4.20"

src/websocket.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::ops::Neg;
55
use drift_sdk::{
66
async_utils::retry_policy::{self},
77
constants::ProgramData,
8-
event_subscriber::{DriftEvent, EventSubscriber, PubsubClient},
8+
event_subscriber::{DriftEvent, EventSubscriber, PubsubClient, RpcClient},
99
types::{MarketType, Order, OrderType, PositionDirection},
1010
Pubkey, Wallet,
1111
};
@@ -92,6 +92,7 @@ async fn accept_connection(
9292
PubsubClient::new(ws_endpoint.as_str())
9393
.await
9494
.expect("ws connect"),
95+
RpcClient::new(ws_endpoint.replace("ws", "http")),
9596
sub_account_address,
9697
retry_policy::exponential_backoff(3),
9798
);

0 commit comments

Comments
 (0)