mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-06 05:14:50 +01:00
Utilize helper method when constructing proto charge failure.
Fixes #14871
This commit is contained in:
+1
-9
@@ -111,15 +111,7 @@ object InAppPaymentsRepository {
|
||||
.cancellation(
|
||||
InAppPaymentData.Cancellation(
|
||||
reason = if (chargeFailure != null) InAppPaymentData.Cancellation.Reason.PAST_DUE else InAppPaymentData.Cancellation.Reason.CANCELED,
|
||||
chargeFailure = chargeFailure?.let {
|
||||
InAppPaymentData.ChargeFailure(
|
||||
code = it.code,
|
||||
message = it.message,
|
||||
outcomeType = it.outcomeType,
|
||||
outcomeNetworkReason = it.outcomeNetworkReason ?: "",
|
||||
outcomeNetworkStatus = it.outcomeNetworkStatus
|
||||
)
|
||||
}
|
||||
chargeFailure = chargeFailure?.toInAppPaymentDataChargeFailure()
|
||||
)
|
||||
)
|
||||
.build()
|
||||
|
||||
Reference in New Issue
Block a user