Adjust DLCTableView column widths and "counter party" to "counterparty" (#3539)

This commit is contained in:
user411 2021-08-13 06:14:11 -06:00 committed by GitHub
parent 04678b5ed9
commit 77539c570a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 16 deletions

View File

@ -22,7 +22,7 @@ class DLCTableView(model: DLCPaneModel) {
val tableView: TableView[DLCStatus] = { val tableView: TableView[DLCStatus] = {
val eventIdCol = new TableColumn[DLCStatus, String] { val eventIdCol = new TableColumn[DLCStatus, String] {
text = "Event Id" text = "Event Id"
prefWidth = 160 prefWidth = 230
cellValueFactory = { status => cellValueFactory = { status =>
val eventIdStr = val eventIdStr =
status.value.oracleInfo.singleOracleInfos.head.announcement.eventTLV.eventId status.value.oracleInfo.singleOracleInfos.head.announcement.eventTLV.eventId
@ -32,7 +32,7 @@ class DLCTableView(model: DLCPaneModel) {
val contractIdCol = new TableColumn[DLCStatus, String] { val contractIdCol = new TableColumn[DLCStatus, String] {
text = "Contract Id" text = "Contract Id"
prefWidth = 100 prefWidth = 90
cellValueFactory = { status => cellValueFactory = { status =>
val contractIdStr = status.value match { val contractIdStr = status.value match {
case _: Offered => "" case _: Offered => ""
@ -45,7 +45,7 @@ class DLCTableView(model: DLCPaneModel) {
val statusCol = new TableColumn[DLCStatus, String] { val statusCol = new TableColumn[DLCStatus, String] {
text = "Status" text = "Status"
prefWidth = 125 prefWidth = 105
cellValueFactory = { status => cellValueFactory = { status =>
new StringProperty(status, "Status", status.value.statusString) new StringProperty(status, "Status", status.value.statusString)
} }
@ -65,12 +65,12 @@ class DLCTableView(model: DLCPaneModel) {
} }
val otherCollateralCol = new TableColumn[DLCStatus, String] { val otherCollateralCol = new TableColumn[DLCStatus, String] {
text = "Counter Party Collateral" text = "Counterparty Collateral"
prefWidth = 200 prefWidth = 150
cellValueFactory = { status => cellValueFactory = { status =>
val amt = GUIUtil.numberFormatter.format( val amt = GUIUtil.numberFormatter.format(
status.value.remoteCollateral.satoshis.toLong) status.value.remoteCollateral.satoshis.toLong)
new StringProperty(status, "Counter Party Collateral", s"$amt sats") new StringProperty(status, "Counterparty Collateral", s"$amt sats")
} }
} }
@ -86,7 +86,7 @@ class DLCTableView(model: DLCPaneModel) {
val pnlCol = new TableColumn[DLCStatus, String] { val pnlCol = new TableColumn[DLCStatus, String] {
text = "Realized PNL" text = "Realized PNL"
prefWidth = 100 prefWidth = 110
cellValueFactory = { status => cellValueFactory = { status =>
status.value match { status.value match {
case closed: ClosedDLCStatus => case closed: ClosedDLCStatus =>
@ -100,7 +100,7 @@ class DLCTableView(model: DLCPaneModel) {
val rorCol = new TableColumn[DLCStatus, String] { val rorCol = new TableColumn[DLCStatus, String] {
text = "Rate of Return" text = "Rate of Return"
prefWidth = 125 prefWidth = 105
cellValueFactory = { status => cellValueFactory = { status =>
status.value match { status.value match {
case closed: ClosedDLCStatus => case closed: ClosedDLCStatus =>

View File

@ -87,7 +87,7 @@ class AcceptOfferDialog extends CliCommandProducer[AcceptDLCCliCommand] {
add( add(
new Label("DLC Offer") { new Label("DLC Offer") {
tooltip = Tooltip("Offer message given from your counter party.") tooltip = Tooltip("Offer message given from your counterparty.")
tooltip.value.setShowDelay(new javafx.util.Duration(100)) tooltip.value.setShowDelay(new javafx.util.Duration(100))
}, },
0, 0,
@ -161,7 +161,7 @@ class AcceptOfferDialog extends CliCommandProducer[AcceptDLCCliCommand] {
nextRow) nextRow)
nextRow += 1 nextRow += 1
gridPane.add(new Label("Counter Party Collateral"), 0, nextRow) gridPane.add(new Label("Counterparty Collateral"), 0, nextRow)
gridPane.add(new TextField() { gridPane.add(new TextField() {
text = offer.totalCollateralSatoshis.toString text = offer.totalCollateralSatoshis.toString
editable = false editable = false

View File

@ -173,7 +173,7 @@ object BroadcastDLCDialog
nextRow) nextRow)
nextRow += 1 nextRow += 1
gridPane.add(new Label("Counter Party Collateral"), 0, nextRow) gridPane.add(new Label("Counterparty Collateral"), 0, nextRow)
gridPane.add(new TextField() { gridPane.add(new TextField() {
text = status.remoteCollateral.satoshis.toString text = status.remoteCollateral.satoshis.toString
editable = false editable = false

View File

@ -188,7 +188,7 @@ object SignDLCDialog
nextRow) nextRow)
nextRow += 1 nextRow += 1
gridPane.add(new Label("Counter Party Collateral"), 0, nextRow) gridPane.add(new Label("Counterparty Collateral"), 0, nextRow)
gridPane.add(new TextField() { gridPane.add(new TextField() {
text = status.remoteCollateral.satoshis.toString text = status.remoteCollateral.satoshis.toString
editable = false editable = false

View File

@ -567,7 +567,7 @@ private[bitcoins] trait DLCDataManagement { self: DLCWallet =>
fundingInputs, fundingInputs,
contractInfo) contractInfo)
.flatMap { executor => .flatMap { executor =>
// Filter for only counter party's outcome sigs // Filter for only counterparty's outcome sigs
val outcomeSigs = val outcomeSigs =
if (dlcDb.isInitiator) { if (dlcDb.isInitiator) {
outcomeSigsDbs outcomeSigsDbs

View File

@ -48,7 +48,7 @@ But do note that this demonstrates the old non-adaptor version of DLCs so that t
If using a numeric contract and/or multiple oracles, messages can get very large and sometimes even too large to for the application. If using a numeric contract and/or multiple oracles, messages can get very large and sometimes even too large to for the application.
To solve this there is an `Export to file` button located under the text box for the messages your wallet will construct. To solve this there is an `Export to file` button located under the text box for the messages your wallet will construct.
This can be used to export a DLC message to a file and then the file can be sent to your counter party. This can be used to export a DLC message to a file and then the file can be sent to your counterparty.
If you receive a file from a counter-party, there is an `Import file` button on every dialog you input a DLC message. If you receive a file from a counter-party, there is an `Import file` button on every dialog you input a DLC message.
This can be used to import the file of the DLC message from your counter-party. This can be used to import the file of the DLC message from your counter-party.

View File

@ -51,7 +51,7 @@ But do note that this demonstrates the old non-adaptor version of DLCs so that t
If using a numeric contract and/or multiple oracles, messages can get very large and sometimes even too large to for the application. If using a numeric contract and/or multiple oracles, messages can get very large and sometimes even too large to for the application.
To solve this there is an `Export to file` button located under the text box for the messages your wallet will construct. To solve this there is an `Export to file` button located under the text box for the messages your wallet will construct.
This can be used to export a DLC message to a file and then the file can be sent to your counter party. This can be used to export a DLC message to a file and then the file can be sent to your counterparty.
If you receive a file from a counter-party, there is an `Import file` button on every dialog you input a DLC message. If you receive a file from a counter-party, there is an `Import file` button on every dialog you input a DLC message.
This can be used to import the file of the DLC message from your counter-party. This can be used to import the file of the DLC message from your counter-party.

View File

@ -49,7 +49,7 @@ But do note that this demonstrates the old non-adaptor version of DLCs so that t
If using a numeric contract and/or multiple oracles, messages can get very large and sometimes even too large to for the application. If using a numeric contract and/or multiple oracles, messages can get very large and sometimes even too large to for the application.
To solve this there is an `Export to file` button located under the text box for the messages your wallet will construct. To solve this there is an `Export to file` button located under the text box for the messages your wallet will construct.
This can be used to export a DLC message to a file and then the file can be sent to your counter party. This can be used to export a DLC message to a file and then the file can be sent to your counterparty.
If you receive a file from a counter-party, there is an `Import file` button on every dialog you input a DLC message. If you receive a file from a counter-party, there is an `Import file` button on every dialog you input a DLC message.
This can be used to import the file of the DLC message from your counter-party. This can be used to import the file of the DLC message from your counter-party.