diff --git a/CHANGELOG.md b/CHANGELOG.md index 832eb9d..8dd4289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,4 +79,8 @@ ### 2.0.6 (2024-01-23) -- Added proxy URL to prevent CORS issue \ No newline at end of file +- Added proxy URL to prevent CORS issue + +### 2.0.7 (2024-01-30) + +- Added generic network parameter in sign transaction \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9a7cced..6545b9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@getsafle/vault-bitcoin-controller", - "version": "2.0.6", + "version": "2.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@getsafle/vault-bitcoin-controller", - "version": "2.0.6", + "version": "2.0.7", "license": "MIT", "dependencies": { "axios": "^0.21.4", diff --git a/package.json b/package.json index d271ced..6142d6d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@getsafle/vault-bitcoin-controller", - "version": "2.0.6", + "version": "2.0.7", "description": "", "engines": { "node": ">= 10" diff --git a/src/helper/signTransaction.js b/src/helper/signTransaction.js index d3bad50..ce71212 100644 --- a/src/helper/signTransaction.js +++ b/src/helper/signTransaction.js @@ -29,7 +29,7 @@ async function signTransaction(from, to, amountToSend, URL, privateKey, satPerBy psbt.addOutput({address: from, value: change}); for (let i = 0; i < inputs.length; i++) { - psbt.signInput(i, bitcoin.ECPair.fromWIF(privateKey, bitcoin.networks.testnet)) + psbt.signInput(i, bitcoin.ECPair.fromWIF(privateKey, network)) } const isValid = psbt.validateSignaturesOfAllInputs()