mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 13:16:44 +00:00
hide mix failed after timeout
This commit is contained in:
parent
97d121244f
commit
ebb7d23a05
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,7 @@ import com.sparrowwallet.sparrow.wallet.Entry;
|
||||||
import com.sparrowwallet.sparrow.wallet.UtxoEntry;
|
import com.sparrowwallet.sparrow.wallet.UtxoEntry;
|
||||||
|
|
||||||
public class MixTableCell extends TableCell {
|
public class MixTableCell extends TableCell {
|
||||||
|
private static final int ERROR_DISPLAY_MILLIS = 5 * 60 * 1000;
|
||||||
public static final int WIDTH = 18;
|
public static final int WIDTH = 18;
|
||||||
|
|
||||||
public MixTableCell(Entry entry) {
|
public MixTableCell(Entry entry) {
|
||||||
|
@ -41,7 +42,8 @@ public class MixTableCell extends TableCell {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getMixFail(UtxoEntry.MixStatus mixStatus) {
|
private String getMixFail(UtxoEntry.MixStatus mixStatus) {
|
||||||
if(mixStatus.getMixFailReason() == MixFailReason.CANCEL) {
|
long elapsed = mixStatus.getMixErrorTimestamp() == null ? 0L : System.currentTimeMillis() - mixStatus.getMixErrorTimestamp();
|
||||||
|
if(mixStatus.getMixFailReason() == MixFailReason.CANCEL || elapsed >= ERROR_DISPLAY_MILLIS) {
|
||||||
return getMixCountOnly(mixStatus);
|
return getMixCountOnly(mixStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue