From 5e1e8a624faf866004d3c17ce5042f984c370113 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Fri, 22 May 2020 18:50:29 +0530 Subject: [PATCH] bug fix: new line in floData cause error since newline char is not supported in floData, new line (\n) is replaced with space. --- standard_Operations.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/standard_Operations.html b/standard_Operations.html index 46a72cf..3f4b326 100644 --- a/standard_Operations.html +++ b/standard_Operations.html @@ -7400,7 +7400,7 @@ Bitcoin.Util = { var change = utxoAmt - sendAmt - fee; if (change > 0) trx.addoutput(senderAddr, change); - trx.addflodata(floData); + trx.addflodata(floData.replace(/\n/g,' ')); var signedTxHash = trx.sign(privKey, 1); this.broadcastTx(signedTxHash) .then(txid => resolve(txid)) @@ -7431,7 +7431,7 @@ Bitcoin.Util = { } } trx.addoutput(floID, utxoAmt - fee); - trx.addflodata(floData); + trx.addflodata(floData.replace(/\n/g,' ')); var signedTxHash = trx.sign(privKey, 1); this.broadcastTx(signedTxHash) .then(txid => resolve(txid)) @@ -7616,7 +7616,7 @@ Bitcoin.Util = { } for (floID in receivers) trx.addoutput(floID, receivers[floID]); - trx.addflodata(floData); + trx.addflodata(floData.replace(/\n/g,' ')); for (let i = 0; i < wifSeq.length; i++) trx.signinput(i, wifSeq[i], 1); var signedTxHash = trx.serialize();