From 3e5ed2ad646a02bde2915bd4bdbb2dce10222883 Mon Sep 17 00:00:00 2001 From: HashEngineering Date: Tue, 22 Oct 2024 16:21:24 -0700 Subject: [PATCH 1/3] fix: improve identity verification url check --- .../de/schildbach/wallet/ui/dashpay/CreateIdentityService.kt | 2 +- .../wallet/ui/username/voting/VerifyIdentityFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wallet/src/de/schildbach/wallet/ui/dashpay/CreateIdentityService.kt b/wallet/src/de/schildbach/wallet/ui/dashpay/CreateIdentityService.kt index 760911e1b..06ba75a94 100644 --- a/wallet/src/de/schildbach/wallet/ui/dashpay/CreateIdentityService.kt +++ b/wallet/src/de/schildbach/wallet/ui/dashpay/CreateIdentityService.kt @@ -707,7 +707,7 @@ class CreateIdentityService : LifecycleService() { platformRepo.updateBlockchainIdentityData(blockchainIdentityData, blockchainIdentity) blockchainIdentityData.verificationLink?.let { verificationLink -> - if (verificationLink.startsWith("https://") || verificationLink.startsWith("http://")) { + if (verificationLink.matches(Regex("^https?:\\/\\/.+\$"))) { IdentityVerify(platformRepo.platform.platform).createForDashDomain( blockchainIdentityData.username!!, verificationLink, diff --git a/wallet/src/de/schildbach/wallet/ui/username/voting/VerifyIdentityFragment.kt b/wallet/src/de/schildbach/wallet/ui/username/voting/VerifyIdentityFragment.kt index 949053c6f..0d4f9814c 100644 --- a/wallet/src/de/schildbach/wallet/ui/username/voting/VerifyIdentityFragment.kt +++ b/wallet/src/de/schildbach/wallet/ui/username/voting/VerifyIdentityFragment.kt @@ -45,7 +45,7 @@ class VerifyIdentityFragment : Fragment(R.layout.fragment_verfiy_identity) { binding.linkInput.doOnTextChanged { text, _, _, _ -> val link = text.toString() - val isValidLink = link.startsWith("https://") || link.startsWith("http://") + val isValidLink = link.matches(Regex("^https?:\\/\\/.+\$")) binding.verifyBtn.isEnabled = isValidLink if (!text.isNullOrEmpty()) { binding.linkInputLayout.hint = getString(R.string.link) From c2953d4eb3a54bfaec2add744ce7dddee21edf4a Mon Sep 17 00:00:00 2001 From: HashEngineering Date: Tue, 22 Oct 2024 16:22:10 -0700 Subject: [PATCH 2/3] fix: retry button after username request failure on More screen --- wallet/src/de/schildbach/wallet/ui/more/MoreFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wallet/src/de/schildbach/wallet/ui/more/MoreFragment.kt b/wallet/src/de/schildbach/wallet/ui/more/MoreFragment.kt index e7194017c..2802b7d3c 100644 --- a/wallet/src/de/schildbach/wallet/ui/more/MoreFragment.kt +++ b/wallet/src/de/schildbach/wallet/ui/more/MoreFragment.kt @@ -283,7 +283,8 @@ class MoreFragment : Fragment(R.layout.fragment_more) { } binding.retryRequestButton.setOnClickListener { - // TODO: restart CreateIdentityService + mainActivityViewModel.logEvent(AnalyticsConstants.UsersContacts.CREATE_USERNAME_TRYAGAIN) + createIdentityViewModel.retryCreateIdentity() } initViewModel() From 5efb075d6de8583d7b61dfc2c5f796c915c0c7e5 Mon Sep 17 00:00:00 2001 From: HashEngineering Date: Tue, 22 Oct 2024 16:22:24 -0700 Subject: [PATCH 3/3] chore: use dpp 1.3.1-SNAPSHOT --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e1f5061c7..a6664eb07 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { coroutinesVersion = '1.6.4' ok_http_version = '4.9.1' dashjVersion = '21.1.2' - dppVersion = "1.3-SNAPSHOT" + dppVersion = "1.3.1-SNAPSHOT" hiltVersion = '2.51' hiltCompilerVersion = '1.2.0' hiltWorkVersion = '1.0.0'