mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-10-20 18:56:25 +00:00
fix(deeplink): match the referendum path exactly
ReferendumDeepLinkHandler matched any path starting with /open/gov, so the governance banner link /open/governance went to the referendum screen and failed with ReferendumIsNotSpecified.
This commit is contained in:
1 parent
af3476982d
commit
3b43446c11
1 file changed
+3
-1
+3
-1
@@ -31,7 +31,9 @@ class ReferendumDeepLinkHandler(
|
||||
override suspend fun matches(data: Uri): Boolean {
|
||||
val path = data.path ?: return false
|
||||
|
||||
return path.startsWith(ReferendumDetailsDeepLinkConfigurator.PREFIX)
|
||||
// Exact match, not startsWith: otherwise "/open/governance" (and any "/open/gov*") would wrongly
|
||||
// match the referendum prefix "/open/gov" and fail with ReferendumIsNotSpecified.
|
||||
return path == ReferendumDetailsDeepLinkConfigurator.PREFIX
|
||||
}
|
||||
|
||||
override suspend fun handleDeepLink(data: Uri) = runCatching {
|
||||
|
||||
Reference in new issue
Block a user