Skip to content

Commit

Permalink
Merge pull request #55 from near-examples/bucanero-patch-1
Browse files Browse the repository at this point in the history
Fix missing `bitcoinRpc` reference
  • Loading branch information
bucanero authored Jan 31, 2025
2 parents 8453ab1 + 5ff2cd9 commit aafcfe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/bitcoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ async function constructPsbt(

if (scriptHex.startsWith('76a914')) {
console.log('legacy');
const bitcoinRpc = `https://blockstream.info/${networkId === 'testnet' ? 'testnet' : ''}/api`;
const nonWitnessUtxo = await fetch(`${bitcoinRpc}/tx/${utxo.txid}/hex`).then(result => result.text())

console.log('nonWitnessUtxo hex:', nonWitnessUtxo)
Expand Down Expand Up @@ -340,4 +341,4 @@ async function fetchTransaction(networkId, transactionId) {
});

return tx;
}
}

0 comments on commit aafcfe2

Please sign in to comment.