refactor: remove navigation orchestration from SendViewModel

This commit is contained in:
2026-06-06 16:41:34 +02:00
parent 800a44f73c
commit 9403930a8e
4 changed files with 29 additions and 6 deletions
@@ -17,6 +17,7 @@ import com.bitcointxoko.gudariwallet.ui.balance.BalanceViewModel
import com.bitcointxoko.gudariwallet.ui.clipboard.ClipboardViewModel
import com.bitcointxoko.gudariwallet.ui.fiat.FiatViewModel
import com.bitcointxoko.gudariwallet.ui.receive.ReceiveViewModel
import com.bitcointxoko.gudariwallet.ui.send.SendEvent
import com.bitcointxoko.gudariwallet.ui.send.SendStrings
import com.bitcointxoko.gudariwallet.ui.send.SendViewModel
import kotlinx.coroutines.flow.SharingStarted
@@ -110,6 +111,12 @@ class WalletViewModel(
) = sendVm.requestPayment(activity, subtitle, strings, pay)
fun resetSendState() = sendVm.resetSendState()
val sendEvents: SharedFlow<SendEvent> = sendVm.events
fun handleWithdrawScanned(raw: LnurlScanResponse, lnurl: String) {
receiveVm.handleWithdrawResponse(raw, lnurl)
}
val lightningAddress: StateFlow<String?> = lnAddressStore.lightningAddressFlow
.stateIn(
scope = viewModelScope,