Merge pull request #4 from void-57/main

feat: enhance Stellar transaction submission logging with success details and clearer error messages.
This commit is contained in:
Aniruddha 2025-12-18 03:17:02 +05:30 committed by GitHub
commit 35dc5770b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {