Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
samiuelson committed Nov 22, 2024
1 parent 8488745 commit 7183b09
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class WooPosTotalsViewModel @Inject constructor(
check(uiState.value is WooPosTotalsViewState.Totals)
createCardReaderPaymentController(dataState.value.orderId)
cardReaderPaymentController?.start()
listenToPaymentController()
listenToPaymentState()
} else {
// TODO: Update view state to ask user to connect card reader. Once connected, proceed with payment.
}
Expand Down Expand Up @@ -211,7 +211,7 @@ class WooPosTotalsViewModel @Inject constructor(
}
}

private fun listenToPaymentController() {
private fun listenToPaymentState() {
viewModelScope.launch {
cardReaderPaymentController?.paymentState?.collect { paymentState ->
val totalsState = uiState.value
Expand All @@ -229,10 +229,6 @@ class WooPosTotalsViewModel @Inject constructor(
}
}
}
viewModelScope.launch {
cardReaderPaymentController?.event?.collect { event ->
}
}
}

private fun createOrderDraft(productIds: List<Long>) {
Expand Down

0 comments on commit 7183b09

Please sign in to comment.