Skip to content

Commit

Permalink
fix another opi bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ordinariusprof committed Dec 2, 2024
1 parent a46f0cf commit 68ee99f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/main_index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if (network_type == "mainnet") {
network = bitcoin.networks.testnet
network_folder = "testnet3/"
} else if (network_type == "signet") {
network = bitcoin.networks.signet
network = bitcoin.networks.testnet
network_folder = "signet/"
} else if (network_type == "regtest") {
network = bitcoin.networks.regtest
Expand All @@ -71,7 +71,7 @@ if (network_type == "mainnet") {
console.error("Unknown network type: " + network_type)
process.exit(1)
}
console.log('debuglog network_type:', network_type, 'network:', network);
console.log('init network_type:', network_type, 'network:', network, 'network_folder:', network_folder);
const first_inscription_heights = {
'mainnet': 767430,
'testnet': 2413343,
Expand Down Expand Up @@ -525,10 +525,8 @@ NOTE: removed following from node_modules/bitcoinjs-lib/src/payments/p2tr.js
o.w. it cannot decode 512057cd4cfa03f27f7b18c2fe45fe2c2e0f7b5ccb034af4dec098977c28562be7a2
*/
function wallet_from_pkscript(pkscript, network) {
console.log('debuglog pkscript:', pkscript, 'network:', network);
try {
let address = bitcoin.payments.p2tr({ output: Buffer.from(pkscript, 'hex'), network: network })
console.log('debuglog wallet_from_pkscript address:', address);
return address.address
} catch { /* try others */ }
try {
Expand Down

0 comments on commit 68ee99f

Please sign in to comment.