Skip to content

Commit

Permalink
Merge pull request #10 from reown-com/update_univeral_links
Browse files Browse the repository at this point in the history
Update universal links
  • Loading branch information
jakubuid authored Sep 24, 2024
2 parents 9744d86 + 90c6a94 commit 5c4744d
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ internal class GetSampleWalletsUseCase(
"com.reown.sample.wallet.debug" to SampleWalletDebug,
"com.reown.sample.wallet.internal" to SampleWalletInternal,
"com.reown.sample.wallet" to SampleWalletRelease,
"com.walletconnect.web3wallet.rnsample.internal" to RNSampleWallet,
"com.walletconnect.web3wallet.rnsample.internal" to RNSampleWalletInternal,
"com.walletconnect.web3wallet.rnsample" to RNSampleWallet,
"com.walletconnect.flutterwallet" to FLSampleWallet,
"com.walletconnect.flutterwallet.internal" to FLSampleWalletInternal
)
Expand All @@ -39,7 +40,7 @@ private val SampleWalletDebug = Wallet(
mobileLink = "kotlin-web3wallet://",
playStore = null,
webAppLink = null,
linkMode = "https://dev.lab.web3modal.com/wallet_debug",
linkMode = "https://appkit-lab.reown.com/wallet_debug",
true
)

Expand All @@ -52,7 +53,7 @@ private val SampleWalletInternal = Wallet(
mobileLink = "kotlin-web3wallet://",
playStore = null,
webAppLink = null,
linkMode = "https://dev.lab.web3modal.com/wallet_internal",
linkMode = "https://appkit-lab.reown.com/wallet_internal",
true
)

Expand All @@ -65,11 +66,11 @@ private val SampleWalletRelease = Wallet(
mobileLink = "kotlin-web3wallet://",
playStore = null,
webAppLink = null,
linkMode = "https://dev.lab.web3modal.com/wallet_release",
linkMode = "https://appkit-lab.reown.com/wallet_release",
true
)

