Skip to content

Commit

Permalink
✨ Support parsing path param in /getapp universal link (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Jun 28, 2023
1 parent 0998f4a commit f53080f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@
<data
android:host="liker.land"
android:scheme="https"
android:pathPattern="/.*/getapp" />
android:pathPattern="/.*/getapp/.*" />
<data
android:host="rinkeby.liker.land"
android:scheme="https"
android:pathPrefix="/getapp" />
<data
android:host="rinkeby.liker.land"
android:scheme="https"
android:pathPattern="/.*/getapp" />
android:pathPattern="/.*/getapp/.*" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
Expand Down
8 changes: 6 additions & 2 deletions app/models/deep-link-handle-store/deep-link-handle-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,13 @@ const BaseModel = types
}
} else if (url.includes('liker.land') && url.includes('/getapp')) {
const parsed = new URL(url);
if (parsed.searchParams.get('action') === 'wc') {
// WC 2.0 universal link
// https://liker.land/getapp/wc?uri=wc%3Ab111....
if (parsed.pathname.includes('/getapp/wc') || parsed.searchParams.get('action') === 'wc') {
const walletConnectURI = parsed.searchParams.get('uri')
yield self.walletConnectStore.handleNewSessionRequest(walletConnectURI, { isMobile: true })
if (walletConnectURI) {
yield self.walletConnectStore.handleNewSessionRequest(walletConnectURI, { isMobile: true })
}
}
} else {
self.navigationStore.dispatch({
Expand Down

0 comments on commit f53080f

Please sign in to comment.