Skip to content

Commit

Permalink
Re-add nFixedFee to sweepAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Dec 20, 2023
1 parent 12f6e0d commit 263fcde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -961,10 +961,10 @@ export async function updateEncryptionGUI(fEncrypted = null) {
* @param {number} nFixedFee - An optional fixed satoshi fee
* @returns {Promise<string|false>} - TXID on success, false or error on failure
*/
export async function sweepAddress(arrUTXOs, sweepingMasterKey) {
export async function sweepAddress(arrUTXOs, sweepingMasterKey, nFixedFee) {
const txBuilder = TransactionBuilder.create().addUTXOs(arrUTXOs);

const outputValue = txBuilder.valueIn - txBuilder.getFee();
const outputValue = txBuilder.valueIn - (nFixedFee || txBuilder.getFee());
const [address] = wallet.getNewAddress(1);
const tx = txBuilder
.addOutput({
Expand Down

0 comments on commit 263fcde

Please sign in to comment.