Skip to content

Commit d7b64ce

Browse files
committed
Fix
1 parent a5ab4b8 commit d7b64ce

File tree

3 files changed

+13
-26
lines changed

3 files changed

+13
-26
lines changed

src/api_client.rs

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
use {
2-
reqwest::{
3-
Client,
4-
Url,
5-
},
6-
secp256k1::{
7-
Message,
8-
Secp256k1,
9-
SecretKey,
10-
},
2+
reqwest::{Client, Url},
3+
secp256k1::{Message, Secp256k1, SecretKey},
114
serde::Serialize,
12-
std::{
13-
sync::Arc,
14-
time::Duration,
15-
},
5+
std::{sync::Arc, time::Duration},
166
wormhole_sdk::vaa::Body,
177
};
188

@@ -21,7 +11,7 @@ pub struct ApiClientConfig {
2111
}
2212

2313
struct ApiClientInner {
24-
client: Client,
14+
client: Client,
2515
base_url: Url,
2616
}
2717

@@ -34,10 +24,10 @@ const DEFAULT_TIMEOUT: Duration = Duration::from_secs(5);
3424

3525
#[derive(Serialize, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
3626
pub struct Observation<P> {
37-
pub version: u8,
27+
pub version: u8,
3828
#[serde(with = "hex::serde")]
3929
pub signature: [u8; 65],
40-
pub body: Body<P>,
30+
pub body: Body<P>,
4131
}
4232

4333
impl<P: Serialize> Observation<P> {

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct RunOptions {
1414
env = "WORMHOLE_PID",
1515
default_value = "H3fxXJ86ADW2PNuDDmZJg6mzTtPxkYCpNuQUTgmJ7AjU"
1616
)]
17-
pub wormhole_pid: String,
17+
pub wormhole_pid: String,
1818
#[arg(long = "server-url", env = "SERVER_URL")]
19-
pub server_url: String,
19+
pub server_url: String,
2020
}

src/main.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use {
2-
api_client::{
3-
ApiClient,
4-
Observation,
5-
},
2+
api_client::{ApiClient, Observation},
63
borsh::BorshDeserialize,
74
clap::Parser,
85
posted_message::PostedMessageUnreliableData,
@@ -26,11 +23,11 @@ mod config;
2623
mod posted_message;
2724

2825
struct RunListenerInput {
29-
ws_url: String,
30-
secret_key: SecretKey,
31-
wormhole_pid: Pubkey,
26+
ws_url: String,
27+
secret_key: SecretKey,
28+
wormhole_pid: Pubkey,
3229
accumulator_address: Pubkey,
33-
api_client: ApiClient,
30+
api_client: ApiClient,
3431
}
3532

3633
fn find_message_pda(wormhole_pid: &Pubkey, slot: u64) -> Pubkey {

0 commit comments

Comments
 (0)