Updated on 2026-08-14
This commit is contained in:
parent
c6a3f70322
commit
fac21a0c25
1 changed files with 11 additions and 11 deletions
|
|
@ -79,22 +79,11 @@ internal class SendDestinationModel @Inject constructor(
|
|||
private var validationJobHolder = JobHolder()
|
||||
|
||||
init {
|
||||
initSenderAddress()
|
||||
configDestinationNavigation()
|
||||
subscribeOnQRScannerResult()
|
||||
initialState()
|
||||
}
|
||||
|
||||
private fun initSenderAddress() {
|
||||
modelScope.launch {
|
||||
senderAddresses.value = getNetworkAddressesUseCase.invokeSync(userWalletId, cryptoCurrency.network)
|
||||
.filter { cryptoCurrency.id == it.cryptoCurrency.id }
|
||||
}
|
||||
senderAddresses.onEach {
|
||||
getWalletsAndRecent()
|
||||
}.launchIn(modelScope)
|
||||
}
|
||||
|
||||
private fun initialState() {
|
||||
if ((uiState.value as? DestinationUM.Content)?.isInitialized == false) {
|
||||
_uiState.update(
|
||||
|
|
@ -112,6 +101,7 @@ internal class SendDestinationModel @Inject constructor(
|
|||
),
|
||||
)
|
||||
}
|
||||
initSenderAddress()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -150,6 +140,16 @@ internal class SendDestinationModel @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
private fun initSenderAddress() {
|
||||
modelScope.launch {
|
||||
senderAddresses.value = getNetworkAddressesUseCase.invokeSync(userWalletId, cryptoCurrency.network)
|
||||
.filter { cryptoCurrency.id == it.cryptoCurrency.id }
|
||||
}
|
||||
senderAddresses.onEach {
|
||||
getWalletsAndRecent()
|
||||
}.launchIn(modelScope)
|
||||
}
|
||||
|
||||
private fun subscribeOnQRScannerResult() {
|
||||
listenToQrScanningUseCase(SourceType.SEND)
|
||||
.getOrElse { emptyFlow() }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue