Add extra info and links for closing a DLC (#2362)

This commit is contained in:
Ben Carman 2020-12-16 13:20:43 -06:00 committed by GitHub
parent 935145d46b
commit 1fd7e96bad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 8 deletions

View file

@ -248,11 +248,11 @@ class DLCPaneModel(resultArea: TextArea, oracleInfoArea: TextArea) {
}
def onExecute(): Unit = {
printDLCDialogResult("ExecuteDLC", new ExecuteDLCDialog)
printDLCDialogResult("ExecuteDLC", new ExecuteDLCDialog, txPrintFunc)
}
def onRefund(): Unit = {
printDLCDialogResult("ExecuteDLCRefund", new RefundDLCDialog)
printDLCDialogResult("ExecuteDLCRefund", new RefundDLCDialog, txPrintFunc)
}
def viewDLC(status: DLCStatus): Unit = {

View file

@ -1020,7 +1020,8 @@ class RoutesSpec extends AnyWordSpec with ScalatestRouteTest with MockFactory {
Post() ~> route ~> check {
assert(contentType == `application/json`)
assert(
responseAs[String] == s"""{"result":"${EmptyTransaction.txIdBE.hex}","error":null}""")
responseAs[
String] == s"""{"result":"${EmptyTransaction.hex}","error":null}""")
}
}
@ -1060,7 +1061,8 @@ class RoutesSpec extends AnyWordSpec with ScalatestRouteTest with MockFactory {
Post() ~> route ~> check {
assert(contentType == `application/json`)
assert(
responseAs[String] == s"""{"result":"${EmptyTransaction.txIdBE.hex}","error":null}""")
responseAs[
String] == s"""{"result":"${EmptyTransaction.hex}","error":null}""")
}
}

View file

@ -397,9 +397,9 @@ case class WalletRoutes(wallet: AnyDLCHDWalletApi)(implicit
complete {
for {
tx <- wallet.executeDLC(contractId, oracleSigs)
retStr <- handleBroadcastable(tx, noBroadcast)
_ <- handleBroadcastable(tx, noBroadcast)
} yield {
Server.httpSuccess(retStr.hex)
Server.httpSuccess(tx.hex)
}
}
}
@ -412,9 +412,9 @@ case class WalletRoutes(wallet: AnyDLCHDWalletApi)(implicit
complete {
for {
tx <- wallet.executeDLCRefund(contractId)
retStr <- handleBroadcastable(tx, noBroadcast)
_ <- handleBroadcastable(tx, noBroadcast)
} yield {
Server.httpSuccess(retStr.hex)
Server.httpSuccess(tx.hex)
}
}
}