Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tg mini apps support #5403

Merged
merged 15 commits into from
Oct 1, 2024
Merged

feat: tg mini apps support #5403

merged 15 commits into from
Oct 1, 2024

Conversation

ganchoradkov
Copy link
Member

@ganchoradkov ganchoradkov commented Sep 30, 2024

Description

Fixed deep links when in telegram mini apps context

  • base64 payload encoding when targetted to https://t.me universal links
  • formatUriFromPairing util to regenerate pairing uri from pairing to be used as deeplink
  • parseUri util to handle incoming pairing uris in base64 encoding
  • updated @walletconnect/modal to latest

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Draft PR (breaking/non-breaking change which needs more work for having a proper functionality [Mark this PR as ready to review only when completely ready])
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

in telegram mini apps
https://walletconnect.slack.com/archives/C04DB2EAHE3/p1726817747215279
2.16.3-rc-tma-1

Checklist

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Additional Information (Optional)

Please include any additional information that may be useful for the reviewer.

@arein arein added the accepted label Sep 30, 2024
@ganchoradkov ganchoradkov changed the title feat: mini apps feat: tg mini apps support Sep 30, 2024
Copy link
Contributor

@Cali93 Cali93 left a comment

Choose a reason for hiding this comment

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

LGTM left minor comments

packages/utils/src/misc.ts Outdated Show resolved Hide resolved
packages/utils/src/misc.ts Outdated Show resolved Hide resolved
@@ -17,6 +18,13 @@ export function parseRelayParams(params: any, delimiter = "-"): RelayerTypes.Pro
}

export function parseUri(str: string): EngineTypes.UriParameters {
if (!str.includes("wc:")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Super nit and not sure if it suits this use case but assuming the str always starts with wc://... you could also use the URL constructor here and check if the protocol is wc:

@ganchoradkov ganchoradkov merged commit d1b95c3 into v2.0 Oct 1, 2024
9 checks passed
@ganchoradkov ganchoradkov deleted the feat/tma branch October 1, 2024 07:12
@ganchoradkov ganchoradkov mentioned this pull request Oct 1, 2024
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants