Skip to content

Commit 95cd09d

Browse files
fix: use price-service-sdk instead of price-service-client
Co-Authored-By: Connor Prussin <[email protected]>
1 parent 1e2db0d commit 95cd09d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

target_chains/aptos/sdk/js/src/AptosPriceServiceConnection.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ export class AptosPriceServiceConnection extends PriceServiceConnection {
1616
*/
1717
async getPriceFeedsUpdateData(priceIds: HexString[]): Promise<number[][]> {
1818
// Fetch the latest price feeds from the price service
19-
const priceFeeds: PriceFeed[] = await this.getLatestPriceFeeds(priceIds);
20-
return priceFeeds
21-
.map((feed: PriceFeed) => feed.getVAA())
22-
.filter((vaa: string | undefined): vaa is string => vaa !== undefined)
23-
.map((vaa: string) => Array.from(Buffer.from(vaa, "base64")));
19+
// Use getLatestVaas directly since we only need the VAAs
20+
const vaas = await this.getLatestVaas(priceIds);
21+
return vaas.map((vaa: string) => Array.from(Buffer.from(vaa, "base64")));
2422
}
2523

2624
/**

0 commit comments

Comments
 (0)