Skip to content

Commit

Permalink
fix: bitcoin-cli cmd execution
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Jun 4, 2024
1 parent b49db0b commit 2240137
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
container_id=$(docker ps -qf "name=mercurylayer_bitcoin_1")
echo "Container ID: $container_id"
docker logs $container_id
docker exec $container_id bitcoin-cli -regtest -rpcuser=user -rpcpassword=pass sendtoaddress bcrt1pcngfxjdkf4r2h26k52dh5nunxg8m68uf4lkfhmfjvjj6agfkm5jqmftw4e 0.0001
- name: Verify ElectrumX Service with Curl
run: |
container_id=$(docker ps -qf "name=mercurylayer_electrumx_1")
Expand Down
2 changes: 1 addition & 1 deletion clients/apps/nodejs/test_basic_workflow2.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function walletTransfersToItselfAndWithdraw(clientConfig, wallet_name) {
// Sending Bitcoin using bitcoin-cli
try {
const sendBitcoinCommand = `docker exec $(docker ps -qf "name=mercurylayer_bitcoin_1") bitcoin-cli -regtest -rpcuser=user -rpcpassword=pass sendtoaddress ${deposit_info.deposit_address} ${amountInBtc}`;
execSync(sendBitcoinCommand);
exec(sendBitcoinCommand);
console.log(`Sent ${amountInBtc} BTC to ${deposit_info.deposit_address}`);
} catch (error) {
console.error('Error sending Bitcoin:', error.message);
Expand Down

0 comments on commit 2240137

Please sign in to comment.