mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-07-23 10:45:50 +00:00
fix: gate PezkuwiCheckImmortal on chain identity, not extension presence
Confirmed via on-device logcat trace: approving a multisig operation on Polkadot Asset Hub failed with "Failed to encode extension CheckMortality" because isPezkuwi checked for the "AuthorizeCall" signed extension, which Polkadot Asset Hub also declares - so PezkuwiCheckImmortal's raw DictEnum value was used there too, and it isn't a valid instance of Polkadot's own Era type codec. Switched the gate to the existing chain.isPezkuwiChain (genesis-hash based) check already used for the bizinikiwi signing context split. Also removes the temporary diagnostic logging added while tracing this bug and the earlier deep-link routing fix.
This commit is contained in:
+1
-7
@@ -41,15 +41,11 @@ class MultisigOperationDetailsDeepLinkHandler(
|
||||
override suspend fun matches(data: Uri): Boolean {
|
||||
val path = data.path ?: return false
|
||||
|
||||
val result = path.startsWith(MultisigOperationDeepLinkConfigurator.PREFIX)
|
||||
android.util.Log.e("DeepLinkDebug", "matches: path=$path result=$result")
|
||||
return result
|
||||
return path.startsWith(MultisigOperationDeepLinkConfigurator.PREFIX)
|
||||
}
|
||||
|
||||
override suspend fun handleDeepLink(data: Uri): Result<Unit> = runCatching {
|
||||
android.util.Log.e("DeepLinkDebug", "handleDeepLink: start, awaiting interaction gate...")
|
||||
automaticInteractionGate.awaitInteractionAllowed()
|
||||
android.util.Log.e("DeepLinkDebug", "handleDeepLink: interaction gate passed")
|
||||
|
||||
val chainId = data.getChainId()
|
||||
val chain = chainRegistry.getChain(chainId)
|
||||
@@ -59,13 +55,11 @@ class MultisigOperationDetailsDeepLinkHandler(
|
||||
val callHash = data.getCallHash() ?: error("Call hash not found")
|
||||
val callData = data.getCallData(chainId)
|
||||
val operationState = data.getOperationState()
|
||||
android.util.Log.e("DeepLinkDebug", "parsed params ok, chainId=$chainId operationState=$operationState")
|
||||
|
||||
val multisigMetaAccount = accountRepository.getActiveMetaAccounts()
|
||||
.filterIsInstance<MultisigMetaAccount>()
|
||||
.firstOrNull { it.accountIdKeyIn(chain) == multisigAccount && it.signatoryAccountId == signatoryAccount }
|
||||
?: error("Multisig account not found")
|
||||
android.util.Log.e("DeepLinkDebug", "found multisigMetaAccount id=${multisigMetaAccount.id}")
|
||||
|
||||
accountRepository.selectMetaAccount(multisigMetaAccount.id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user