mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-12 10:30:19 +01:00
Fix dialog results optionality nesting to match dialogOpt (#3479)
This commit is contained in:
parent
b39ca47268
commit
2dd348a79f
4 changed files with 6 additions and 6 deletions
|
@ -65,7 +65,7 @@ class AcceptOfferDialog extends CliCommandProducer[AcceptDLCCliCommand] {
|
|||
val result = dialogOpt.map(_.showAndWait())
|
||||
|
||||
result match {
|
||||
case Some(Some(cmd: AcceptDLCCliCommand)) =>
|
||||
case Some(Some(Some(cmd: AcceptDLCCliCommand))) =>
|
||||
Some(cmd)
|
||||
case Some(_) | None => None
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ object BroadcastDLCDialog
|
|||
val result = dialogOpt.map(_.showAndWait())
|
||||
|
||||
result match {
|
||||
case Some(Some(cmd: AddDLCSigsAndBroadcastCliCommand)) =>
|
||||
case Some(Some(Some(cmd: AddDLCSigsAndBroadcastCliCommand))) =>
|
||||
Some(cmd)
|
||||
case Some(_) | None => None
|
||||
}
|
||||
|
|
|
@ -59,8 +59,8 @@ class CreateDLCOfferDialog
|
|||
val result = dialogOpt.map(_.showAndWait())
|
||||
|
||||
result match {
|
||||
case Some(Some(offer: CreateDLCOffer)) => Some(offer)
|
||||
case Some(_) | None => None
|
||||
case Some(Some(Some(offer: CreateDLCOffer))) => Some(offer)
|
||||
case Some(_) | None => None
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ object SignDLCDialog
|
|||
}
|
||||
}
|
||||
|
||||
var dialogOpt: Option[Dialog[Option[SignDLCCliCommand]]] = None
|
||||
private var dialogOpt: Option[Dialog[Option[SignDLCCliCommand]]] = None
|
||||
|
||||
def showAndWait(
|
||||
parentWindow: Window,
|
||||
|
@ -74,7 +74,7 @@ object SignDLCDialog
|
|||
val result = dialogOpt.map(_.showAndWait())
|
||||
|
||||
result match {
|
||||
case Some(Some(cmd: SignDLCCliCommand)) =>
|
||||
case Some(Some(Some(cmd: SignDLCCliCommand))) =>
|
||||
Some(cmd)
|
||||
case Some(_) | None => None
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue