Skip to content

Commit

Permalink
Add support for deeplinking return.edge.app
Browse files Browse the repository at this point in the history
  • Loading branch information
paullinator committed Sep 30, 2024
1 parent d618848 commit 5a5619d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<data android:scheme="https" />
<data android:host="deep.edge.app" />
<data android:host="dl.edge.app" />
<data android:host="return.edge.app" />
</intent-filter>
<intent-filter android:label="Edge Deep Links">
<action android:name="android.intent.action.VIEW" />
Expand Down
1 change: 1 addition & 0 deletions ios/edge/edge.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:dl.edge.app</string>
<string>applinks:return.edge.app</string>
<string>applinks:deep.edge.app</string>
</array>
</dict>
Expand Down
24 changes: 24 additions & 0 deletions src/__tests__/DeepLink.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ describe('parseDeepLink', function () {
'https://deep.edge.app/edge/1234567890a': {
type: 'edgeLogin',
lobbyId: '1234567890a'
},
'https://return.edge.app/edge/1234567890a': {
type: 'edgeLogin',
lobbyId: '1234567890a'
}
})

Expand Down Expand Up @@ -226,6 +230,26 @@ describe('parseDeepLink', function () {
}
})
})
describe('fiatProvider', function () {
makeLinkTests({
'https://deep.edge.app/fiatprovider/buy/moonpay?param=alice': {
type: 'fiatProvider',
providerId: 'moonpay',
direction: 'buy',
path: '',
query: { param: 'alice' },
uri: 'edge://fiatprovider/buy/moonpay?param=alice'
},
'https://return.edge.app/fiatprovider/buy/moonpay?param=alice': {
type: 'fiatProvider',
providerId: 'moonpay',
direction: 'buy',
path: '',
query: { param: 'alice' },
uri: 'edge://fiatprovider/buy/moonpay?param=alice'
}
})
})

describe('promotion', function () {
makeLinkTests({
Expand Down
1 change: 1 addition & 0 deletions src/types/DeepLinkTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* - edge://<type>/...
* - airbitz://<type>/...
* - https://deep.edge.app/<type>/...
* - https://dp.edge.app/<type>/...
*
* The `edge://` protocol supports the following link types:
*
Expand Down
1 change: 1 addition & 0 deletions src/util/DeepLinkParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ const prefixes: Array<[string, string]> = [

// Alternative schemes:
['https://deep.edge.app/', 'edge://'],
['https://return.edge.app/', 'edge://'],
['airbitz://', 'edge://'],
['reqaddr://', 'edge://reqaddr']
]

0 comments on commit 5a5619d

Please sign in to comment.