Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add aptos bot tests #8598

Merged
merged 34 commits into from
Dec 30, 2024
Merged

Conversation

jccguimaraes
Copy link
Member

@jccguimaraes jccguimaraes commented Dec 4, 2024

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

📝 Description

Adds Speculos Bot tests for the Aptos blockchain

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

Copy link

vercel bot commented Dec 4, 2024

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

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Dec 30, 2024 0:02am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Dec 30, 2024 0:02am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Dec 30, 2024 0:02am
web-tools ⬜️ Ignored (Inspect) Visit Preview Dec 30, 2024 0:02am

@live-github-bot
Copy link
Contributor

live-github-bot bot commented Dec 4, 2024

Desktop Bundle Checks

Comparing 71d950b against 0e6ee7d.

⚠️ renderer bundle size significantly increased: 36.7mb -> 37.8mb. Please check if this is expected.

Mobile Bundle Checks

Comparing 71d950b against 0e6ee7d.

⚠️ main.ios.jsbundle bundle size significantly increased: 60.2mb -> 61.7mb. Please check if this is expected.
⚠️ main.android.jsbundle bundle size significantly increased: 60.3mb -> 61.7mb. Please check if this is expected.

@jccguimaraes jccguimaraes marked this pull request as ready for review December 4, 2024 15:50
@jccguimaraes jccguimaraes requested review from a team as code owners December 4, 2024 15:50
Copy link

github-actions bot commented Dec 6, 2024

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 6ms

What is the bot and how does it work? Everything is documented here!

Details of the 0 mutations
Portfolio ($0.00) – Details of the 0 currencies
Spec (accounts) State Remaining Runs (est) funds?

Performance ⏲ 6ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

1 similar comment
Copy link

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 6ms

What is the bot and how does it work? Everything is documented here!

Details of the 0 mutations
Portfolio ($0.00) – Details of the 0 currencies
Spec (accounts) State Remaining Runs (est) funds?

Performance ⏲ 6ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Copy link

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 6ms

What is the bot and how does it work? Everything is documented here!

Details of the 0 mutations
Portfolio ($0.00) – Details of the 0 currencies
Spec (accounts) State Remaining Runs (est) funds?

Performance ⏲ 6ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Copy link

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 5ms

What is the bot and how does it work? Everything is documented here!

Details of the 0 mutations
Portfolio ($0.00) – Details of the 0 currencies
Spec (accounts) State Remaining Runs (est) funds?

Performance ⏲ 5ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Copy link

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 6ms

What is the bot and how does it work? Everything is documented here!

Details of the 0 mutations
Portfolio ($0.00) – Details of the 0 currencies
Spec (accounts) State Remaining Runs (est) funds?

Performance ⏲ 6ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

@live-github-bot live-github-bot bot added the ledgerjs Has changes in the ledgerjs open source libs label Dec 13, 2024
Copy link

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 5ms

What is the bot and how does it work? Everything is documented here!

Details of the 0 mutations
Portfolio ($0.00) – Details of the 0 currencies
Spec (accounts) State Remaining Runs (est) funds?

Performance ⏲ 5ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Copy link

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 22.8s

What is the bot and how does it work? Everything is documented here!

1 critical spec errors

Spec injective failed!

Error: "Error during injective synchronization: "API HTTP 429 https://injective-api.polkachu.com/cosmos/staking/v1beta1/delegations/inj1vzjwweta3hegt99vfgrvmcq7rr5532yjsgxd4a
Details of the 0 mutations

Spec injective (failed)


Details of the 6 uncovered mutations

Spec injective (6)

  • send some:
  • send max:
  • delegate new validators:
  • undelegate:
  • redelegate:
  • claim rewards:
Portfolio ($0.00) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
injective (0) 0 ops , 🤷‍♂️ ``

Performance ⏲ 22.8s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 404ms N/A N/A N/A N/A N/A N/A N/A
injective (0) 404ms N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Copy link

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 1474ms

What is the bot and how does it work? Everything is documented here!

1 critical spec errors

Spec Aptos failed!

Error: speculos process failure. vnc_server: readall: connection closed

Details of the 0 mutations

Spec Aptos (failed)


Details of the 1 uncovered mutations

Spec Aptos (1)

  • Send ~50%:
Portfolio ($0.00) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
Aptos (0) 0 ops , 🤷‍♂️ ``

Performance ⏲ 1474ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A
Aptos (0) N/A N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Copy link

[Bot] Testing with 'Nitrogen' ($0.00) ⏲ 1533ms

What is the bot and how does it work? Everything is documented here!

1 critical spec errors

Spec Aptos failed!

Error: speculos process failure. vnc_server: readall: connection closed

Details of the 0 mutations

Spec Aptos (failed)


Details of the 1 uncovered mutations

Spec Aptos (1)

  • Send ~50%:
Portfolio ($0.00) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
Aptos (0) 0 ops , 🤷‍♂️ ``

Performance ⏲ 1533ms

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL N/A N/A N/A N/A N/A N/A N/A N/A
Aptos (0) N/A N/A N/A N/A N/A N/A N/A N/A

What is the bot and how does it work? Everything is documented here!

Copy link
Member

@hedi-edelbloute hedi-edelbloute left a comment

Choose a reason for hiding this comment

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

Bot issue looks not related to the pull request itself, maybe on nano app side

@jccguimaraes jccguimaraes merged commit 25061bb into feat/integrate-aptos Dec 30, 2024
48 of 50 checks passed
@jccguimaraes jccguimaraes deleted the feat/live-14004_bot_tests branch December 30, 2024 12:36
semeano added a commit that referenced this pull request Jan 3, 2025
* WIP: ledger-live boilerplate
* Add currency
* Add JS Bindings
* Add 'getAddress'
* TODO: Accounts, Send

* Implement base functionality for aptos
* Accounts synchronization
* Recieve
* Send
TODO:
* Implement additional settings for token sending

* Add transaction configuration
* Gas fee (gas price, gas limit)
* Additional settings (sequence number, exp. timestamp)
* TODO: add texts to the dictionary

* Fix issues

* Update dictionary

* update `hw-app-aptos` package

* Rework transaction receiving
- Get transactions from the indexer by its version
- Get both transaction types Receive/Send
- Use Aptos API

* Fix dependencies

* LLD small fixes

* Implement Aptos in LLM

* Change transaction praparation, update operation signing

* Update `pnpm-lock.yaml` after merge with `develop`

* Calculate staked balance; display balance on account page

* Rename `xpub` field to `publicKey`

* Remove unused field

* Fix staked amount

* Fix delegation dictionary

* Move `compareAddress` helper from `utils` to `logic`

* Rename `delegatedBalance` to `delegatedAmount`

* Fix typo in dictionary

* Use mainnet

* Revert "Rename `xpub` field to `publicKey`"

This reverts commit 3e2d8d8.

* Handle the case when account's field `freshAddresses` is empty

* Get public key from account id if it can not be retrieved from the device

* Fix condition with xpub

* Implement `getStake` function to calculate stake rewards

* Use testnet endpoint if testnet selected

* Change transaction `function`; add value to `type_arguments`

* Fix bug with the `recepient` field

* Revert "Change transaction `function`; add value to `type_arguments`"

This reverts commit 00b2ab0.

* Remove redundant translations

* Add Aptos to CLI app

* Add changeset

* Fix linter and types problems

* Remove redundant dependency

* support/fix pnpm-lock.yaml after merge conflict

* support(aptos): update pnpm-lock.yaml after merge conflict

* feat(aptos): update transfer function

* fix rebase issues

* fix remaining getAccountUnit imports

* hw-app-aptos.js moved to lib/ledgerjs/packages/hw-app-aptos. Test file has been copied, but is still not active.

* Repurposed README.md from algorand. removed some unused dependencies from the package.

* Small cosmetic changes.

* Managed to make tests work.

* Aptos fixing: History isn't full (#8512)

extending tx to ops with delegation batches and events

