Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ internal fun SendScreen(navController: NavHostController, walletViewModel: Walle

val coroutineScope = rememberCoroutineScope()

val balance by walletViewModel.balance.observeAsState()
val balance by walletViewModel.balance.collectAsState()
val recipientAddress: MutableState<String> = rememberSaveable { mutableStateOf("") }
val amount: MutableState<String> = rememberSaveable { mutableStateOf("") }
val feeRate: MutableState<String> = rememberSaveable { mutableStateOf("") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal fun WalletRootScreen(
navController: NavHostController,
walletViewModel: WalletViewModel
) {
val balance by walletViewModel.balance.observeAsState()
val balance by walletViewModel.balance.collectAsState()
val transactionList by walletViewModel.readAllData.observeAsState(initial = emptyList())
val isOnlineStatus by walletViewModel.isOnlineVariable.observeAsState()
val tempOpenFaucetDialog = walletViewModel.openFaucetDialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class WalletViewModel(
private val repository: TxRepository
var openFaucetDialog: MutableState<Boolean> = mutableStateOf(false)

private var _balance: MutableLiveData<ULong> = MutableLiveData(0u)
val balance: LiveData<ULong>
private var _balance: MutableStateFlow<ULong> = MutableStateFlow(0u)
val balance: StateFlow<ULong>
get() = _balance

private var _address: MutableLiveData<String> = MutableLiveData("")
Expand Down