Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cli for updating oracle #114

Merged
merged 1 commit into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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