* fix(aptos): amount balance (#8462)

* Removing Delegated Balance from the Aptos Footer.

* Prettify addition.

* Removing unecessary code.

* Removing uneeded imports

* Fixing prettier issues.

* Removing the footer and the translation units.

* feat(aptos): add coin feature flag (#8498)

* feat(aptos): add coin feature flag

* feat(aptos): add coin feature flag for testnet

* Removing fees from LLD

* Feedback from PR.

* Removed the custom fees from Ledger Live Mobile.

* Removed a few files that are not needed after the custom fees removal.

* fix(aptos): remove inexistent dependency (#8644)

* Removing unused imports.

* Feat/live 15120 aptos bst fix fees visibility for unparsed transaction (#8618)

* Implement generalised parsing of aptos transactions + logic unit tests

* feat(aptos): update aptos package (#8661)

* feat(aptos): replace deprecated aptos package

* feat(aptos): update aptos types

* chore: update aptos api

* feat(aptos): update aptos package

* feat(aptos): update aptos package

* fix(aptos): get network and indexer api url from network

* fix(aptos): account address issues

* refactor: set private methods

* refactor: build transaction module and api

* refactor: fix logic and constants

* fix: set aptos client with our url paths.

* test: fix imports from old package

* fix: payload type

* fix: logic code and tests

* [QAA] adding Aptos send test (#8450)

* test: adding aptos e2e send test

* feat(aptos): send test

* feat(aptos): uncomment previous tests

* Aptos fixing: History isn't full (#8512)

extending tx to ops with delegation batches and events

* fix(aptos): amount balance (#8462)

* Removing Delegated Balance from the Aptos Footer.

* Prettify addition.

* Removing unecessary code.

* Removing uneeded imports

* Fixing prettier issues.

* Removing the footer and the translation units.

* feat(aptos): add coin feature flag (#8498)

* feat(aptos): add coin feature flag

* feat(aptos): add coin feature flag for testnet

* hw-app-aptos.js moved to lib/ledgerjs/packages/hw-app-aptos. Test file has been copied, but is still not active.

* Repurposed README.md from algorand. removed some unused dependencies from the package.

* Small cosmetic changes.

* Managed to make tests work.

* Feedback from PR.

* chore: add xray ticket id

---------

Co-authored-by: Pedro Semeano <[email protected]>
Co-authored-by: Oleksii <[email protected]>
Co-authored-by: João Martins <[email protected]>
Co-authored-by: João Guimarães <[email protected]>
Co-authored-by: João Martins <[email protected]>

* Fix transaction parsing, after removing sender form aptos input argument (#8691)

* fix(aptos): add amount validation (#8481)

* test(aptos): Unit tests for Aptos API (#8693)

* chore: save work

* chore: save work

* test: index api

* Added a test file for the LedgerAccount based on Jest.

* Feat/live 15457 aptos send receive verify get max send balance logic (#8725)

Fix logic for getMaxSendBalance to use hardcoded values

* chore: update dependencies

* Removed additional settings from Ledger Live Desktop.

* fix merge issues

* feat: add aptos bot tests (#8598)

* feat: add aptos bot testing
---------

Co-authored-by: Samy RABAH-MONTAROU <[email protected]>

* feat(aptos): update node and indexer endpoints (#8773)

feat: update aptos endpoints

* test(aptos): bridge integration tests (#8721)

* test: bridge integration test for aptos

* test: bridge integration test for aptos working

* test: disabled flaky test

* test: create new snapshot

* docs: add comment to flaky test

* test: update to frozen accounts

* test: update to frozen accounts

* fix: remove commented import

* fix: change expireTimestamp to milliseconds

* fix: remove comments

* fix: remove testSignedOperation

* test: add burn address

* test: debugging ci via console log

* chore: remove console logs

* test: fix estimateMaxSpendable assertion

* fix: add missing import

* fix: add missing import

* fix: add burn address for aptos testnet

* fix: prettier rule

* fix: remove unused files

* fix: abandon addresses

* fix: dependencies

* fix: update burn address

* fix: resolver

* chore: undo changes to pnpm-lock file

* fix: imports

* Feat/live 15540 aptos send receive fix when send max is toggled on the amount sent is different in ll and device (#8763)

* Fix the transaction amount that is sent to the device for signing
* remove Gas buffer for maxGasAmount

* chore: save work

* wip generate transaction test

* test: add unit tests for generate transaction

* chore: save work

* test: unit tests for index api

---------

Co-authored-by: Vladyslav Belyokhin <[email protected]>
Co-authored-by: Vladyslav Belyokhin <[email protected]>
Co-authored-by: Vladyslav Makarian <[email protected]>
Co-authored-by: Hedi EDELBLOUTE <[email protected]>
Co-authored-by: João Martins <[email protected]>
Co-authored-by: Oleksii <[email protected]>
Co-authored-by: João Martins <[email protected]>
Co-authored-by: João Guimarães <[email protected]>
Co-authored-by: Victor <[email protected]>
Co-authored-by: João Guimarães <[email protected]>
Co-authored-by: Samy RABAH-MONTAROU <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli common Has changes in live-common desktop Has changes in LLD ledgerjs Has changes in the ledgerjs open source libs mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants