From d89a151ffeaffb374e4299a03c4ca6b8ad2be09b Mon Sep 17 00:00:00 2001 From: void-57 Date: Thu, 18 Dec 2025 03:14:59 +0530 Subject: [PATCH] feat: enhance Stellar transaction submission logging with success details and clearer error messages. --- stellarBlockchainAPI.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/stellarBlockchainAPI.js b/stellarBlockchainAPI.js index 948ae4b..f1d329e 100644 --- a/stellarBlockchainAPI.js +++ b/stellarBlockchainAPI.js @@ -316,9 +316,20 @@ // Parse the XDR back to a transaction using TransactionBuilder const transaction = StellarSdk.TransactionBuilder.fromXDR(transactionXDR, StellarSdk.Networks.PUBLIC); + console.log('Submitting transaction to Stellar network...'); + // Submit to network const result = await server.submitTransaction(transaction); + console.log('✅ Transaction submitted successfully!'); + console.log('Transaction Details:', { + hash: result.hash, + ledger: result.ledger, + successful: result.successful, + envelope_xdr: result.envelope_xdr, + result_xdr: result.result_xdr + }); + return { hash: result.hash, ledger: result.ledger, @@ -326,7 +337,7 @@ txId: result.hash }; } catch (error) { - console.error('Error submitting transaction:', error); + console.error('❌ Error submitting transaction:', error); // Parse Stellar error if (error.response && error.response.data) {