feat: enhance Stellar transaction submission logging with success details and clearer error messages.
This commit is contained in:
parent
7bf5065742
commit
d89a151ffe
@ -316,9 +316,20 @@
|
|||||||
// Parse the XDR back to a transaction using TransactionBuilder
|
// Parse the XDR back to a transaction using TransactionBuilder
|
||||||
const transaction = StellarSdk.TransactionBuilder.fromXDR(transactionXDR, StellarSdk.Networks.PUBLIC);
|
const transaction = StellarSdk.TransactionBuilder.fromXDR(transactionXDR, StellarSdk.Networks.PUBLIC);
|
||||||
|
|
||||||
|
console.log('Submitting transaction to Stellar network...');
|
||||||
|
|
||||||
// Submit to network
|
// Submit to network
|
||||||
const result = await server.submitTransaction(transaction);
|
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 {
|
return {
|
||||||
hash: result.hash,
|
hash: result.hash,
|
||||||
ledger: result.ledger,
|
ledger: result.ledger,
|
||||||
@ -326,7 +337,7 @@
|
|||||||
txId: result.hash
|
txId: result.hash
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error submitting transaction:', error);
|
console.error('❌ Error submitting transaction:', error);
|
||||||
|
|
||||||
// Parse Stellar error
|
// Parse Stellar error
|
||||||
if (error.response && error.response.data) {
|
if (error.response && error.response.data) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user