mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-10-20 18:56:25 +00:00
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.
This commit is contained in:
1 parent
68a5b3ed9e
commit
ee63f15dd9
1 file changed
+5
-2
+5
-2
@@ -114,8 +114,11 @@ class MultisigOperationFullDetailsViewModel(
|
|||||||
|
|
||||||
fun onDepositorClicked() = launchUnit {
|
fun onDepositorClicked() = launchUnit {
|
||||||
val chain = operationFlow.first().chain
|
val chain = operationFlow.first().chain
|
||||||
depositorAccountModel.first().onLoaded {
|
depositorAccountModel.first().onLoaded { accountModel ->
|
||||||
externalActions.showAddressActions(it.address(), chain)
|
// 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) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user