Update balance on cancel DLC (#3205)

This commit is contained in:
benthecarman 2021-06-02 04:16:54 -07:00 committed by GitHub
parent 4efe88fcba
commit 1af9465881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -54,8 +54,8 @@ abstract class WalletGUI {
" sats")
}
private lazy val dlcPane = new DLCPane(glassPane)
private lazy val model = new WalletGUIModel(dlcPane.model)
private[gui] lazy val dlcPane = new DLCPane(glassPane)
private[gui] lazy val model = new WalletGUIModel(dlcPane.model)
private lazy val balanceBox = new VBox {
spacing = 10

View File

@ -119,7 +119,7 @@ class WalletGUIModel(dlcModel: DLCPaneModel)(implicit system: ActorSystem) {
}
}
private def updateBalance(): Unit = {
private[gui] def updateBalance(): Unit = {
ConsoleCli.exec(GetBalances(isSats = true),
GlobalData.consoleCliConfig) match {
case Success(commandReturn) =>

View File

@ -8,7 +8,8 @@ import org.bitcoins.core.protocol.dlc.models._
import org.bitcoins.crypto._
import org.bitcoins.gui.dlc.GlobalDLCData.dlcs
import org.bitcoins.gui.dlc.dialog._
import org.bitcoins.gui.{GlobalData, TaskRunner}
import org.bitcoins.gui._
import scalafx.application.Platform
import scalafx.beans.property.ObjectProperty
import scalafx.scene.control.Alert.AlertType
import scalafx.scene.control.{Alert, ButtonType, TextArea}
@ -229,6 +230,7 @@ class DLCPaneModel(resultArea: TextArea) extends Logging {
case Failure(err) => throw err
}
updateDLCs()
Platform.runLater(GUI.model.updateBalance())
}
)
}