Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Bring back namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbo committed Nov 7, 2024
1 parent 80a8871 commit 7d39c12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions utils/__tests__/externalUrls.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ describe('walletConnectDeepLinkUrl', () => {
const input =
'wc:96c935c09bfae76a83d65747651a7e0c77592e3b7aeff8556bc91e9363a86689@2?expiryTimestamp=1728294685&relay-protocol=irn&symKey=8ba498cb98560cb940584b50450e77fe8699c29a5ecf28cbad7ee2f215685815'
const expectedOutput =
'io.universaleverything.universalprofiles:96c935c09bfae76a83d65747651a7e0c77592e3b7aeff8556bc91e9363a86689@2?expiryTimestamp=1728294685&relay-protocol=irn&symKey=8ba498cb98560cb940584b50450e77fe8699c29a5ecf28cbad7ee2f215685815'
'io.universaleverything.universalprofiles://wallet-connect/96c935c09bfae76a83d65747651a7e0c77592e3b7aeff8556bc91e9363a86689@2?expiryTimestamp=1728294685&relay-protocol=irn&symKey=8ba498cb98560cb940584b50450e77fe8699c29a5ecf28cbad7ee2f215685815'
expect(walletConnectDeepLinkUrl(input)).toBe(expectedOutput)
})

test('should produce proper deep link with redirect URL', () => {
const input =
'wc:96c935c09bfae76a83d65747651a7e0c77592e3b7aeff8556bc91e9363a86689@2?expiryTimestamp=1728294685&relay-protocol=irn&symKey=8ba498cb98560cb940584b50450e77fe8699c29a5ecf28cbad7ee2f215685815'
const expectedOutput =
'io.universaleverything.universalprofiles:96c935c09bfae76a83d65747651a7e0c77592e3b7aeff8556bc91e9363a86689@2?expiryTimestamp=1728294685&relay-protocol=irn&symKey=8ba498cb98560cb940584b50450e77fe8699c29a5ecf28cbad7ee2f215685815&redirectUrl=http://localhost:3000/'
'io.universaleverything.universalprofiles://wallet-connect/96c935c09bfae76a83d65747651a7e0c77592e3b7aeff8556bc91e9363a86689@2?expiryTimestamp=1728294685&relay-protocol=irn&symKey=8ba498cb98560cb940584b50450e77fe8699c29a5ecf28cbad7ee2f215685815&redirectUrl=http://localhost:3000/'
expect(walletConnectDeepLinkUrl(input, { withRedirectUrl: true })).toBe(
expectedOutput
)
Expand Down
2 changes: 1 addition & 1 deletion utils/externalUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export const walletConnectDeepLinkUrl = (
redirectQueryParam = `&redirectUrl=${redirectUrl}`
}

const deepLink = `${MOBILE_APP_DEEP_LINK_PREFIX}:${urlData.pathname}${urlData.search}${redirectQueryParam}`
const deepLink = `${MOBILE_APP_DEEP_LINK_PREFIX}://wallet-connect/${urlData.pathname}${urlData.search}${redirectQueryParam}`

if (genericLog.enabled) {
genericLog(`Mobile App link: ${deepLink}`)
Expand Down

0 comments on commit 7d39c12

Please sign in to comment.