Skip to content

Conversation

cctdaniel
Copy link
Contributor

@cctdaniel cctdaniel commented May 6, 2025

Summary

Updated the Aptos client implementation to use the new @aptos-labs/ts-sdk instead of the deprecated aptos package, and simplified balance tracking by using the dedicated getAccountAPTAmount method.

Rationale

These changes are necessary to:

  1. Use the latest Aptos TypeScript SDK which offers improved functionality and better support
  2. Replace the complex manual balance tracking with the SDK's built-in method that automatically handles both Fungible Asset and Coin formats
  3. Ensure compatibility with upcoming Movement chain updates that follow Aptos SDK standards

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

The changes have been manually tested against both Movement and Aptos chains to ensure the balance tracker correctly fetches and displays token balances. Tests verified that the getAccountAPTAmount method correctly tracks balances regardless of which resource format is used by the chain.

@cctdaniel cctdaniel requested a review from a team as a code owner May 6, 2025 10:37
Copy link

vercel bot commented May 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 10:42am
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 10:42am
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 10:42am
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 10:42am
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 10:42am
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 10:42am

Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! can you remove the aptos dependency package before merging?

@cctdaniel
Copy link
Contributor Author

its still being used in the main price pusher package and im reluctant to replace it since its working for now

@cctdaniel cctdaniel merged commit f859a6f into main May 6, 2025
10 checks passed
@cctdaniel cctdaniel deleted the aptos-price-pusher-2 branch May 6, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants