Updated on 2026-08-14
This commit is contained in:
parent
0ccfceba04
commit
35e0cccc90
12 changed files with 110 additions and 5 deletions
|
|
@ -111,6 +111,7 @@ internal class AllOffersStateFactory(
|
|||
-> true
|
||||
is OnrampError.AmountError,
|
||||
is OnrampError.RedirectError,
|
||||
is OnrampError.AlreadyHandledTransaction,
|
||||
-> false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ internal class OnrampStateFactory(
|
|||
is OnrampError.AmountError.TooSmallError,
|
||||
OnrampError.RedirectError.VerificationFailed,
|
||||
OnrampError.RedirectError.WrongRequestId,
|
||||
OnrampError.AlreadyHandledTransaction,
|
||||
-> currentStateProvider() // ignore error state
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ internal class OnrampV2StateFactory(
|
|||
is OnrampError.AmountError.TooSmallError,
|
||||
OnrampError.RedirectError.VerificationFailed,
|
||||
OnrampError.RedirectError.WrongRequestId,
|
||||
OnrampError.AlreadyHandledTransaction,
|
||||
-> currentStateProvider() // ignore error state
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,10 +177,12 @@ internal class OnrampSuccessComponentModel @Inject constructor(
|
|||
private fun showErrorAlert(error: OnrampError) {
|
||||
val errorCode = (error as? OnrampError.DataError)?.code
|
||||
val message = DialogMessage(
|
||||
message = if (errorCode.isNullOrBlank()) {
|
||||
resourceReference(R.string.common_unknown_error)
|
||||
} else {
|
||||
resourceReference(R.string.express_error_code, wrappedList(errorCode))
|
||||
message = when {
|
||||
!errorCode.isNullOrBlank() -> resourceReference(R.string.express_error_code, wrappedList(errorCode))
|
||||
error is OnrampError.AlreadyHandledTransaction -> resourceReference(
|
||||
R.string.onramp_error_transaction_already_processed,
|
||||
)
|
||||
else -> resourceReference(R.string.common_unknown_error)
|
||||
},
|
||||
firstActionBuilder = {
|
||||
okAction(router::pop)
|
||||
|
|
|
|||
|
|
@ -31,5 +31,6 @@ internal fun AnalyticsEventHandler.sendOnrampErrorEvent(
|
|||
OnrampError.RedirectError.VerificationFailed,
|
||||
OnrampError.RedirectError.WrongRequestId,
|
||||
OnrampError.PairsNotFound,
|
||||
OnrampError.AlreadyHandledTransaction,
|
||||
-> { /* no-op */ }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue