mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-07-22 11:25:53 +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:
+5
-2
@@ -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) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user