Skip to content

Add dApp stellar_signAuthEntry#743

Merged
leofelix077 merged 70 commits intomainfrom
lf-dapp-sign-auth-entry
Mar 19, 2026
Merged

Add dApp stellar_signAuthEntry#743
leofelix077 merged 70 commits intomainfrom
lf-dapp-sign-auth-entry

Conversation

@leofelix077
Copy link
Copy Markdown
Collaborator

@leofelix077 leofelix077 commented Mar 3, 2026

Closes #717
Closes #742

Screen.Recording.2026-03-06.at.14.16.55.mov
Screen.Recording.2026-03-06.at.14.18.09.mov

Checklist

PR structure

  • This PR does not mix refactoring changes with feature changes (break it down into smaller PRs if not).
  • This PR has reasonably narrow scope (break it down into smaller PRs if not).
  • This PR includes relevant before and after screenshots/videos highlighting these changes.
  • I took the time to review my own PR.

Testing

  • These changes have been tested and confirmed to work as intended on Android.
  • These changes have been tested and confirmed to work as intended on iOS.
  • These changes have been tested and confirmed to work as intended on small iOS screens.
  • These changes have been tested and confirmed to work as intended on small Android screens.
  • I have tried to break these changes while extensively testing them.
  • This PR adds tests for the new functionality or fixes.

Release

  • This is not a breaking change.
  • This PR updates existing JSDocs when applicable.
  • This PR adds JSDocs to new functionalities.
  • I've checked with the product team if we should add metrics to these changes.
  • I've shared relevant before and after screenshots/videos highlighting these changes with the design team and they've approved the changes.

@leofelix077 leofelix077 self-assigned this Mar 3, 2026
Copilot AI review requested due to automatic review settings March 3, 2026 21:46
@leofelix077 leofelix077 added wip work in progress don't review yet Work in Progress / Draft PR / Code Review adjustments being worked on labels Mar 3, 2026
Comment thread mock-dapp/src/routes.ts Fixed
Copy link
Copy Markdown
Contributor

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 initial support for WalletConnect stellar_signAuthEntry (Soroban authorization entry signing) across the mobile app, including signing logic, UI display, analytics, and E2E/mock-dApp tooling to exercise the flow.

Changes:

  • Implement Soroban auth entry signing (signAuthEntry) and wire it into WalletConnect request approval flow.
  • Update WalletConnect request UI to display auth entry XDR, add i18n strings, and add analytics tracking for successful auth entry signing.
  • Add mock-dApp endpoint/client support and E2E flow + CI/workflow updates to run WalletConnect mock-dApp tests.

Reviewed changes

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

