Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
samiuelson committed Nov 22, 2024
1 parent 49c4d1b commit 84c687b
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ class CardReaderConnectViewModel @Inject constructor(

val viewStateData: LiveData<CardReaderConnectViewState> = viewState

private val CardReaderFlowParam.isPOS: Boolean
get() = this is Payment && paymentType == Payment.PaymentType.WOO_POS ||
this is CardReaderFlowParam.WooPosConnection

init {
startFlow()
}
Expand Down Expand Up @@ -530,7 +526,7 @@ class CardReaderConnectViewModel @Inject constructor(

private fun exitFlow(connected: Boolean) {
val param = arguments.cardReaderFlowParam
if (param.isPOS) {
if (param is CardReaderFlowParam.WooPosConnection) {
returnToWooPos()
} else if (!connected) {
triggerEvent(ExitWithResult(false))
Expand Down

0 comments on commit 84c687b

Please sign in to comment.