I created an anchor account which issues USD asset. It worked properly. But now when I modify the program where the anchor issues one more asset called INR and I am creating a trustline for both the assets in one transaction builder, it fails.


      { type: 'https://stellar.org/horizon-errors/transaction_failed',
        title: 'Transaction Failed',
        status: 400,
        detail: 'The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://www.stellar.org/developers/learn/concepts/list-of-operations.html',
        extras: [Object] } } }
failure Error: Request failed with status code 400
Error: Request failed with status code 400
    at createError (C:\Users\Siddharth\Desktop\SID\exelis\stellar-sid\new\copy\demo\node_modules\axios\lib\core\createError.js:16:15)
    at settle (C:\Users\Siddharth\Desktop\SID\exelis\stellar-sid\new\copy\demo\node_modules\axios\lib\core\settle.js:18:12)
    at IncomingMessage.handleStreamEnd (C:\Users\Siddharth\Desktop\SID\exelis\stellar-sid\new\copy\demo\node_modules\axios\lib\adapters\http.js:201:11)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)


const stellarServer = new Server('https://horizon-testnet.stellar.org');

const account = await stellarServer.loadAccount(accountKeypair.publicKey())
const transaction = new TransactionBuilder(account)
      asset: AnchorXUSD
      asset: AnchorXINR


const result = await stellarServer.submitTransaction(transaction)

2 Answers 2


Have you tried looking inside extras.result_codes as the error message suggests? The exact reason of why your transaction failed is documented there. In your case it is probably because you did not provide the public key of the account issuer of the assets.


For each change trust transaction you need to specify the asset code and the issuer id. I think issuer id not included in your transaction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.