mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-21 15:10:42 +00:00
feat: linting + prettier
This commit is contained in:
@@ -27,11 +27,11 @@ export async function pythFetchPrice(priceFeedID: string): Promise<string> {
|
||||
}
|
||||
|
||||
// get price and exponent from price feed
|
||||
let price = new BN(currentPrice[0].getPriceUnchecked().price);
|
||||
let exponent = new BN(currentPrice[0].getPriceUnchecked().expo);
|
||||
const price = new BN(currentPrice[0].getPriceUnchecked().price);
|
||||
const exponent = new BN(currentPrice[0].getPriceUnchecked().expo);
|
||||
|
||||
// convert to scaled price
|
||||
let scaledPrice = price.div(new BN(10).pow(exponent));
|
||||
const scaledPrice = price.div(new BN(10).pow(exponent));
|
||||
|
||||
return scaledPrice.toString();
|
||||
} catch (error: any) {
|
||||
|
||||
Reference in New Issue
Block a user