From b9a803983867db616845b9c94f130fe8e0efe350 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 22:50:35 +0000 Subject: [PATCH] style: fix prettier formatting issues Co-Authored-By: Jayant Krishnamurthy --- .../client/js/src/PriceServiceConnection.ts | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/price_service/client/js/src/PriceServiceConnection.ts b/price_service/client/js/src/PriceServiceConnection.ts index d3fa32212..9db18cf6b 100644 --- a/price_service/client/js/src/PriceServiceConnection.ts +++ b/price_service/client/js/src/PriceServiceConnection.ts @@ -165,7 +165,9 @@ export class PriceServiceConnection { // Include VAA if binary flag is set if (this.priceFeedRequestConfig.binary && response.data.binary?.data) { - const vaaIndex = response.data.parsed.findIndex((p: any) => p.id === item.id); + const vaaIndex = response.data.parsed.findIndex( + (p: any) => p.id === item.id + ); if (vaaIndex >= 0 && vaaIndex < response.data.binary.data.length) { priceFeedJson.vaa = response.data.binary.data[vaaIndex]; } @@ -208,7 +210,10 @@ export class PriceServiceConnection { }); // Extract VAAs from binary data array - if (!response.data.binary?.data || !Array.isArray(response.data.binary.data)) { + if ( + !response.data.binary?.data || + !Array.isArray(response.data.binary.data) + ) { return []; } @@ -245,7 +250,9 @@ export class PriceServiceConnection { // Extract VAA and publishTime from response if (!response.data.binary?.data?.[0] || !response.data.parsed?.[0]) { - throw new Error("No VAA data found for the given price id and publish time"); + throw new Error( + "No VAA data found for the given price id and publish time" + ); } const vaa = response.data.binary.data[0]; @@ -287,7 +294,9 @@ export class PriceServiceConnection { // Extract price feed from response if (!response.data.parsed?.[0]) { - throw new Error("No price feed data found for the given price id and publish time"); + throw new Error( + "No price feed data found for the given price id and publish time" + ); } const priceFeedJson: any = { @@ -297,7 +306,10 @@ export class PriceServiceConnection { }; // Include metadata if verbose flag is set - if (this.priceFeedRequestConfig.verbose && response.data.parsed[0].metadata) { + if ( + this.priceFeedRequestConfig.verbose && + response.data.parsed[0].metadata + ) { priceFeedJson.metadata = response.data.parsed[0].metadata; }