Skip to content

Conversation

@ffmcgee725
Copy link
Member

@ffmcgee725 ffmcgee725 commented Oct 8, 2025

Description

The goal of this PR is to use deeplink compression logic to decrease size of transported payloads across established connections.

Checklist

  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves https://www.notion.so/metamask-consensys/SDK-Phase-1-End-game-276f86d67d688061a461ee0cbaf37649?p=278f86d67d6880c0a460f671085afbea&pm=s


Note

Switch QR code to a compressed deep link and URI-encode the compressed payload parameter.

  • Frontend (apps/web-demo/src/components/MetaMaskMobileDemo.tsx):
    • Deep link generation:
      • URI-encode the compressed payload: compressString(jsonPayload) -> encodeURIComponent(compressString(jsonPayload)).
      • Use the compressed deep link (metamask://connect/mwp?p=...&c=1) for the QR code instead of the standard link.

Written by Cursor Bugbot for commit 677bcbc. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

console.log("Compressed deep link length:", compressedDeepLinkUrl.length);

setQrCodeData(deepLinkUrl);
setQrCodeData(compressedDeepLinkUrl);
Copy link

Choose a reason for hiding this comment

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

Bug: QR Code Log Message Incorrect

The log message for QR code generation at line 252 incorrectly states that a "base64 encoded deep link" is used. The QR code is now generated with a compressed deep link, making the current log message misleading.

Fix in Cursor Fix in Web

Copy link
Collaborator

@chakra-guy chakra-guy left a comment

Choose a reason for hiding this comment

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

LGTM

@ffmcgee725 ffmcgee725 merged commit bfb50c3 into main Oct 8, 2025
12 checks passed
@ffmcgee725 ffmcgee725 deleted the jc/pako-compression branch October 8, 2025 14:09
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