Selaa lähdekoodia

fix: use price-service-sdk instead of price-service-client

Co-Authored-By: Connor Prussin <connor@dourolabs.xyz>
Devin AI 9 kuukautta sitten
vanhempi
sitoutus
95cd09d908
1 muutettua tiedostoa jossa 3 lisäystä ja 5 poistoa
  1. 3 5
      target_chains/aptos/sdk/js/src/AptosPriceServiceConnection.ts

+ 3 - 5
target_chains/aptos/sdk/js/src/AptosPriceServiceConnection.ts

@@ -16,11 +16,9 @@ export class AptosPriceServiceConnection extends PriceServiceConnection {
    */
   async getPriceFeedsUpdateData(priceIds: HexString[]): Promise<number[][]> {
     // Fetch the latest price feeds from the price service
-    const priceFeeds: PriceFeed[] = await this.getLatestPriceFeeds(priceIds);
-    return priceFeeds
-      .map((feed: PriceFeed) => feed.getVAA())
-      .filter((vaa: string | undefined): vaa is string => vaa !== undefined)
-      .map((vaa: string) => Array.from(Buffer.from(vaa, "base64")));
+    // Use getLatestVaas directly since we only need the VAAs
+    const vaas = await this.getLatestVaas(priceIds);
+    return vaas.map((vaa: string) => Array.from(Buffer.from(vaa, "base64")));
   }
 
   /**