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.
Error
data:
{ 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)
Code
const stellarServer = new Server('https://horizon-testnet.stellar.org');
const account = await stellarServer.loadAccount(accountKeypair.publicKey())
const transaction = new TransactionBuilder(account)
.addOperation(
Operation.changeTrust({
asset: AnchorXUSD
}))
.addOperation(
Operation.changeTrust({
asset: AnchorXINR
}))
.build();
transaction.sign(accountKeypair)
const result = await stellarServer.submitTransaction(transaction)