pyth2wormhole-client: Fix warnings and the client feature
Change-Id: Ia74685f5e8e448c30678a4445c38f39f2f324a89
This commit is contained in:
parent
b5463572be
commit
54aadf5f5a
|
@ -2068,6 +2068,7 @@ dependencies = [
|
|||
"rocksalt",
|
||||
"solana-program",
|
||||
"solitaire",
|
||||
"solitaire-client",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -9,12 +9,13 @@ crate-type = ["cdylib", "lib"]
|
|||
name = "pyth2wormhole"
|
||||
|
||||
[features]
|
||||
client = ["solitaire/client", "no-entrypoint"]
|
||||
client = ["solitaire/client", "solitaire-client", "no-entrypoint"]
|
||||
no-entrypoint = []
|
||||
|
||||
[dependencies]
|
||||
bridge = {path = "../../bridge/program"}
|
||||
solitaire = { path = "../../solitaire/program" }
|
||||
solitaire-client = { path = "../../solitaire/client", optional = true }
|
||||
pyth-client = {git = "https://github.com/drozdziak1/pyth-client-rs", branch = "v2-clone-and-debug"}
|
||||
rocksalt = { path = "../../solitaire/rocksalt" }
|
||||
solana-program = "=1.7.0"
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
use std::{convert::TryFrom, mem};
|
||||
|
||||
|
||||
use borsh::{BorshDeserialize, BorshSerialize};
|
||||
use pyth_client::{
|
||||
AccKey, AccountType, CorpAction, Price, PriceComp, PriceInfo, PriceStatus, PriceType,
|
||||
};
|
||||
|
||||
use solana_program::{msg, program_error::ProgramError, pubkey::Pubkey};
|
||||
use solitaire::{
|
||||
processors::seeded::AccountOwner, AccountState, Context, Data, ExecutionContext, FromAccounts,
|
||||
Info, InstructionContext, Keyed, Owned, Peel, Result as SoliResult, Signer, SolitaireError,
|
||||
Info, InstructionContext, Keyed, Owned, Peel, Result as SoliResult, Signer,
|
||||
ToInstruction,
|
||||
};
|
||||
|
||||
|
@ -67,9 +65,9 @@ impl<'b> InstructionContext<'b> for Forward<'b> {
|
|||
pub fn forward_price(
|
||||
_ctx: &ExecutionContext,
|
||||
accs: &mut Forward,
|
||||
data: ForwardData,
|
||||
_data: ForwardData,
|
||||
) -> SoliResult<()> {
|
||||
let price_attestation = PriceAttestation::from_bytes(&*accs.pyth_price.0.try_borrow_data()?)?;
|
||||
let _price_attestation = PriceAttestation::from_bytes(&*accs.pyth_price.0.try_borrow_data()?)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{convert::TryFrom, mem};
|
||||
use std::{mem};
|
||||
|
||||
use pyth_client::{CorpAction, Price, PriceStatus, PriceType};
|
||||
use solana_program::{program_error::ProgramError, pubkey::Pubkey};
|
||||
|
|
Loading…
Reference in New Issue