Pretty print PnL in table view (#3400)

This commit is contained in:
benthecarman 2021-07-16 10:15:35 -05:00 committed by GitHub
parent 19fb1cf17a
commit f20cdf667c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,8 @@ class DLCTableView(model: DLCPaneModel) {
cellValueFactory = { status =>
status.value match {
case closed: ClosedDLCStatus =>
new StringProperty(status, "PNL", s"${closed.pnl}")
val amt = GUIUtil.numberFormatter.format(closed.pnl.satoshis.toLong)
new StringProperty(status, "PNL", s"$amt sats")
case _: BroadcastedDLCStatus | _: AcceptedDLCStatus | _: Offered =>
new StringProperty(status, "PNL", "In progress")
}