mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-13 11:35:40 +01:00
Add error messages for when DLC GUI functions timeout (#3184)
This commit is contained in:
parent
5a79acb59c
commit
bcda2467ef
1 changed files with 15 additions and 3 deletions
|
@ -115,7 +115,11 @@ class DLCPaneModel(resultArea: TextArea) extends Logging {
|
|||
op = {
|
||||
ConsoleCli.exec(command, GlobalData.consoleCliConfig) match {
|
||||
case Success(commandReturn) =>
|
||||
resultArea.text = commandReturn
|
||||
val string = if (commandReturn.isEmpty) {
|
||||
"Accepting DLC Offer timed out! Try again in a bit."
|
||||
} else commandReturn
|
||||
|
||||
resultArea.text = string
|
||||
case Failure(err) =>
|
||||
err.printStackTrace()
|
||||
resultArea.text = s"Error executing command:\n${err.getMessage}"
|
||||
|
@ -137,7 +141,10 @@ class DLCPaneModel(resultArea: TextArea) extends Logging {
|
|||
op = {
|
||||
ConsoleCli.exec(command, GlobalData.consoleCliConfig) match {
|
||||
case Success(commandReturn) =>
|
||||
resultArea.text = commandReturn
|
||||
val string = if (commandReturn.isEmpty) {
|
||||
"Signing DLC timed out! Try again in a bit."
|
||||
} else commandReturn
|
||||
resultArea.text = string
|
||||
case Failure(err) =>
|
||||
err.printStackTrace()
|
||||
resultArea.text = s"Error executing command:\n${err.getMessage}"
|
||||
|
@ -150,7 +157,12 @@ class DLCPaneModel(resultArea: TextArea) extends Logging {
|
|||
}
|
||||
|
||||
def onAddSigs(): Unit = {
|
||||
printDLCDialogResult("AddDLCSigs", new AddSigsDLCDialog)
|
||||
val processStr: String => String = str => {
|
||||
if (str.isEmpty) {
|
||||
"Broadcasting DLC timed out! Try again in a bit."
|
||||
} else str
|
||||
}
|
||||
printDLCDialogResult("AddDLCSigs", new AddSigsDLCDialog, processStr)
|
||||
}
|
||||
|
||||
def onGetFunding(): Unit = {
|
||||
|
|
Loading…
Add table
Reference in a new issue