Skip to content

Commit

Permalink
fix cli for updating oracle (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
nope-finance authored Nov 22, 2022
1 parent 9b60774 commit c602b70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions ci/install-build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ set -ex
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
sudo apt-get update
sudo apt-get install -y clang-7 --allow-unauthenticated
sudo apt-get install -y openssl --allow-unauthenticated
sudo apt-get install -y libssl-dev --allow-unauthenticated
sudo apt-get install -y libssl1.1 --allow-unauthenticated
sudo apt-get install -y libudev-dev
sudo apt-get install -y binutils-dev
sudo apt-get install -y libunwind-dev
clang-7 --version
8 changes: 2 additions & 6 deletions token-lending/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1643,9 +1643,7 @@ fn command_update_reserve(
}

let mut new_pyth_product_pubkey = solend_program::NULL_PUBKEY;
if pyth_price_pubkey.is_some()
&& reserve.liquidity.pyth_oracle_pubkey != pyth_price_pubkey.unwrap()
{
if pyth_price_pubkey.is_some() {
no_change = false;
println!(
"Updating pyth oracle pubkey from {} to {}",
Expand All @@ -1656,9 +1654,7 @@ fn command_update_reserve(
new_pyth_product_pubkey = pyth_product_pubkey.unwrap();
}

if switchboard_feed_pubkey.is_some()
&& reserve.liquidity.switchboard_oracle_pubkey != switchboard_feed_pubkey.unwrap()
{
if switchboard_feed_pubkey.is_some() {
no_change = false;
println!(
"Updating switchboard_oracle_pubkey {} to {}",
Expand Down

0 comments on commit c602b70

Please sign in to comment.