Skip to content

feat(wallet): show transaction commands in activity#13

Draft
nicosampler wants to merge 2 commits into
mainfrom
feat/wallet-activity-commands
Draft

feat(wallet): show transaction commands in activity#13
nicosampler wants to merge 2 commits into
mainfrom
feat/wallet-activity-commands

Conversation

@nicosampler
Copy link
Copy Markdown
Collaborator

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

  • Store preparedTransaction and original commands in executed transaction records.
  • Render a Command payload JSON block in expanded Activity rows.
  • Add focused tests for Activity rendering and transaction history recording.

Acceptance criteria

  • Executed transaction history retains commands.
  • Executed transaction history retains preparedTransaction.
  • Activity details show the stored command payload.

Test plan

Automated tests

  • npm --prefix carpincho-wallet run lint
  • npm --prefix carpincho-wallet test
  • npm --prefix carpincho-wallet run build

Manual verification

  • Not run; covered by component and source-level tests.

Breaking changes

None.

Checklist

  • Self-reviewed my own diff
  • Tests added or updated
  • Docs updated (if applicable)
  • No unrelated changes bundled in

Screenshots

None.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
carpincho-wallet Ready Ready Preview, Comment May 29, 2026 12:35am

Request Review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 preparedTransaction and original commands into executed TransactionRecords.
  • 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),
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.

3 participants