diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c322898..ee122a58 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@
### Added
- Ability to have both file and seed phrase wallets in the app and switch between them
+- Ability to open the Terms and Conditions and the Privacy Policy from the About screen
+
+### Fixed
+
+- Incorrect support email address in some error messages
+- Not working links to the documentation on some screens
### Removed
diff --git a/app/src/main/java/com/concordium/wallet/ui/bakerdelegation/baker/BakerRegistrationOpenActivity.kt b/app/src/main/java/com/concordium/wallet/ui/bakerdelegation/baker/BakerRegistrationOpenActivity.kt
index 53e001fb..fd73b29e 100644
--- a/app/src/main/java/com/concordium/wallet/ui/bakerdelegation/baker/BakerRegistrationOpenActivity.kt
+++ b/app/src/main/java/com/concordium/wallet/ui/bakerdelegation/baker/BakerRegistrationOpenActivity.kt
@@ -43,11 +43,14 @@ class BakerRegistrationOpenActivity : BaseDelegationBakerActivity(
}
}
- binding.openUrlExplain.handleUrlClicks { url ->
+ fun onUrlClicked(url: String) {
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
ContextCompat.startActivity(this, browserIntent, null)
}
+ binding.openUrlExplain.handleUrlClicks(::onUrlClicked)
+ binding.readMoreTextView.handleUrlClicks(::onUrlClicked)
+
binding.bakerRegistrationOpenContinue.setOnClickListener {
KeyboardUtil.hideKeyboard(this)
viewModel.bakerDelegationData.metadataUrl = binding.openUrl.text?.toString()
diff --git a/app/src/main/java/com/concordium/wallet/ui/more/about/AboutActivity.kt b/app/src/main/java/com/concordium/wallet/ui/more/about/AboutActivity.kt
index bc9fcf76..5c769b33 100644
--- a/app/src/main/java/com/concordium/wallet/ui/more/about/AboutActivity.kt
+++ b/app/src/main/java/com/concordium/wallet/ui/more/about/AboutActivity.kt
@@ -8,6 +8,7 @@ import com.concordium.wallet.AppConfig
import com.concordium.wallet.R
import com.concordium.wallet.databinding.ActivityAboutBinding
import com.concordium.wallet.ui.base.BaseActivity
+import com.concordium.wallet.ui.welcome.WelcomeTermsActivity
import com.concordium.wallet.uicore.handleUrlClicks
class AboutActivity : BaseActivity(
@@ -25,25 +26,41 @@ class AboutActivity : BaseActivity(
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- binding.aboutContactText.handleUrlClicks { url ->
- val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
- ContextCompat.startActivity(this, browserIntent, null)
- }
+ fun onUrlClicked(url: String) = when {
+ url == "#terms" -> {
+ startActivity(Intent(this, WelcomeTermsActivity::class.java))
+ }
- binding.aboutSupportText.handleUrlClicks { url ->
- val emailIntent = Intent(Intent.ACTION_SENDTO)
- emailIntent.data = Uri.parse(url)
- emailIntent.putExtra(Intent.EXTRA_EMAIL, arrayOf(url))
- try {
- // start email intent
- startActivity(Intent.createChooser(emailIntent, getString(R.string.about_support)))
- } catch (e: Exception) {
- // Left empty on purpose
+ url.startsWith("mailto") -> {
+ val emailIntent = Intent(Intent.ACTION_SENDTO)
+ emailIntent.data = Uri.parse(url)
+ emailIntent.putExtra(Intent.EXTRA_EMAIL, arrayOf(url))
+ try {
+ // start email intent
+ startActivity(
+ Intent.createChooser(
+ emailIntent,
+ getString(R.string.about_support)
+ )
+ )
+ } catch (e: Exception) {
+ // Left empty on purpose
+ }
+ }
+
+ else -> {
+ val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
+ ContextCompat.startActivity(this, browserIntent, null)
}
}
binding.aboutVersionText.text = AppConfig.appVersion
+ binding.aboutContactText.handleUrlClicks(::onUrlClicked)
+ binding.aboutSupportText.handleUrlClicks(::onUrlClicked)
+ binding.termsTextView.handleUrlClicks(::onUrlClicked)
+ binding.privacyTextView.handleUrlClicks(::onUrlClicked)
+
hideActionBarBack(isVisible = true)
binding.toolbarLayout.toolbarTitle.setTextAppearance(R.style.CCX_Typography_PageTitle)
}
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml
index c79904d1..62d10d65 100644
--- a/app/src/main/res/layout/activity_about.xml
+++ b/app/src/main/res/layout/activity_about.xml
@@ -75,6 +75,34 @@
android:textColor="@color/ccx_neutral_tint_2"
tools:text="x.y.z" />
+
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 539d51cb..65254ebc 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -306,6 +306,9 @@
Website
For more info about CryptoX Wallet you can visit concordium.com
App Version
+ Legal Information
+ Terms and Conditions
+ Privacy policy
File import is not possible when using a secret phrase
Importing…
@@ -624,7 +627,7 @@
Updating your delegation
Pay day updates
Cooldowns
-
+
Stop your delegation
Delegation status
@@ -659,7 +662,7 @@
You can delegate to an open pool of your choice, or you can stake using passive delegation.
If you don\'t already know which validator pool you want to delegate an amount to, you can look for one here:\n\nhttps://ccdscan.io/staking
- Passive delegation is an alternative to delegation to a specific validator pool that has lower rewards. With passive delegation you do not have to worry about the uptime or quality of a validator node.\n\nFor more info you can visit\n\ndeveloper.concordium.software
+ Passive delegation is an alternative to delegation to a specific validator pool that has lower rewards. With passive delegation you do not have to worry about the uptime or quality of a validator node.\n\nFor more info you can visit\n\ndocs.concordium.com
Enter validator pool ID
Optional: New validator pool ID
Current target: Validator id %1$s
@@ -787,7 +790,7 @@
Add validator
You can choose to add a URL with metadata about your validator. Leave it blank if you don’t have any.
- You can read more about the metadata URL on developer.concordium.software
+ You can read more about the metadata URL on docs.concordium.com
Continue
Paste your metadata URL here
Please enter a valid HTTP or HTTPS URL
@@ -1002,7 +1005,7 @@
Use full password instead
Delete
Use biometrics
- Failed to set up passcode, please contact \nsupport@concordium.software.com
+ Failed to set up passcode, please contact \nsupport@concordium.com
Enable biometrics for next time?
After you log out now, you’ll be able to sign in faster when you come back
Enable biometrics
@@ -1016,7 +1019,7 @@
Digital copy
Screenshot
@string/copied
- Failed to set up the wallet, please contact \nsupport@concordium.software.com
+ Failed to set up the wallet, please contact \nsupport@concordium.com
Copy to clipboard
Show seed phrase
@string/your_seed_phrase
@@ -1024,7 +1027,7 @@
Transcribe
Digital copy
Screenshot
- Failed to reveal the phrase, please contact \nsupport@concordium.software.com
+ Failed to reveal the phrase, please contact \nsupport@concordium.com
Copy to clipboard
Show wallet private key
@string/your_wallet_seed
@@ -1032,7 +1035,7 @@
Transcribe
Copy and keep safe
Screenshot
- Failed to reveal the key, please contact \nsupport@concordium.software.com
+ Failed to reveal the key, please contact \nsupport@concordium.com
Zero-knowledge proof
@@ -1168,7 +1171,7 @@
Unlock this feature
To use all features please complete your wallet set-up.
Go back
-
+
Your account will be here once your set-up is complete.
Next step: Save your seed phrase
Final step: Verify your identity