bug fix: new line in floData cause error
since newline char is not supported in floData, new line (\n) is replaced with space.
This commit is contained in:
parent
aff5b927e9
commit
5e1e8a624f
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user