mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-13 11:35:40 +01:00
Call trim on DLC message text boxes (#3348)
This commit is contained in:
parent
81fe7d76ee
commit
6414833111
4 changed files with 9 additions and 9 deletions
|
@ -202,7 +202,8 @@ class AcceptOfferDialog {
|
|||
offerTLVTF.onKeyTyped = _ => {
|
||||
if (!dlcDetailsShown) {
|
||||
Try(
|
||||
LnMessageFactory(DLCOfferTLV).fromHex(offerTLVTF.text.value)) match {
|
||||
LnMessageFactory(DLCOfferTLV).fromHex(
|
||||
offerTLVTF.text.value.trim)) match {
|
||||
case Failure(_) => ()
|
||||
case Success(lnMessage) =>
|
||||
dlcDetailsShown = true
|
||||
|
|
|
@ -206,7 +206,9 @@ object BroadcastDLCDialog extends Logging {
|
|||
|
||||
signTLVTF.onKeyTyped = _ => {
|
||||
if (!dlcDetailsShown) {
|
||||
Try(LnMessageFactory(DLCSignTLV).fromHex(signTLVTF.text.value)) match {
|
||||
Try(
|
||||
LnMessageFactory(DLCSignTLV).fromHex(
|
||||
signTLVTF.text.value.trim)) match {
|
||||
case Failure(_) => ()
|
||||
case Success(lnMessage) =>
|
||||
showDetails(lnMessage, isFromFile = false)
|
||||
|
|
|
@ -309,13 +309,10 @@ class CreateDLCOfferDialog extends Logging {
|
|||
|
||||
announcementOrContractInfoTF.onKeyTyped = _ => {
|
||||
if (!announcementDetailsShown) {
|
||||
Try(
|
||||
OracleAnnouncementV0TLV.fromHex(
|
||||
announcementOrContractInfoTF.text.value)) match {
|
||||
val text = announcementOrContractInfoTF.text.value.trim
|
||||
Try(OracleAnnouncementV0TLV.fromHex(text)) match {
|
||||
case Failure(_) =>
|
||||
Try(
|
||||
ContractInfoV0TLV.fromHex(
|
||||
announcementOrContractInfoTF.text.value)) match {
|
||||
Try(ContractInfoV0TLV.fromHex(text)) match {
|
||||
case Failure(_) => ()
|
||||
case Success(contractInfo) =>
|
||||
contractInfo.oracleInfo match {
|
||||
|
|
|
@ -222,7 +222,7 @@ object SignDLCDialog extends Logging {
|
|||
if (!dlcDetailsShown) {
|
||||
Try(
|
||||
LnMessageFactory(DLCAcceptTLV).fromHex(
|
||||
acceptTLVTF.text.value)) match {
|
||||
acceptTLVTF.text.value.trim)) match {
|
||||
case Failure(_) => ()
|
||||
case Success(lnMessage) =>
|
||||
showDetails(lnMessage, isFromFile = false)
|
||||
|
|
Loading…
Add table
Reference in a new issue