瀏覽代碼

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

Co-Authored-By: Connor Prussin <connor@dourolabs.xyz>
Devin AI 9 月之前
父節點
當前提交
95cd09d908
共有 1 個文件被更改,包括 3 次插入5 次删除
  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")));
   }
 
   /**