Skip to content

Commit

Permalink
fix: apply code-review
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan committed Jun 12, 2024
1 parent eb2cd30 commit 766a753
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 269 deletions.
24 changes: 12 additions & 12 deletions android/src/play/java/com/dooboolab/rniap/PlayUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,73 +17,73 @@ object PlayUtils {
BillingClient.BillingResponseCode.FEATURE_NOT_SUPPORTED -> {
BillingResponse(
PromiseUtils.E_SERVICE_ERROR,
"This feature is not available on your device.",
"This feature is not available on your device."

Check failure on line 20 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.SERVICE_DISCONNECTED -> {
BillingResponse(
PromiseUtils.E_NETWORK_ERROR,
"The service is disconnected (check your internet connection.)",
"The service is disconnected (check your internet connection.)"

Check failure on line 26 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.NETWORK_ERROR -> {
BillingResponse(
PromiseUtils.E_NETWORK_ERROR,
"You have problem with network connection.",
"You have problem with network connection."

Check failure on line 32 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.OK -> {
BillingResponse(
"OK",
"",
""

Check failure on line 38 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.USER_CANCELED -> {
BillingResponse(
PromiseUtils.E_USER_CANCELLED,
"Payment is Cancelled.",
"Payment is Cancelled."

Check failure on line 44 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.SERVICE_UNAVAILABLE -> {
BillingResponse(
PromiseUtils.E_SERVICE_ERROR,
"The service is unreachable. This may be your internet connection, or the Play Store may be down.",
"The service is unreachable. This may be your internet connection, or the Play Store may be down."

Check failure on line 50 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.BILLING_UNAVAILABLE -> {
BillingResponse(
PromiseUtils.E_SERVICE_ERROR,
"Billing is unavailable. This may be a problem with your device, or the Play Store may be down.",
"Billing is unavailable. This may be a problem with your device, or the Play Store may be down."

Check failure on line 56 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.ITEM_UNAVAILABLE -> {
BillingResponse(
PromiseUtils.E_ITEM_UNAVAILABLE,
"That item is unavailable.",
"That item is unavailable."

Check failure on line 62 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.DEVELOPER_ERROR -> {
BillingResponse(
PromiseUtils.E_DEVELOPER_ERROR,
"Google is indicating that we have some issue connecting to payment.",
"Google is indicating that we have some issue connecting to payment."

Check failure on line 68 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.ERROR -> {
BillingResponse(
PromiseUtils.E_UNKNOWN,
"An unknown or unexpected error has occurred. Please try again later.",
"An unknown or unexpected error has occurred. Please try again later."

Check failure on line 74 in android/src/play/java/com/dooboolab/rniap/PlayUtils.kt

View workflow job for this annotation

GitHub Actions / ktlint

Missing trailing comma before ")"
)
}
BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED -> {
BillingResponse(
PromiseUtils.E_ALREADY_OWNED,
"You already own this item.",
"You already own this item."
)
}
else -> {
BillingResponse(
PromiseUtils.E_UNKNOWN,
"Purchase failed with code: $responseCode",
"Purchase failed with code: $responseCode"
)
}
}
Expand Down
Loading

0 comments on commit 766a753

Please sign in to comment.