Skip to content

Commit 87e43ca

Browse files
fix(hermes): remove unwrap for product account header (#2765)
* fix: remove unwrap * chore: bump ver
1 parent 21e15cc commit 87e43ca

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

apps/hermes/server/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/hermes/server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hermes"
3-
version = "0.9.2"
3+
version = "0.9.3"
44
description = "Hermes is an agent that provides Verified Prices from the Pythnet Pyth Oracle."
55
edition = "2021"
66

apps/hermes/server/src/network/pythnet.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,9 @@ async fn fetch_price_feeds_metadata(
279279
filters: Some(vec![RpcFilterType::Memcmp(Memcmp::new(
280280
0, // offset
281281
// Product account header: <magic:u32le:0xa1b2c3d4> <version:u32le:0x02> <account_type:u32le:0x02>
282-
// The string literal in hex::decode is represented as be (big endian).
283-
MemcmpEncodedBytes::Bytes(hex::decode("d4c3b2a10200000002000000").unwrap()),
282+
MemcmpEncodedBytes::Bytes(
283+
b"\xd4\xc3\xb2\xa1\x02\x00\x00\x00\x02\x00\x00\x00".to_vec(),
284+
),
284285
))]),
285286
account_config: RpcAccountInfoConfig {
286287
encoding: Some(UiAccountEncoding::Base64Zstd),

0 commit comments

Comments
 (0)