test: wallet utils Jira tests - #571
Conversation
BREAKING CHANGE: v10 beta release --------- Co-authored-by: David Rojas <lempira@gmail.com> Co-authored-by: Hoang Dinh <patrick.dinh@makerx.com.au> Co-authored-by: Neil Campbell <neil.campbell@makerx.com.au> Co-authored-by: David Rojas <lempira@users.noreply.github.com> Co-authored-by: Al <7698600+aorumbayev@users.noreply.github.com> Co-authored-by: Luca Martini <luca.martini@algorand.foundation> Co-authored-by: mrcointreau <45950216+mrcointreau@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…e-link docs: fix broken api reference link
There was a problem hiding this comment.
Pull request overview
Adds a new “wallet utils” polytest-derived Vitest suite to exercise HD wallet derivation, multisig flows, transaction review/signing/export, and staking/keyreg scenarios against LocalNet (and one MainNet block lookup).
Changes:
- Add new
tests/wallet_utils/*epic test suites plus shared helpers intests/wallet_utils/common.ts. - Add
@scure/bip39(dev dependency) to support BIP39 mnemonic generation/seed derivation used by the new tests. - Add
polytest:*wallet*npm scripts intended to generate/run the wallet polytests.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/wallet_utils/epic_ak_992.test.ts | Adds HD derivation + multisig + migration tests. |
| tests/wallet_utils/epic_ak_1000.test.ts | Adds view-only, balance aggregation, ASA/NFT balance tests. |
| tests/wallet_utils/epic_ak_1001.test.ts | Adds payment, grouped transactions, multisig payment, ASA/NFT send, ARC2 note, fee check tests. |
| tests/wallet_utils/epic_ak_1002.test.ts | Adds transaction review/sign/export + arbitrary data signing tests. |
| tests/wallet_utils/epic_ak_1003.test.ts | Adds staking/keyreg + rewards lookup + staking status classification tests. |
| tests/wallet_utils/common.ts | Introduces shared helper utilities for balance/HD derivation/asset lookups. |
| package.json | Adds wallet polytest scripts and @scure/bip39 devDependency. |
| package-lock.json | Locks @scure/bip39 and transitive dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const mainnet = AlgorandClient.mainNet() | ||
| const block = await mainnet.client.algod.block(round) |
There was a problem hiding this comment.
This test hits MainNet via AlgorandClient.mainNet() and fetches a real block. That makes the unit/integration test suite dependent on external network availability and third-party infrastructure (AlgoNode), which can cause CI flakiness. Consider moving this to a separate “network-required” test suite, or gating/skipping it unless an explicit env flag is set, and/or using a mocked algod response instead.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
f5402a9 to
90b1f7d
Compare
Based on algorandfoundation/algokit-polytest#26
Some notes:
@scure/bip39lib is being used for HD mnemonics. The plan is to add this directly into AlgoKit and generally expose all HD functionality through AlgoKit