Skip to content

fix: sign transaction and sign auth entry layout - #172

Merged
stanleyyconsensys merged 1 commit into
mainfrom
fix/sign-txn
Aug 1, 2026
Merged

fix: sign transaction and sign auth entry layout#172
stanleyyconsensys merged 1 commit into
mainfrom
fix/sign-txn

Conversation

@stanleyyconsensys

@stanleyyconsensys stanleyyconsensys commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Explanation

This PR fix the contract address and argument display in sign transaction and sign auth entry dialog

Sign Transaction
image

Sign Auth Entry
image

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

| 'boolean'
| 'json';
| 'json'
| 'copyable';

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

add new type for UI to recognize and display copyable text

{translate('confirmation.signAuthEntry.contract')}
</SnapText>
<Address address={`${scope}:${contractAddress}`} truncate />
<Copyable value={contractAddress} />

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Address field is trimmed, for visibility use Copyable

@stanleyyconsensys stanleyyconsensys changed the title fix: sign txn and auth entry layout fix: sign transaction and sign auth entry layout Jul 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves Soroban signing confirmations in the Snap by decoding contract identifiers/arguments into human-readable strings and adjusting the confirmation UI layout to better handle long values (addresses, i128/u128, etc.), with copy-to-clipboard support.

Changes:

  • Added shared XDR helpers to decode ScAddress, contract function names, and ScVal arguments into readable display strings (with base64 fallback).
  • Updated operation/auth-entry mapping and confirmation UIs to render contract addresses and arguments in a copyable, labeled layout.
  • Updated i18n strings and expanded test coverage for the new decoding and mapping behavior.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/snap/src/ui/confirmation/views/ConfirmSignTransaction/ConfirmSignTransaction.tsx Renders JSON/argument arrays as labeled, Copyable rows and adds a copyable param type.
packages/snap/src/ui/confirmation/views/ConfirmSignAuthEntry/ConfirmSignAuthEntry.tsx Switches contract/args display to a vertical layout with labeled, Copyable argument rows.
packages/snap/src/services/transaction/xdrParser.ts Adds getAddress, getFunctionName, and readable ScVal decoding helpers used across the codebase.
packages/snap/src/services/transaction/xdrParser.test.ts Adds tests for the new XDR decoding helpers and fallback behavior.
packages/snap/src/services/transaction/OperationMapper.ts Uses new XDR helpers; maps contract address as copyable and arguments as readable strings.
packages/snap/src/services/transaction/OperationMapper.test.ts Updates/extends mapping expectations for contract address + readable arguments.
packages/snap/src/services/network/NetworkService.ts Reuses getAddress for contract address decoding.
packages/snap/src/handlers/keyring/signAuthEntry.ts Reuses new XDR helpers for readable invocation summaries (function name, args, contract address).
packages/snap/src/handlers/keyring/signAuthEntry.test.ts Updates expected readable args (now plain display strings).
packages/snap/messages.json Updates labels (“Contract Address”) and adds per-argument label strings.
packages/snap/locales/es.json Aligns locale metadata and updated/added strings with the new labels.
packages/snap/locales/en.json Updates/adds strings for the new labels and per-argument rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/snap/src/services/transaction/xdrParser.ts
@stanleyyconsensys
stanleyyconsensys merged commit fbb8967 into main Aug 1, 2026
11 checks passed
@stanleyyconsensys
stanleyyconsensys deleted the fix/sign-txn branch August 1, 2026 06:12
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.

4 participants