Show a summary per file
File Description
src/services/analytics/transactions.ts Adds trackSignedAuthEntry analytics tracker.
src/services/analytics/index.ts Exposes trackSignedAuthEntry via analytics instance/interface.
src/config/analyticsConfig.ts Adds SIGN_AUTH_ENTRY_SUCCESS event constant.
src/ducks/walletKit.ts Adds SIGN_AUTH_ENTRY RPC method + params type.
src/helpers/stellar.ts Implements signAuthEntry helper that signs SorobanAuthorizationEntry.
src/hooks/useGetActiveAccount.ts Exposes signAuthEntry bound to the active account key.
src/helpers/walletKitUtil.ts Handles stellar_signAuthEntry in approveSessionRequest (validation, signing, response, toast, analytics).
src/providers/WalletKitProvider.tsx Treats sign_auth_entry as non-transaction request; adds E2E-only origin-check bypass; wires signAuthEntry into request approval.
src/components/screens/WalletKit/DappRequestBottomSheetContent.tsx Updates request UI to support auth entry requests (title + content rendering).
src/components/screens/WalletKit/AuthEntryDisplay.tsx New component to render raw auth entry XDR in a scrollable view.
src/i18n/locales/en/translations.json Adds common.authEntry + WalletKit/dApp request strings for sign-auth-entry.
src/i18n/locales/pt/translations.json Adds Portuguese equivalents for new sign-auth-entry strings.
src/components/WalletConnectE2EHelper.tsx Adds UI/actions to request signAuthEntry from the mock-dApp server.
scripts/run-e2e-tests.sh Adds env plumbing + on-the-fly generation for E2E_TEST_SOROBAN_AUTH_ENTRY_XDR; broadens mock-dApp flow detection.
e2e/flows/walletconnect/SignAuthEntryMockDapp.yaml New Maestro flow covering the happy-path sign-auth-entry WalletConnect flow.
mock-dapp/src/walletconnect.ts Adds mock-dApp WalletConnect client method + namespace support for stellar_signAuthEntry.
mock-dapp/src/routes.ts Adds HTTP route to trigger stellar_signAuthEntry requests.
mock-dapp/package-lock.json Updates lockfile for added dependency.
tests/helpers/stellar.test.ts Adds unit tests validating signAuthEntry output and signature correctness.
tests/components/screens/SendScreen/screens/TransactionAmountScreen.test.tsx Updates mocks for useGetActiveAccount to include signAuthEntry.
tests/components/screens/SendScreen/screens/SendCollectibleReview.test.tsx Updates mocks for useGetActiveAccount to include signAuthEntry.
.github/workflows/ios-e2e.yml Enables mock-dApp WalletConnect flows (SignMessage + SignAuthEntry) in matrix.
.github/workflows/android-e2e.yml Enables mock-dApp WalletConnect flows (SignMessage + SignAuthEntry) in matrix.
Files not reviewed (1)
  • mock-dapp/package-lock.json: Language not supported

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

Comment thread src/providers/WalletKitProvider.tsx Outdated
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Mar 5, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​stellar/​stellar-base@​14.1.09810010093100
Addednpm/​express-rate-limit@​7.5.19910010094100

View full report

@leofelix077 leofelix077 requested a review from Copilot March 5, 2026 19:31
Copy link
Copy Markdown
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@leofelix077 leofelix077 changed the title [WIP] add v1 of sign auth entries Add dApp stellar_signAuthEntry Mar 6, 2026
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 49 out of 51 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • mock-dapp/package-lock.json: Language not supported

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

Comment thread src/components/screens/WalletKit/DappAuthEntryDisplay.tsx Outdated
Comment thread src/components/screens/WalletKit/DappAuthEntryDetails.tsx Outdated
Comment thread src/providers/WalletKitProvider.tsx
Comment thread src/hooks/useGetActiveAccount.ts
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 49 out of 51 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • mock-dapp/package-lock.json: Language not supported

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

Comment thread src/helpers/walletKitUtil.ts
Comment thread docs/walletconnect-rpc-methods.md Outdated
Comment thread src/helpers/walletKitUtil.ts
Comment thread src/components/screens/WalletKit/DappRequestBottomSheetContent.tsx
* @function handleCancelSecurityWarning
* @returns {void}
*/
const handleCancelSecurityWarning = useCallback(() => {
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.

@leofelix077 is this useCallback function wrapping removal intentional?

Copy link
Copy Markdown
Contributor

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

Copilot reviewed 51 out of 53 changed files in this pull request and generated 5 comments.

Files not reviewed (1)
  • mock-dapp/package-lock.json: Language not supported

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

Comment thread docs/walletconnect-rpc-methods.md Outdated
Comment thread src/providers/WalletKitProvider.tsx Outdated
Comment thread src/providers/WalletKitProvider.tsx Outdated
Comment thread src/providers/WalletKitProvider.tsx Outdated
Comment thread src/helpers/walletKitValidation.ts
@leofelix077 leofelix077 merged commit 273148c into main Mar 19, 2026
27 checks passed
@leofelix077 leofelix077 deleted the lf-dapp-sign-auth-entry branch March 19, 2026 20:08
@github-actions github-actions Bot mentioned this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix stellar custom namespaces E2E Tests [Mobile] Implement stellar_signAuthEntry using WC custom namespace

4 participants