private val RNSampleWallet = Wallet(
private val RNSampleWalletInternal = Wallet(
id = "RNSampleWallet",
name = "RN Sample",
homePage = "https://walletconnect.com",
Expand All @@ -78,7 +79,20 @@ private val RNSampleWallet = Wallet(
mobileLink = "rn-web3wallet://",
playStore = null,
webAppLink = null,
linkMode = "https://lab.web3modal.com/rn_walletkit",
linkMode = "https://appkit-lab.reown.com/rn_walletkit_internal",
true
)

private val RNSampleWallet = Wallet(
id = "RNSampleWalletInternal",
name = "RN Sample Internal",
homePage = "https://walletconnect.com",
imageUrl = "https://raw.githubusercontent.com/WalletConnect/WalletConnectKotlinV2/develop/sample/wallet/src/main/res/drawable-xxxhdpi/wc_icon.png",
order = "5",
mobileLink = "rn-web3wallet://",
playStore = null,
webAppLink = null,
linkMode = "https://appkit-lab.reown.com/rn_walletkit",
true
)

Expand All @@ -87,11 +101,11 @@ private val FLSampleWallet = Wallet(
name = "FL Sample",
homePage = "https://walletconnect.com",
imageUrl = "https://raw.githubusercontent.com/WalletConnect/WalletConnectKotlinV2/develop/sample/wallet/src/main/res/drawable-xxxhdpi/wc_icon.png",
order = "5",
order = "6",
mobileLink = "wcflutterwallet://",
playStore = null,
webAppLink = null,
linkMode = "https://lab.web3modal.com/flutter_walletkit",
linkMode = "https://appkit-lab.reown.com/flutter_walletkit",
true
)

Expand All @@ -100,10 +114,10 @@ private val FLSampleWalletInternal = Wallet(
name = "FL Sample Internal",
homePage = "https://walletconnect.com",
imageUrl = "https://raw.githubusercontent.com/WalletConnect/WalletConnectKotlinV2/develop/sample/wallet/src/main/res/drawable-xxxhdpi/wc_icon.png",
order = "6",
order = "7",
mobileLink = "wcflutterwallet-internal://",
playStore = null,
webAppLink = null,
linkMode = "https://dev.lab.web3modal.com/flutter_walletkit_internal",
linkMode = "https://appkit-lab.reown.com/flutter_walletkit_internal",
true
)
6 changes: 3 additions & 3 deletions sample/dapp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ android {
buildTypes {
getByName("release") {
manifestPlaceholders["pathPrefix"] = "/dapp_release"
buildConfigField("String", "DAPP_APP_LINK", "\"https://dev.lab.web3modal.com/dapp_release\"")
buildConfigField("String", "DAPP_APP_LINK", "\"https://appkit-lab.reown.com/dapp_release\"")
}

getByName("internal") {
manifestPlaceholders["pathPrefix"] = "/dapp_internal"
buildConfigField("String", "DAPP_APP_LINK", "\"https://dev.lab.web3modal.com/dapp_internal\"")
buildConfigField("String", "DAPP_APP_LINK", "\"https://appkit-lab.reown.com/dapp_internal\"")

}

getByName("debug") {
manifestPlaceholders["pathPrefix"] = "/dapp_debug"
buildConfigField("String", "DAPP_APP_LINK", "\"https://dev.lab.web3modal.com/dapp_debug\"")
buildConfigField("String", "DAPP_APP_LINK", "\"https://appkit-lab.reown.com/dapp_debug\"")
}
}

Expand Down
2 changes: 1 addition & 1 deletion sample/dapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="dev.lab.web3modal.com"
android:host="appkit-lab.reown.com"
android:scheme="https"
android:pathPrefix="${pathPrefix}"/>
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DappSampleApp : Application() {
val appMetaData = Core.Model.AppMetaData(
name = "Kotlin Dapp",
description = "Kotlin Dapp Implementation",
url = "https://dev.lab.web3modal.com",
url = "https://appkit-lab.reown.com",
icons = listOf("https://gblobscdn.gitbook.com/spaces%2F-LJJeCjcLrr53DcT1Ml7%2Favatar.png?alt=media"),
redirect = "kotlin-dapp-wc://request",
appLink = BuildConfig.DAPP_APP_LINK,
Expand All @@ -44,7 +44,7 @@ class DappSampleApp : Application() {
}

AppKit.setChains(AppKitChainsPresets.ethChains.values.toList())
//

// val authParams = Modal.Model.AuthPayloadParams(
// chains = AppKitChainsPresets.ethChains.values.toList().map { it.id },
// domain = "sample.kotlin.modal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ private fun ChainSelectionScreen(
text = "1-CA Link Mode (Kotlin Sample Wallet)",
onClick = {
val applink = when {
context.packageManager.isPackageInstalled(SAMPLE_WALLET_DEBUG_PACKAGE) -> "https://dev.lab.web3modal.com/wallet_debug"
context.packageManager.isPackageInstalled(SAMPLE_WALLET_INTERNAL_PACKAGE) -> "https://dev.lab.web3modal.com/wallet_internal"
context.packageManager.isPackageInstalled(SAMPLE_WALLET_RELEASE_PACKAGE) -> "https://dev.lab.web3modal.com/wallet_release"
context.packageManager.isPackageInstalled(SAMPLE_WALLET_DEBUG_PACKAGE) -> "https://appkit-lab.reown.com/wallet_debug"
context.packageManager.isPackageInstalled(SAMPLE_WALLET_INTERNAL_PACKAGE) -> "https://appkit-lab.reown.com/wallet_internal"
context.packageManager.isPackageInstalled(SAMPLE_WALLET_RELEASE_PACKAGE) -> "https://appkit-lab.reown.com/wallet_release"
else -> ""
}
onAuthenticateLinkMode(applink)
Expand Down
6 changes: 3 additions & 3 deletions sample/modal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ android {
buildTypes {
getByName("release") {
manifestPlaceholders["pathPrefix"] = "/lab_release"
buildConfigField("String", "LAB_APP_LINK", "\"https://dev.lab.web3modal.com/lab_release\"")
buildConfigField("String", "LAB_APP_LINK", "\"https://appkit-lab.reown.com/lab_release\"")
}

getByName("internal") {
manifestPlaceholders["pathPrefix"] = "/lab_internal"
buildConfigField("String", "LAB_APP_LINK", "\"https://dev.lab.web3modal.com/lab_internal\"")
buildConfigField("String", "LAB_APP_LINK", "\"https://appkit-lab.reown.com/lab_internal\"")

}

getByName("debug") {
manifestPlaceholders["pathPrefix"] = "/lab_debug"
buildConfigField("String", "LAB_APP_LINK", "\"https://dev.lab.web3modal.com/lab_debug\"")
buildConfigField("String", "LAB_APP_LINK", "\"https://appkit-lab.reown.com/lab_debug\"")
}
}

Expand Down
3 changes: 2 additions & 1 deletion sample/modal/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<package android:name="com.reown.sample.wallet.debug"/>
<package android:name="com.reown.sample.wallet.internal"/>
<package android:name="com.walletconnect.web3wallet.rnsample.internal"/>
<package android:name="com.walletconnect.web3wallet.rnsample"/>
<package android:name="com.walletconnect.flutterwallet"/>
<package android:name="com.walletconnect.flutterwallet.internal"/>
</queries>
Expand Down Expand Up @@ -77,7 +78,7 @@
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="dev.lab.web3modal.com"
android:host="appkit-lab.reown.com"
android:scheme="https"
android:pathPrefix="${pathPrefix}"/>
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AppKitApp : Application() {
val appMetaData = Core.Model.AppMetaData(
name = "AppKit Lab Sample",
description = "Kotlin AppKit Lab Sample",
url = "https://dev.lab.web3modal.com",
url = "https://appkit-lab.reown.com",
icons = listOf("https://gblobscdn.gitbook.com/spaces%2F-LJJeCjcLrr53DcT1Ml7%2Favatar.png?alt=media"),
redirect = "kotlin-modal-wc://request",
linkMode = true,
Expand Down
6 changes: 3 additions & 3 deletions sample/wallet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ android {
buildTypes {
getByName("release") {
manifestPlaceholders["pathPrefix"] = "/wallet_release"
buildConfigField("String", "WALLET_APP_LINK", "\"https://dev.lab.web3modal.com/wallet_release\"")
buildConfigField("String", "WALLET_APP_LINK", "\"https://appkit-lab.reown.com/wallet_release\"")
}

getByName("internal") {
manifestPlaceholders["pathPrefix"] = "/wallet_internal"
buildConfigField("String", "WALLET_APP_LINK", "\"https://dev.lab.web3modal.com/wallet_internal\"")
buildConfigField("String", "WALLET_APP_LINK", "\"https://appkit-lab.reown.com/wallet_internal\"")

}

getByName("debug") {
manifestPlaceholders["pathPrefix"] = "/wallet_debug"
buildConfigField("String", "WALLET_APP_LINK", "\"https://dev.lab.web3modal.com/wallet_debug\"")
buildConfigField("String", "WALLET_APP_LINK", "\"https://appkit-lab.reown.com/wallet_debug\"")
}
}

Expand Down
2 changes: 1 addition & 1 deletion sample/wallet/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="dev.lab.web3modal.com"
android:host="appkit-lab.reown.com"
android:pathPrefix="${pathPrefix}"
android:scheme="https" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class WalletKitApplication : Application() {
val appMetaData = Core.Model.AppMetaData(
name = "Kotlin Wallet",
description = "Kotlin Wallet Implementation",
url = "https://dev.lab.web3modal.com",
url = "https://appkit-lab.reown.com",
icons = listOf("https://raw.githubusercontent.com/WalletConnect/walletconnect-assets/master/Icon/Gradient/Icon.png"),
redirect = "kotlin-web3wallet://request",
appLink = BuildConfig.WALLET_APP_LINK,
Expand Down

0 comments on commit 5c4744d

Please sign in to comment.