Skip to content

Commit

Permalink
Merge pull request #443 from mysteriumnetwork/bugfix/Add_referral_reg…
Browse files Browse the repository at this point in the history
…istration_error_handling

Add referral registration error handling
  • Loading branch information
ArtemHryhorovGeniusee authored Aug 17, 2021
2 parents c0e4fff + da66cb6 commit 1adb885
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.os.Bundle
import android.util.Log
import android.view.View
import android.widget.EditText
import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.core.widget.addTextChangedListener
import network.mysterium.vpn.R
Expand Down Expand Up @@ -157,6 +158,14 @@ class PrepareTopUpActivity : BaseActivity() {
isReferralTokenUsed = true
onSuccess.invoke()
}
it.onFailure { throwable ->
Log.e(TAG, throwable.localizedMessage ?: throwable.toString())
Toast.makeText(
this,
getString(R.string.intercom_something_went_wrong_try_again),
Toast.LENGTH_LONG
).show()
}
})
}

Expand Down

0 comments on commit 1adb885

Please sign in to comment.