Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
deBeauvoir
samourai-wallet-android
Commits
1a3a1659
Verified
Commit
1a3a1659
authored
Jan 03, 2022
by
Sarath
⚔
Browse files
Fix : whirlpool mix errors not displaying
parent
e5924107
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
18 deletions
+21
-18
app/src/main/java/com/samourai/wallet/whirlpool/MixDetailsBottomSheet.kt
...va/com/samourai/wallet/whirlpool/MixDetailsBottomSheet.kt
+18
-17
app/src/main/java/com/samourai/wallet/whirlpool/fragments/MixListAdapter.kt
...com/samourai/wallet/whirlpool/fragments/MixListAdapter.kt
+3
-1
No files found.
app/src/main/java/com/samourai/wallet/whirlpool/MixDetailsBottomSheet.kt
View file @
1a3a1659
...
...
@@ -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
(),
...
...
@@ -94,11 +83,23 @@ class MixDetailsBottomSheet : BottomSheetDialogFragment() {
true
)
}
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}"
}
}
...
...
app/src/main/java/com/samourai/wallet/whirlpool/fragments/MixListAdapter.kt
View file @
1a3a1659
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment