I want to make a account (public key) to trust a asset I issue myself.
When I run an allowTrust operation, snippet below, I get op_no_trustline
error :
const issuingAccount = await this.stellarServer.loadAccount(issuerKeys.publicKey())
const transaction = new TransactionBuilder(issuingAccount, {
fee: BASE_FEE,
networkPassphrase: Networks.TESTNET
})
.addOperation(Operation.allowTrust({
trustor,
assetCode,
authorize: true
}))
.setTimeout(0)
.build()
transaction.sign(issuerKeys)
const result = await this.stellarServer.submitTransaction(transaction)
I don't know why I get this error, since I want to allow the trustor(account) to trust the asset I created?
I have set this setFlags: AuthRevocableFlag | AuthRequiredFlag
to the issue account.