Commit 08bd4a9b authored by zeroleak's avatar zeroleak
Browse files

Merge remote-tracking branch 'origin/whirlpool' into whirlpool

parents 46663e04 d7701f96
......@@ -336,8 +336,8 @@ public class WebUtil {
OkHttpClient.Builder builder = new OkHttpClient.Builder()
.proxy(TorManager.INSTANCE.getProxy())
.connectTimeout(90, TimeUnit.SECONDS)
.readTimeout(90, TimeUnit.SECONDS);
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS);
if(URL.contains("onion")){
getHostNameVerifier(builder);
......@@ -394,7 +394,9 @@ public class WebUtil {
RequestBody body = RequestBody.create(JSON, jsonToString);
OkHttpClient.Builder builder = new OkHttpClient.Builder()
.proxy(TorManager.INSTANCE.getProxy());
.proxy(TorManager.INSTANCE.getProxy())
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS);
if(URL.contains("onion")){
getHostNameVerifier(builder);
......
......@@ -66,22 +66,11 @@ class MixDetailsBottomSheet : BottomSheetDialogFragment() {
binding.mixesDone.text = "${whirlpoolUtxo.mixsDone}"
try {
if (whirlpoolUtxo.utxoState != null && whirlpoolUtxo.utxoState.mixProgress != null) {
val mixProgress = whirlpoolUtxo.utxoState.mixProgress
binding.mixStepMessage.text = mixProgress.mixStep.message
binding.mixError.visibility = View.GONE
if (whirlpoolUtxo.utxoState.hasError()) {
binding.mixError.visibility = View.VISIBLE
binding.mixError.text = whirlpoolUtxo.utxoState.error
binding.mixProgressBar.setIndicatorColor(
ContextCompat.getColor(
requireContext(),
R.color.red
)
)
binding.mixProgressBar.setProgressCompat(20, true)
binding.mixMessage.text = whirlpoolUtxo.utxoState.message
} else {
if (whirlpoolUtxo.utxoState != null) {
if(whirlpoolUtxo.utxoState.mixProgress != null){
val mixProgress = whirlpoolUtxo.utxoState.mixProgress
binding.mixStepMessage.text = mixProgress.mixStep.message
binding.mixError.visibility = View.GONE
binding.mixProgressBar.setIndicatorColor(
ContextCompat.getColor(
requireContext(),
......@@ -93,12 +82,26 @@ class MixDetailsBottomSheet : BottomSheetDialogFragment() {
mixProgress.mixStep.progressPercent,
true
)
}else{
binding.mixProgressContainer.visibility = View.GONE
}
if (whirlpoolUtxo.utxoState.hasError()) {
binding.mixError.visibility = View.VISIBLE
binding.mixError.text = whirlpoolUtxo.utxoState.error
binding.mixProgressBar.setIndicatorColor(
ContextCompat.getColor(
requireContext(),
R.color.red
)
)
binding.mixProgressBar.setProgressCompat(20, true)
binding.mixStepMessage.text = getString(R.string.mix_error)
}
} else {
binding.mixProgressContainer.visibility = View.GONE
}
} catch (ex: Exception) {
binding.mixError.text = "${ex.message}"
}
}
......
......@@ -47,7 +47,9 @@ class MixListAdapter : RecyclerView.Adapter<MixListAdapter.ViewHolder>() {
}
viewBinding.mixStatus.text = "${utxo.mixsDone} ${viewBinding.root.context.getString(R.string.mixes_complete)}"
viewBinding.mixingButton.setIconTintResource(R.color.white)
if(utxoState.mixableStatus == MixableStatus.UNCONFIRMED ){
if(utxoState.hasError()){
viewBinding.mixStatus.text = "${utxoState.error}";
}else if(utxoState.mixableStatus == MixableStatus.UNCONFIRMED ){
viewBinding.mixingButton.setIconResource(R.drawable.ic_timer_white_24dp)
return
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment