feat(wallet): show transaction commands in activity#13
Draft
nicosampler wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds richer transaction history/audit data to the wallet so Activity can display the original dApp command payload behind an executed Canton transaction, while also persisting the prepared transaction bytes for later inspection/debugging.
Changes:
- Persist
preparedTransactionand originalcommandsinto executedTransactionRecords. - Render an expandable “Command payload” JSON block in Activity details.
- Add targeted tests for both transaction history recording and Activity UI rendering.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| carpincho-wallet/src/views/HomeView.tsx | Extends recorded executed-transaction history to include prepared transaction bytes and original command payload. |
| carpincho-wallet/src/vault/types.ts | Adds optional preparedTransaction and commands fields to the persisted transaction record type. |
| carpincho-wallet/src/components/ActivityList.tsx | Displays stored command payload JSON in expanded Activity rows. |
| carpincho-wallet/src/utils/json.ts | Introduces a small JSON pretty-printer helper for audit display. |
| carpincho-wallet/test/views/HomeView.test.ts | Verifies executed transaction recording includes the new persisted fields. |
| carpincho-wallet/test/components/ActivityList.test.tsx | Verifies Activity expands to show the stored command payload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+19
to
22
| // Keeps the Activity row label aligned with the public wallet API name users recognize. | ||
| const txMethodLabel = (method: string): string => | ||
| method === CANTON_METHOD_PREPARE_EXECUTE_AND_WAIT ? 'executeAndWait' : method | ||
|
|
Comment on lines
440
to
+444
| method: pendingExecute.method, | ||
| status: 'executed', | ||
| preparedTransaction: prepared.preparedTransaction, | ||
| preparedTransactionHash: prepared.preparedTransactionHash, | ||
| commands: transactionCommands(pendingExecute.params), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
No related issue.
Persist transaction command payloads and prepared transaction bytes so wallet Activity can show the readable dApp command data behind an executed transaction.
Changes
preparedTransactionand originalcommandsin executed transaction records.Command payloadJSON block in expanded Activity rows.Acceptance criteria
commands.preparedTransaction.Test plan
Automated tests
npm --prefix carpincho-wallet run lintnpm --prefix carpincho-wallet testnpm --prefix carpincho-wallet run buildManual verification
Breaking changes
None.
Checklist
Screenshots
None.