Skip to content

Commit

Permalink
fix(dashpay): username request fixes (#1317)
Browse files Browse the repository at this point in the history
* fix: improve identity verification url check

* fix: retry button after username request failure on More screen

* chore: use dpp 1.3.1-SNAPSHOT
  • Loading branch information
HashEngineering authored Oct 24, 2024
1 parent 00c0bdb commit 7863c8b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion wallet/src/de/schildbach/wallet/ui/more/MoreFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7863c8b

Please sign in to comment.