Skip to content

Conversation

@brendan-defi
Copy link
Collaborator

@brendan-defi brendan-defi commented Oct 31, 2025

Summary

  • Added a util prolinkToUniversalLink
    • two parameters: prolink and environment
    • returns a deeplink with the prolink as a query param and the appropriate domain based on the environment
  • added the universal link / deeplink functionality to playground

How did you test your changes?

  • unit tests

When a prolink is generated on playground...
image

...a corresponding "link with prolink" result is created (defaulted to base-app link).
image

We also demonstrate the ability to customize the link URL in a top-level "Link with Prolink" tab:
image

@linear
Copy link

linear bot commented Oct 31, 2025

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Oct 31, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 2/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@brendan-defi
Copy link
Collaborator Author

feedback:

  • name is currently "specific", but the functionality is pretty generic. make the name and functionality have the same level of specificity
  • don't need env parameter
  • allow for arbitrary urls, not just base-app
  • modify the return value to be object, object for now will only have the deeplink string, will allow for a display func in the future

@brendan-defi brendan-defi requested a review from cb-jake October 31, 2025 17:11
Copy link
Collaborator

@spencerstock spencerstock left a comment

Choose a reason for hiding this comment

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

Could you post a screenshot of how the playground looks with these changes?

Looking great, couple comments to consider

* Create a link with an encoded prolink query parameter and additional query parameters
*
* @param prolink - Base64url-encoded prolink payload
* @param baseUrl - Base URL to use for the link, defaults to https://base.app/base-pay
Copy link
Collaborator

Choose a reason for hiding this comment

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

'baseUrl' is proper but feels overloaded because we are 'base' - is there a closeby synonym we can use like 'prefixUrl'?

Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe just url? its scoped to the function so likely need a prefix

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated to url

* @param prolink - Base64url-encoded prolink payload
* @param baseUrl - Base URL to use for the link, defaults to https://base.app/base-pay
* @param additionalQueryParams - Additional query parameters to add to the link
* @returns { link: string } - Object containing the full link
Copy link
Collaborator

Choose a reason for hiding this comment

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

preference for returning the string directly - let me know if you have thoughts in the other direction

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks for the reminder here, updated to return a string

@brendan-defi brendan-defi changed the title [BA-3103] Utility for converting a prolink to a base app deeplink [BA-3103] Utility for creating a link (deeplink, universal link, standard link) with a prolink Nov 3, 2025
@brendan-defi brendan-defi marked this pull request as ready for review November 3, 2025 07:09
* @param prolink - Base64url-encoded prolink payload
* @param url - URL to use for the link, defaults to https://base.app/base-pay
* @param additionalQueryParams - Additional query parameters to add to the link
* @returns { link: string } - Object containing the full link
Copy link
Collaborator

@spencerstock spencerstock Nov 3, 2025

Choose a reason for hiding this comment

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

nit: update the docstring and usage example

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ugh I'm sorry for the oversight. thank you for catching 🙇

Copy link
Collaborator

@spencerstock spencerstock left a comment

Choose a reason for hiding this comment

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

LGTM!

@brendan-defi brendan-defi merged commit a4f9ff4 into master Nov 5, 2025
9 checks passed
@brendan-defi brendan-defi deleted the bf/prolink-to-base-deeplink branch November 5, 2025 22:10
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.

5 participants