From ee63f15dd9737c79f8d3c94cc28c1299763dfcca Mon Sep 17 00:00:00 2001 From: Satoshi Qazi Muhammed Date: Mon, 13 Jul 2026 23:14:16 -0700 Subject: [PATCH] Fix nullable AccountModel handling in onDepositorClicked CI caught this: depositorAccountModel's inner type became AccountModel? when the depositor field went nullable, but onDepositorClicked still called it.address() directly instead of null-checking first. --- .../details/full/MultisigOperationFullDetailsViewModel.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/feature-multisig/operations/src/main/java/io/novafoundation/nova/feature_multisig_operations/presentation/details/full/MultisigOperationFullDetailsViewModel.kt b/feature-multisig/operations/src/main/java/io/novafoundation/nova/feature_multisig_operations/presentation/details/full/MultisigOperationFullDetailsViewModel.kt index 7a08eaed..d234cd2e 100644 --- a/feature-multisig/operations/src/main/java/io/novafoundation/nova/feature_multisig_operations/presentation/details/full/MultisigOperationFullDetailsViewModel.kt +++ b/feature-multisig/operations/src/main/java/io/novafoundation/nova/feature_multisig_operations/presentation/details/full/MultisigOperationFullDetailsViewModel.kt @@ -114,8 +114,11 @@ class MultisigOperationFullDetailsViewModel( fun onDepositorClicked() = launchUnit { val chain = operationFlow.first().chain - depositorAccountModel.first().onLoaded { - externalActions.showAddressActions(it.address(), chain) + depositorAccountModel.first().onLoaded { accountModel -> + // Null for a not-yet-submitted operation (nobody has deposited yet) - the depositor + // row is hidden in that case (see showAccountWithLoading), so this click handler + // shouldn't be reachable, but guard it explicitly rather than assume. + accountModel?.let { externalActions.showAddressActions(it.address(), chain) } } }