From 22401376c7aa614809156756e12f88bb58016805 Mon Sep 17 00:00:00 2001 From: DhananjayPurohit Date: Tue, 4 Jun 2024 11:53:29 +0530 Subject: [PATCH] fix: bitcoin-cli cmd execution --- .github/workflows/tests.yml | 1 + clients/apps/nodejs/test_basic_workflow2.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 128ed965..0da06422 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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") diff --git a/clients/apps/nodejs/test_basic_workflow2.js b/clients/apps/nodejs/test_basic_workflow2.js index b16cbadd..08fc5860 100644 --- a/clients/apps/nodejs/test_basic_workflow2.js +++ b/clients/apps/nodejs/test_basic_workflow2.js @@ -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);