mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-07-24 18:15:46 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bcd44828a3 | |||
| df745e9147 | |||
| 0603e079e2 |
+7
@@ -2,6 +2,7 @@ package io.novafoundation.nova.feature_deep_linking.presentation.handling
|
||||
|
||||
import android.net.Uri
|
||||
import io.novafoundation.nova.common.utils.onFailureInstance
|
||||
import io.novafoundation.nova.feature_deep_linking.presentation.handling.common.DeepLinkHandlingException
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.merge
|
||||
|
||||
@@ -23,12 +24,18 @@ class RootDeepLinkHandler(
|
||||
|
||||
return handleDeepLinkInternal(pendingDeepLink)
|
||||
.onSuccess { pendingDeepLinkProvider.clear() }
|
||||
// A pending link that reaches a handler but fails with a terminal error (malformed/unresolvable),
|
||||
// or matches no handler, will never succeed on retry - clear it so it does not replay on every launch.
|
||||
.onFailureInstance<DeepLinkHandlingException, Unit> { pendingDeepLinkProvider.clear() }
|
||||
.onFailureInstance<HandlerNotFoundException, Unit> { pendingDeepLinkProvider.clear() }
|
||||
}
|
||||
|
||||
override suspend fun handleDeepLink(data: Uri): Result<Unit> {
|
||||
pendingDeepLinkProvider.save(data)
|
||||
return handleDeepLinkInternal(data)
|
||||
.onSuccess { pendingDeepLinkProvider.clear() }
|
||||
// Same as above: a terminal handling failure must not be persisted, otherwise it bricks every launch.
|
||||
.onFailureInstance<DeepLinkHandlingException, Unit> { pendingDeepLinkProvider.clear() }
|
||||
.onFailureInstance<HandlerNotFoundException, Unit> { pendingDeepLinkProvider.clear() } // If we haven't find any handler - no need to save deep link
|
||||
}
|
||||
|
||||
|
||||
+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 {
|
||||
|
||||
+10
-16
@@ -5,19 +5,13 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
|
||||
// TEMPORARY - points at pending/post-fix-release, NOT master. wallet-util's master was reset to the
|
||||
// last content the still-live Play Store release can parse (see wallet-util repo history around
|
||||
// 2026-07-11), so master has neither Tron nor Bitcoin config/icons this branch needs to test against.
|
||||
// pending/post-fix-release is where both are staged until wallet-android ships the coordinated release.
|
||||
// MUST be pointed back at "master" before this branch merges - do not ship this override.
|
||||
buildConfigField "String", "CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/chains/v22/android/chains.json\""
|
||||
buildConfigField "String", "EVM_ASSETS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/assets/evm/v3/assets.json\""
|
||||
buildConfigField "String", "PRE_CONFIGURED_CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/chains/v22/preConfigured/chains.json\""
|
||||
buildConfigField "String", "PRE_CONFIGURED_CHAIN_DETAILS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/chains/v22/preConfigured/details\""
|
||||
|
||||
buildConfigField "String", "CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/chains/v22/android/chains.json\""
|
||||
buildConfigField "String", "EVM_ASSETS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/assets/evm/v3/assets.json\""
|
||||
buildConfigField "String", "PRE_CONFIGURED_CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/chains/v22/preConfigured/chains.json\""
|
||||
buildConfigField "String", "PRE_CONFIGURED_CHAIN_DETAILS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/chains/v22/preConfigured/details\""
|
||||
|
||||
buildConfigField "String", "TEST_CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/tests/chains_for_testBalance.json\""
|
||||
buildConfigField "String", "TEST_ASSETS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/tests/pezkuwi_assets_for_testBalance.json\""
|
||||
buildConfigField "String", "TEST_CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/tests/chains_for_testBalance.json\""
|
||||
buildConfigField "String", "TEST_ASSETS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/tests/pezkuwi_assets_for_testBalance.json\""
|
||||
|
||||
buildConfigField "String", "INFURA_API_KEY", readStringSecret("INFURA_API_KEY")
|
||||
buildConfigField "String", "DWELLIR_API_KEY", readStringSecret("DWELLIR_API_KEY")
|
||||
@@ -33,10 +27,10 @@ android {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
|
||||
buildConfigField "String", "CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/chains/v22/android/chains.json\""
|
||||
buildConfigField "String", "EVM_ASSETS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/assets/evm/v3/assets.json\""
|
||||
buildConfigField "String", "PRE_CONFIGURED_CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/chains/v22/preConfigured/chains.json\""
|
||||
buildConfigField "String", "PRE_CONFIGURED_CHAIN_DETAILS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/pending/post-fix-release/chains/v22/preConfigured/details\""
|
||||
buildConfigField "String", "CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/chains/v22/android/chains.json\""
|
||||
buildConfigField "String", "EVM_ASSETS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/assets/evm/v3/assets.json\""
|
||||
buildConfigField "String", "PRE_CONFIGURED_CHAINS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/chains/v22/preConfigured/chains.json\""
|
||||
buildConfigField "String", "PRE_CONFIGURED_CHAIN_DETAILS_URL", "\"https://raw.githubusercontent.com/pezkuwichain/pezkuwi-wallet-utils/master/chains/v22/preConfigured/details\""
|
||||
}
|
||||
}
|
||||
namespace 'io.novafoundation.nova.runtime'
|
||||
|
||||
Reference in New Issue
Block a user