package Ġorg . ny pl . simpl ified . card creator . view model Ċ Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġkotlinx . coroutines . launch Ċ import Ġorg . ny pl . simpl ified . card creator . model . Address Ċ import Ġorg . ny pl . simpl ified . card creator . model . Validate Address Response Ċ import Ġorg . ny pl . simpl ified . card creator . network . Card Creator Service Ċ import Ġorg . ny pl . simpl ified . card creator . utils . Channel Ċ Ċ class ĠAddress ViewModel ( ĊĠ Ġprivate Ġval Ġcard Creator Service : ĠCard Creator Service Ċ ) Ġ: ĠViewModel () Ġ{ ĊĊĠ Ġval Ġpending Request Ġ= ĠMutable LiveData ( false ) ĊĊĠ Ġval Ġvalidate Address Response Ġ= ĠChannel < Validate Address Response >() ĊĊĠ Ġfun Ġvalidate Address ( address : ĠAddress ) Ġ{ ĊĠĠĠ ĠviewModel Scope . launch Ġ{ ĊĠĠĠĠĠ Ġpending Request . value Ġ= Ġtrue ĊĠĠĠĠĠ Ġval Ġresponse Ġ= Ġcard Creator Service . validate Address ( address ) ĊĠĠĠĠĠ Ġvalidate Address Response . send ( response ) ĊĠĠĠĠĠ Ġpending Request . value Ġ= Ġfalse ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