Skip to content

Commit

Permalink
Add support for hSOL
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jun 17, 2024
1 parent fdc9395 commit 43ee62d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/coin_gecko.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fn token_to_coin(token: &MaybeToken) -> Result<&'static str, Box<dyn std::error:
Token::USDT => "tether",
Token::UXD => "uxd-stablecoin",
Token::bSOL => "blazestake-staked-sol",
Token::hSOL => "msol",
Token::mSOL => "msol",
Token::stSOL => "lido-staked-sol",
Token::JitoSOL => "jito-staked-sol",
Expand Down Expand Up @@ -91,6 +92,8 @@ pub async fn get_current_price(token: &MaybeToken) -> Result<Decimal, Box<dyn st
solana: Option<CurrencyList>,
#[serde(rename = "blazestake-staked-sol")]
bsol: Option<CurrencyList>,
#[serde(rename = "helius-staked-sol")]
hsol: Option<CurrencyList>,
msol: Option<CurrencyList>,
#[serde(rename = "lido-staked-sol")]
stsol: Option<CurrencyList>,
Expand Down Expand Up @@ -128,6 +131,7 @@ pub async fn get_current_price(token: &MaybeToken) -> Result<Decimal, Box<dyn st
.or(coins.tether)
.or(coins.uxd)
.or(coins.bsol)
.or(coins.hsol)
.or(coins.jlp)
.or(coins.jup)
.or(coins.jto)
Expand Down
5 changes: 5 additions & 0 deletions src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub enum Token {
USDT,
UXD,
bSOL,
hSOL,
mSOL,
stSOL,
JitoSOL,
Expand All @@ -61,6 +62,7 @@ impl Token {
Token::UXD => pubkey!("7kbnvuGBxxj8AG9qp8Scn56muWGaRaFqxg1FsRp3PaFT"),
Token::tuUSDC => pubkey!("Amig8TisuLpzun8XyGfC5HJHHGUQEscjLgoTWsCCKihg"),
Token::bSOL => pubkey!("bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1"),
Token::hSOL => pubkey!("he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A"),
Token::mSOL => pubkey!("mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So"),
Token::stSOL => pubkey!("7dHbWXmci3dT8UFYWYZweBLXgycu7Y3iL6trKn1Y7ARj"),
Token::JitoSOL => pubkey!("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"),
Expand Down Expand Up @@ -90,6 +92,7 @@ impl Token {
Token::UXD => "UXD$",
Token::tuUSDC => "tu($)",
Token::bSOL => "b◎",
Token::hSOL => "h◎",
Token::mSOL => "m◎",
Token::stSOL => "st◎",
Token::JitoSOL => "jito◎",
Expand Down Expand Up @@ -123,6 +126,7 @@ impl Token {
Token::stSOL
| Token::tuSOL
| Token::bSOL
| Token::hSOL
| Token::mSOL
| Token::JitoSOL
| Token::tumSOL
Expand Down Expand Up @@ -231,6 +235,7 @@ impl Token {
| Token::USDT
| Token::UXD
| Token::bSOL
| Token::hSOL
| Token::mSOL
| Token::stSOL
| Token::JitoSOL
Expand Down

0 comments on commit 43ee62d

Please sign in to comment.