Skip to content

Commit

Permalink
Code refractoring
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Goel <[email protected]>
  • Loading branch information
grvgoel81 committed Apr 17, 2023
1 parent 644add1 commit adc36d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/com/web3auth/core/Web3Auth.kt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
if (web3AuthResponse.error?.isNotBlank() == true) {
loginCompletableFuture.completeExceptionally(
UnKnownException(
web3AuthResponse.error ?: Web3AuthError.getError(ErrorCode.SOMETHING_WENT_ERROR)
web3AuthResponse.error ?: Web3AuthError.getError(ErrorCode.SOMETHING_WENT_WRONG)
)
)
}
Expand Down Expand Up @@ -260,7 +260,7 @@ class Web3Auth(web3AuthOptions: Web3AuthOptions) {
sessionCompletableFuture.completeExceptionally(
UnKnownException(
web3AuthResponse.error ?: Web3AuthError.getError(
ErrorCode.SOMETHING_WENT_ERROR
ErrorCode.SOMETHING_WENT_WRONG
)
)
)
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/com/web3auth/core/types/Web3AuthError.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object Web3AuthError {
ErrorCode.DECODING_ERROR -> {
"Decoding Error"
}
ErrorCode.SOMETHING_WENT_ERROR -> {
ErrorCode.SOMETHING_WENT_WRONG -> {
"Something went wrong!"
}
ErrorCode.RUNTIME_ERROR -> {
Expand All @@ -32,5 +32,5 @@ enum class ErrorCode {
DECODING_ERROR,
RUNTIME_ERROR,
APP_CANCELLED,
SOMETHING_WENT_ERROR,
SOMETHING_WENT_WRONG,
}

0 comments on commit adc36d3

Please sign in to comment.