diff --git a/demo/src/main/java/ramp/network/demo/MainActivity.kt b/demo/src/main/java/ramp/network/demo/MainActivity.kt index 8106c90..2e48e9f 100644 --- a/demo/src/main/java/ramp/network/demo/MainActivity.kt +++ b/demo/src/main/java/ramp/network/demo/MainActivity.kt @@ -34,7 +34,7 @@ class MainActivity : AppCompatActivity() { val config = Config( hostLogoUrl = "https://ramp.network/assets/images/Logo.svg", hostAppName = "My App", - url = "https://ri-widget-dev2.firebaseapp.com", + url = "https://app.dev.ramp-network.org", hostApiKey = "3qncr4yvxfpro6endeaeu6npkh8qc23e9uadtazq", enabledFlows = setOf(Flow.OFFRAMP, Flow.ONRAMP) ) diff --git a/rampsdk/build.gradle b/rampsdk/build.gradle index fc52f50..ce975b6 100644 --- a/rampsdk/build.gradle +++ b/rampsdk/build.gradle @@ -23,7 +23,7 @@ android { minSdkVersion 21 targetSdkVersion 32 versionCode 15 - versionName "2.0.0" + versionName "2.0.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' @@ -86,7 +86,7 @@ afterEvaluate { from components.release groupId = 'com.github.RampNetwork' artifactId = 'ramp-sdk-android' - version = '2.0.0' + version = '2.0.1' } } } diff --git a/rampsdk/src/main/java/network/ramp/sdk/utils/UrlSafeChecker.kt b/rampsdk/src/main/java/network/ramp/sdk/utils/UrlSafeChecker.kt index 5123b70..c844349 100644 --- a/rampsdk/src/main/java/network/ramp/sdk/utils/UrlSafeChecker.kt +++ b/rampsdk/src/main/java/network/ramp/sdk/utils/UrlSafeChecker.kt @@ -5,9 +5,12 @@ object UrlSafeChecker { private val listOfSafeUrls = listOf( "https://ri-widget-dev2.firebaseapp.com", "https://ri-widget-staging.firebaseapp.com", - "https://buy.ramp.network" + "https://buy.ramp.network", + "https://app.dev.ramp-network.org", + "https://app.demo.ramp.network", + "https://app.ramp.network" ) - private val listOfSafeRegex = listOf("^https://ri-widget-dev-(\\d+)\\.firebaseapp\\.com$") + private val listOfSafeRegex = listOf("^https://ri-widget-dev-(\\d+)\\.firebaseapp\\.com$", "^https://app.(\\d+)\\.dev\\.ramp-network\\.org") fun isUrlSafe(url: String) = checkStaticUrls(url) || checkRegexList(url) diff --git a/rampsdk/src/test/java/network/ramp/sdk/utils/UrlSafeCheckerTest.kt b/rampsdk/src/test/java/network/ramp/sdk/utils/UrlSafeCheckerTest.kt index 1e52008..5846b26 100644 --- a/rampsdk/src/test/java/network/ramp/sdk/utils/UrlSafeCheckerTest.kt +++ b/rampsdk/src/test/java/network/ramp/sdk/utils/UrlSafeCheckerTest.kt @@ -13,6 +13,10 @@ internal class UrlSafeCheckerTest { val safeUrl3 = "https://buy.ramp.network" val safeUrl4 = "https://ri-widget-dev-5.firebaseapp.com" val safeUrl5 = "https://ri-widget-dev-42.firebaseapp.com" + val safeUrl6 = "https://app.33.dev.ramp-network.org" + val safeUrl7 = "https://app.dev.ramp-network.org" + val safeUrl8 = "https://app.demo.ramp.network" + val safeUrl9 = "https://app.ramp.network" Assertions.assertAll( @@ -20,7 +24,11 @@ internal class UrlSafeCheckerTest { { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl2)) }, { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl3)) }, { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl4)) }, - { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl5)) } + { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl5)) }, + { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl6)) }, + { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl7)) }, + { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl8)) }, + { Assertions.assertTrue(UrlSafeChecker.isUrlSafe(safeUrl9)) } ) }