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:
Satoshi Qazi Muhammed committed 2026-10-19 13:22:38 +04:00
1 parent af3476982d
commit 3b43446c11
1 file changed
+3 -1
@@ -31,7 +31,9 @@ class ReferendumDeepLinkHandler(
override suspend fun matches(data: Uri): Boolean { override suspend fun matches(data: Uri): Boolean {
val path = data.path ?: return false 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 { override suspend fun handleDeepLink(data: Uri) = runCatching {